Shrink endpoint runtime footprint

This commit is contained in:
Michael Mikovsky
2026-06-01 13:08:26 -06:00
parent 4cd496ed2b
commit 7749f62629
25 changed files with 1245 additions and 489 deletions
+17
View File
@@ -0,0 +1,17 @@
[package]
name = "endpoint_test"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
include.workspace = true
[dependencies]
unshell = { workspace = true }
leaf-shell = { path = "../../unshell-leaves/leaf-shell" }
[[bin]]
name = "endpoint_test"
path = "src/main.rs"
test = false
+19
View File
@@ -0,0 +1,19 @@
#![no_std]
#![no_main]
extern crate alloc;
use leaf_shell::{ShellLeaf, ShellState};
use unshell::protocol::{Endpoint, Leaf};
const ID: u32 = 0x12345678;
#[unsafe(no_mangle)]
pub fn main(_argc: i32, _argv: *const *const u8) {
let mut endpoint = Endpoint::new(ID);
let mut shell = ShellLeaf::new(ShellState::new());
loop {
shell.update(&mut endpoint);
}
}