To communicate with the systems provided by the operating system, you need to call system calls. However, WebAssembly is designed as a complete sandbox, and Wasm modules cannot directly access OS system calls.
To call system calls from Wasm, you need to import functions that have access to system calls from the host environment.
#[link(wasm_import_module = "syscall")]
extern "C" {
fn write(pointer: i32, length: i32);