CloudABI is a sandboxed UNIX-like runtime environment, based on the
principle of capability-based security. As CloudABI is intended to be
cross-platform, the system call layer is specified here:
https://github.com/NuxiNL/cloudabi/blob/master/cloudabi.txt
From these definitions, we automatically generate C and Rust bindings.
The latter is published on crates.io:
https://crates.io/crates/cloudabi
My goal is to implement libstd for CloudABI in such a way that it uses
the C library as little as possible; only in places where it would ease
interfacing with C code (e.g., thread creation). In places where
constants in the C library are directly based on the CloudABI
specification (e.g., errnos), use the constants provided by the cloudabi
crate.
Change deprecated constants into hidden constants
rustc, an important libc consumer, has a policy that they can't use any
crates with deprecated symbols. Replace libc's two deprecated symbols
with hidden symbols instead.
rustc, an important libc consumer, has a policy that they can't use any
crates with deprecated symbols. Replace libc's two deprecated symbols
with hidden symbols instead.
Add additional aarch64 linux syscalls
I've noticed some syscalls are missing for aarch64 linux, I've added those I needed. The numbers have been taken from a raspberry pi 3.
Adds:
- `SYS_fcntl`
- `SYS_lseek`
- `SYS_newfstatat`
- `SYS_fstat`
- `SYS_mmap`
- `SYS_open`
- `SYS_stat`
- `SYS_lstat`
- `SYS_pipe`
- `SYS_getdents`
- `SYS_poll`
Add `net/if_utun.h` and `linux/if_tun.h` constants for macos and linux platform
Add `net/if_utun.h` constants for macos platform.
Add `linux/if_tun.h` constants for linux platform.
Openbsd aarch64
it adds aarch64-unknown-openbsd definition (and push `c_char` deeper, so the amount of changes).
I also updated errno definitions for openbsd
Use IFF_OACTIVE and IFF_RUNNING even on FreeBSD. Deprecate the DRV ones.
According to @asomers, libc should propagate the use of the portable constants `IFF_OACTIVE` and `IFF_RUNNING` for user-space applications, instead of `IFF_DRV_OACTIVE` and `IFF_DRV_RUNNING`. It least that's my understanding of [his comment](https://github.com/nix-rust/nix/pull/667#discussion_r152396984) in nix-rust/nix#667.