Nothing to see here, move along meow
0

Configure Feed

Select the types of activity you want to include in your feed.

at main 801 B View raw
1#![no_std] 2#![no_main] 3 4use lancer_user::{print, syscall}; 5 6#[unsafe(no_mangle)] 7pub extern "C" fn lancer_main() -> ! { 8 let mut cursor: u64 = 0; 9 let mut buf = [0u8; 4096]; 10 11 loop { 12 let (new_cursor, bytes_read) = syscall::blackbox_read(cursor, &mut buf); 13 match bytes_read { 14 0 => break, 15 n => { 16 let data = &buf[..n]; 17 data.split(|&b| b == b'\n') 18 .filter(|line| !line.is_empty()) 19 .for_each(|line| match core::str::from_utf8(line) { 20 Ok(text) => print!("{}\n", text), 21 Err(_) => print!("(non-utf8 {} bytes)\n", line.len()), 22 }); 23 cursor = new_cursor; 24 } 25 } 26 } 27 28 syscall::exit() 29}