Module syscall

Module syscall 

Source
Expand description

Incredibly fast syscall wrappers for using inline assembly. Serves the purposes of completely bypassing Rust’s standard library in favor of handwritten Assembly. Is this a good idea? No. Is it fast? Yeah, but only marginally. Either way it serves a purpose and I will NOT accept criticism. What do you mean I wasted two whole hours to make the program only 100µs faster?

Supports x86_64 and aarch64 architectures. Riscv support will be implemented when and ONLY WHEN I can be bothered to work on it.

Functions§

read_file_fast
Read entire file using direct syscalls. This avoids libc overhead and can be significantly faster for small files.
sys_close
Direct syscall to close a file descriptor
sys_open
Direct syscall to open a file
sys_read
Direct syscall to read from a file descriptor