Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-bridge/blob/main/tests/native/g1/caller.rs # omega-bridge Omega-first language interoperability: checked conversion backends and native language bindings Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-bridge / tests / native / g1 / caller.rs` 14 lines ยท 600 bytes Raw Blame History 1 // Rust caller for the G1 sample calc: reads "i0 i1" lines, prints "i0 i1 status result" per line. 2 mod omega_native; // generated by tools/native, nothing typed by hand 3 use std::io::BufRead; 4 5 fn main() { 6 for line in std::io::stdin().lock().lines() { 7 let line = line.expect("stdin"); 8 let mut it = line.split_whitespace().map(|t| t.parse::().expect("u64")); 9 let (a, b) = (it.next().expect("i0"), it.next().expect("i1")); 10 let mut r: u64 = 0; 11 let s = unsafe { omega_native::omega_calc(&mut r, a, b) }; 12 println!("{} {} {} {}", a, b, s, r); 13 } 14 }