diff options
| author | yan hu <[email protected]> | 2026-08-07 18:05:09 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-08-21 11:17:57 +0800 |
| commit | 30af7388a4077354f6083082fee040595978bbac (patch) | |
| tree | dfa0440a884847ff7d803bb3113dd3f9f916f74b /components/rust/examples/modules/example_lib/src | |
| parent | 339bffb702b911b55b0e6d54fa5ad9116295f048 (diff) | |
[rust][tools] Fix Rust build example configuration handling
Improve the Rust build integration across core, applications, components, and module examples. Fix build failure propagation, target and feature handling, linker flags, example configuration semantics, and add STM32 CI attach coverage.
Diffstat (limited to 'components/rust/examples/modules/example_lib/src')
| -rw-r--r-- | components/rust/examples/modules/example_lib/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/rust/examples/modules/example_lib/src/lib.rs b/components/rust/examples/modules/example_lib/src/lib.rs index 79fe384e6a..8b86c593cd 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}; -#[no_mangle] +#[unsafe(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) { } } -#[no_mangle] +#[unsafe(no_mangle)] pub extern "C" fn rust_mylib_add(a: usize, b: usize) -> usize { a + b } |
