mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 18:57:16 +08:00
[rust] Tidy core defaults and migrate docs to README
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user