Expand description
C main entry point with nice wrapper for arguments.
#![no_main]
#[no_mangle]
pub fn rust_main(args: c_main::Args) -> isize {
for arg in args.into_iter().skip(1) {
println!("arg={:?}", arg);
}
0
}
Structs§
- Args
- Wrapper over C-style arguments
Functions§
- c_
str_ ⚠to_ rust - Converts C string to Rust’s, verifying it is UTF-8
- c_
str_ ⚠to_ rust_ unchecked - Converts C string to Rust’s one assuming it is UTF-8