1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
use cstring::*;

extern "C" {
    fn joss_syscall(request:CString)->CString;
}

pub fn syscall(request:String) -> String{
    let response = unsafe {
        joss_syscall(cstr(&request.to_string()))
    };
    cstr_to_string(response)
}