From 30af7388a4077354f6083082fee040595978bbac Mon Sep 17 00:00:00 2001 From: yan hu Date: Fri, 7 Aug 2026 18:05:09 +0800 Subject: [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. --- components/rust/examples/modules/example_lib/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/rust/examples/modules/example_lib/src') 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 } -- cgit v1.3.1