syscalls
syscalls copied to clipboard
Raw Linux system calls for Rust.
Sample Code ``` let mut map = SysnoMap:: i32>::new(); let sys_no = syscalls::x86::Sysno::from(0x10); map.insert(sys_no, || 1); ``` Error: ```expected enum `syscalls::Sysno`, found enum `syscalls::x86::Sysno```
I am working on improving [lurk](https://github.com/JakWai01/lurk) -- an `strace` Rust rewrite. At the moment, lurk's author @JakWai01 has created a big manual map for the x86_64 syscalls, but the approach...
Please, add a variant of `syscalls::raw_syscall`, which allows calling syscall by raw number as opposed to `Sysno`. Why this is needed? Let's assume at some point of the future this...
Currently, most architectures on Linux are supported, but other platforms such as FreeBSD are not yet supported. The master list of FreeBSD syscalls is at https://cgit.freebsd.org/src/tree/sys/kern/syscalls.master. It should be possible...
Among the syscall tables for each architecture, there is quite a lot of overlap. That is, many of the syscalls are used by all architectures. Relatively few syscalls only exist...
Hi, it seems like there's no support for `sparc` or `sparc64` architectures currently. What would be the steps to implement support for making syscalls on them? Would it be possible...
Some parts of `Errno` are arch-specific, so `Errno` is currently broken for architectures besides `x86-64` and `aarch64`. Instead, we should have a per-architecture definition of `Errno`.
Currently, `SysnoSet` is only implemented for the current architecture. It would be nice to round out the API and include it in all of the architectures exposed via `syscalls::{x86,arm,mips,...}::*`. However,...
With `SysnoSet`, we can create a bitset of syscalls at compile time. Having predefined sets for various groups of related syscalls is useful for constructing seccomp filters. strace for example,...
See https://rust-lang.github.io/api-guidelines/interoperability.html#c-good-err I would recommend a type like the following: ```rust #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] struct ParseSysnoError { string: String, } impl fmt::Display for ParseSysnoError { fn...