Skip to main content

Crate libc_rs

Crate libc_rs 

Source
Expand description

libc-rs – pure-Rust #![no_std] native application runtime, compiler memory intrinsics, and syscall substrate for unikernel environments.

Unlike POSIX or Linux libc implementations, libc-rs carries no C code, no pthreads, and no legacy POSIX bloat.

Re-exports§

pub use errno::Errno;
pub use errno::SysResult;

Modules§

errno
Unikernel system error numbers (Errno) and SysResult alias.
fd
File descriptor types (RawFd, BorrowedFd, OwnedFd) and *at flags.
fs
Filesystem metadata, path resolution, and directory iteration.
heap
Dynamic mmap_anonymous slab and page-granularity allocator for unikernel EL0 binaries.
io
File descriptor I/O, duplication, pipes, fcntl, and ioctl operations.
math
Pure-Rust #![no_std] IEEE-754 floating-point intrinsics.
mem
Freestanding memory and byte-slice intrinsics.
mm
Virtual memory mapping and protection calls (mmap, munmap, mprotect, madvise, msync, mincore).
net
Socket, UNIX domain, and Virtio-Vsock syscall wrappers.
poll
I/O multiplexing (ppoll, epoll, eventfd) syscall wrappers.
process
Process lifecycle, credentials, signals, resource limits, and wait syscalls.
rand
Kernel cryptographic entropy (getrandom) syscall wrappers.
raw
Raw AArch64 svc #0 system call dispatch and syscall numbers.
startup
Process startup state (argc, argv, environ, auxv), ELF note, and _start entry macro.
sync
Pure-Rust futex synchronization primitives (FutexMutex) with zero pthreads dependencies.
thread
Pure-Rust thread lifecycle (spawn_thread, ThreadHandle), per-thread errno, and 64-key thread-local storage with exit destructors.
time
Clocks, timestamps, and high-resolution sleep syscalls.

Macros§

declare_native_note
Emits a .note.uk_native ELF note static.
process_entry
Emits a freestanding aarch64-unknown-none process entry point (_start), stack initializer, and panic handler that exits via exit_group / abort.