Support no_std in roto-runtime
Add #![no_std] to the runtime crate and introduce optional std and alloc features. Update the code generator to be compatible and add a no_std_test example. Remove the generator binary.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "no_std_test"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
roto-runtime = { path = "../../runtime", default-features = false }
|
||||
|
||||
[profile.dev]
|
||||
panic = "abort"
|
||||
|
||||
[profile.release]
|
||||
panic = "abort"
|
||||
@@ -0,0 +1,16 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use roto_runtime::ProtoAccessor;
|
||||
|
||||
#[panic_handler]
|
||||
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn _start() -> ! {
|
||||
let _data = [0u8; 0];
|
||||
let _ = ProtoAccessor::new(&_data);
|
||||
loop {}
|
||||
}
|
||||
Reference in New Issue
Block a user