rust_with_c_example/rs.rs
2024-01-09 13:07:20 -06:00

8 lines
122 B
Rust

#[no_mangle]
pub extern "C" fn ok(x:&[i32;3])->i32
{
let mut y:Vec<i32>=vec![5;15];
y[0]=x[2];
return y[0];
}