chore: reorg

This commit is contained in:
2020-10-17 11:50:12 +08:00
parent a034988643
commit bb6762ab81
55 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
use std::{ffi::CStr, os::raw::c_char};
/// # Safety
/// Pointer must be valid, and point to a null-terminated
/// string. What happens otherwise is UB.
pub unsafe extern "C" fn greet(name: *const c_char) {
let cstr = CStr::from_ptr(name);
println!("Hello, {}!", cstr.to_str().unwrap());
}