Rust_FFI_C언어
link
hello world(C_FFI)_printf(C)
use libc::printf; fn main() { unsafe { let print_x = (r#"hello c__FFI(Rust Lang)"#.as_ptr()) as *const i8; printf(print_x); } }
- Result
hello c__FFI(Rust Lang)⏎
use libc::printf; fn main() { unsafe { let print_x = (r#"hello c__FFI(Rust Lang)"#.as_ptr()) as *const i8; printf(print_x); } }
hello c__FFI(Rust Lang)⏎