feat(server-framework): add Server trait, Encode/Decode, async executor, syscall wrappers, and mock arch for host testing

This commit is contained in:
2026-10-18 02:55:22 +02:00
parent 5c29c0845d
commit c14fe50c23
12 changed files with 303 additions and 23 deletions

View File

@@ -0,0 +1,19 @@
pub fn syscall0(_nr: usize) -> usize {
0
}
pub fn syscall1(_nr: usize, _a0: usize) -> usize {
0
}
pub fn syscall2(_nr: usize, _a0: usize, _a1: usize) -> usize {
0
}
pub fn syscall5(_nr: usize, _a0: usize, _a1: usize, _a2: usize, _a3: usize, _a4: usize) -> usize {
0
}
pub fn syscall_receive(_nr: usize, _a0: usize) -> (usize, usize, usize, usize) {
(0, 0, 0, 0)
}

View File

@@ -1,14 +1,9 @@
#[cfg(target_arch = "riscv64")]
#[cfg(all(target_arch = "riscv64", target_os = "none"))]
mod riscv;
#[cfg(target_arch = "riscv64")]
#[cfg(all(target_arch = "riscv64", target_os = "none"))]
pub use riscv::*;
#[cfg(target_arch = "aarch64")]
mod arm;
#[cfg(target_arch = "aarch64")]
pub use arm::*;
#[cfg(target_arch = "x86_64")]
mod x86;
#[cfg(target_arch = "x86_64")]
pub use x86::*;
#[cfg(not(target_os = "none"))]
mod mock;
#[cfg(not(target_os = "none"))]
pub use mock::*;