refactor: large code cleanup and safety pass

This commit is contained in:
Zoe
2026-09-07 13:31:49 -05:00
parent 3308fd2959
commit bf1a81cf82
20 changed files with 1026 additions and 388 deletions
+3 -5
View File
@@ -8,12 +8,10 @@ pub extern "C" fn _start() -> ! {
let msg = "Hello from client!";
println!("[client] Sent: {}", msg);
// TODO: we assume the echo server is task 1 (spawned by omega3)
sys_send(1, msg.as_ptr() as usize, msg.len()).unwrap();
sys_send(1, msg.as_bytes()).unwrap();
let out = [0u8; 128];
let out_ptr = out.as_ptr() as usize;
let max_len = out.len();
let (actual_len, _) = sys_recv(out_ptr, max_len).unwrap();
let mut out = [0u8; 128];
let (actual_len, _) = sys_recv(&mut out).unwrap();
println!(
"[client] Received: {}",
core::str::from_utf8(&out[..actual_len]).unwrap()