diff options
| author | bernard <[email protected]> | 2025-12-13 21:42:29 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2025-12-15 12:50:49 +0800 |
| commit | 4f154d8207be7320be07477fe3857523b1704977 (patch) | |
| tree | d32fa76e74dccef9a58c7b5d54d10a2f4f54c4d6 /components/rust/examples/modules/example_lib/src/lib.rs | |
| parent | 3c459aecea7135f96d9ebd291d276a6e18fd97c7 (diff) | |
[rust] Tidy core defaults and migrate docs to README
Diffstat (limited to 'components/rust/examples/modules/example_lib/src/lib.rs')
| -rw-r--r-- | components/rust/examples/modules/example_lib/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/rust/examples/modules/example_lib/src/lib.rs b/components/rust/examples/modules/example_lib/src/lib.rs index 5f81c1553f..79fe384e6a 100644 --- a/components/rust/examples/modules/example_lib/src/lib.rs +++ b/components/rust/examples/modules/example_lib/src/lib.rs @@ -11,7 +11,7 @@ /* Bring rt-rust's println! macro into scope */ use rt_rust::println; use core::ffi::{c_char, CStr}; -#[unsafe(no_mangle)] +#[no_mangle] pub extern "C" fn rust_mylib_println(s: *const c_char) { if s.is_null() { println!(""); @@ -24,7 +24,7 @@ pub extern "C" fn rust_mylib_println(s: *const c_char) { } } -#[unsafe(no_mangle)] +#[no_mangle] pub extern "C" fn rust_mylib_add(a: usize, b: usize) -> usize { a + b -}
\ No newline at end of file +} |
