libc-rs
libc-rs is a pure-Rust #![no_std] native application runtime, compiler memory-intrinsic provider, and syscall substrate for unikernel environments.
It intentionally is not POSIX or Linux libc:
- Zero C source or prebuilt C archives (
no libc.a,no crt1.o,no libunwind.a) - Typed
SysResult<T>(Errno) syscall wrappers without legacy POSIX bloat - No
pthreads: explicit single-address-space and tickless unikernel primitives
Modules
errno:Errnoerror code newtype,SysResult<T>alias, and standard error constantsraw: AArch64svc #0raw syscall dispatch (nr,decode_raw,syscall0..syscall6)fd:RawFd,BorrowedFd,OwnedFd, and*atflagsmm:mmap,mmap_anonymous,munmap,mprotect,madvise,msync,mincoreio:read,write,pread,pwrite,writev,lseek,close,dup,dup2,dup3,pipe2,fcntl,ioctl,flockfs:Stat,openat,fstat,fstatat,mkdirat,unlinkat,renameat,linkat,readlinkat,getcwd,chdir,ftruncate,fchmod,fsync,getdents64net:SockAddrUn,SockAddrVm,socket,socketpair,bind_unix,bind_vsock,listen,accept4,connect_unix,connect_vsock,setsockopt,getsockopt,shutdownpoll:PollFd,EpollEvent,ppoll,epoll_create1,epoll_ctl,epoll_pwait2,eventfd2process:exit_thread,exit_group,abort,getpid,gettid,getuid,geteuid,getgid,getegid,setpgid,setsid,umask,fork,execve_raw,waitpid,waitpid_opt,kill,sigaction,getrlimit,setrlimit,getrusage,sched_yieldsync:FutexMutex,FutexMutexGuard,futex_wait,futex_wake_one,futex_wake_allthread:ThreadHandle,spawn_thread,current_thread_id,errno_cell,tls_key_create,tls_key_delete,tls_get,tls_set,run_current_thread_tls_destructorstime:Timespec,Timeval,clock_gettime,clock_settime,nanosleeprand:getrandom,fill_randomstartup:init_from_stack,aux_summary,getauxval,page_size,args_vec,getenv_vec,setenv_bytes,environ_vec,process_entry!,declare_native_note!math: freestandingfloor,ceil,trunc,ln,powf(hardware AArch64frint*+ pure-Rust IEEE-754 transcendentals)heap:MmapHeap(GLOBAL_MMAP_HEAP,c_malloc,c_calloc,c_realloc,c_free,c_posix_memalign)mem: freestandingcopy_nonoverlapping_bytes,copy_bytes,set_bytes,compare_bytes,c_strlen,c_strnlen,memchr,memrchr,ct_eq
Features
alloc(default): enablesextern crate allocsymbols: exports freestanding C-ABImemcpy,memmove,memset,memcmp,bcmp,strlen, andstrnlensymbols
Target
Targets aarch64-unknown-none for unikernel EL0 binaries, while supporting host targets (cargo test) via deterministic mock syscall hooks.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.