Glossary
- ArchMath, ArchMem, ArchString
-
The three Rust traits in
lib/basalt/c/src/arch/mod.rsthat abstract math, memory, and string operations whose implementations differ per CPU architecture. Each target architecture provides a concrete type implementing the traits, and the type aliasArchresolves to the right concrete type at compile time. See Multi-Architecture Dispatch. - arc4random
-
The BSD cryptographically secure pseudo-random number generator. basaltc implements it on top of
getentropy()using ChaCha20. Provided bycompat/freebsd/bsd_misc.rs. - basaltc
-
The Rust C standard library that produces
libc.so. 44 modules covering POSIX, BSD extensions, and a FreeBSD compatibility layer. See Architecture. - BlockHeader
-
The 16-byte header
malloc.rsplaces before each allocation in the heap. Stores the block size and a free-list link pointer. See Heap and malloc. - C locale
-
The only locale basaltc supports. All
setlocalecalls return"C"regardless of input. See Locale, ctype and wchar. - Capsicum
-
FreeBSD’s capability-based security framework. basaltc provides stub implementations of the Capsicum API surface so that ports linking against it succeed at link time, but no sandboxing is enforced. See FreeBSD Compatibility.
- crt_start.o
-
The static C runtime object containing
_start, the ELF entry point. Statically linked into every executable rather than intolibc.soto avoid an unresolvedmainreference in the shared library. See CRT Startup. - __cxa_atexit
-
The Itanium C++ ABI function for registering destructors of namespace-scope objects and
thread_localobjects with non-trivial destructors. basaltc provides the implementation incrt.rs; libcxxabi calls it via DT_NEEDED. See atexit and Process Exit. - __cxa_finalize
-
The function that runs registered C++ destructors at exit time (called from
exit) or at DSO unload time (called fromdlclose). Companion to__cxa_atexit. - Cooperative signal delivery
-
basaltc’s signal model: signals are stored as pending bits in a trona notification object and dispatched at the next IPC return via
posix_sigcheck, instead of preemptively interrupting the user code. See Processes and Signals. - dlerror
-
The function that returns the most recent dynamic-linker error message. basaltc maintains two static buffers (in-progress and most-recent-completed) for thread-safe error reporting. See Dynamic Linking.
- dl_iterate_phdr
-
The function that walks the link-map chain calling a callback for each loaded DSO. Used by libunwind to find DSO program headers for stack unwinding, by Rust’s panic infrastructure, and by debuggers.
- ld-trona.so
-
The SaltyOS runtime dynamic linker. Loads the executable’s
DT_NEEDEDlibraries before_startruns, then hands control to the executable. basaltc’sdlfcn.rsreuses the link-map chain ld-trona.so populates. - fd table
-
The per-process file descriptor table maintained by
trona_posix. Maps fd numbers to capability slots that point at userland servers (vfsserver, netsrv, posix_ttysrv, etc.). basaltc operates on fd numbers; trona_posix dispatches to the right server. See trona Boundary. - fini_array
-
The ELF section containing function pointers to run at process exit time. Populated by C destructor and `__attribute__((destructor))` declarations. Walked in reverse order by `exit` after the C and C atexit handlers complete. See atexit and Process Exit.
- FILE
-
basaltc’s buffered I/O stream type. Wraps a POSIX file descriptor with a 1024-byte buffer and supports
_IOFBF,_IOLBF,_IONBFmodes. Defined instdio.rs. See Buffered I/O. - Free list
-
The singly linked list of free blocks maintained by
malloc.rs. Sorted by address to enable bidirectional coalescing on free. See Heap and malloc. - funopen
-
The BSD extension that creates a
FILE*whose I/O calls are user-supplied callbacks instead ofposix_read/posix_write. Used by libxo and ports that build in-memory streams. See Buffered I/O. - Futex
-
A fast user-space mutex primitive. The trona substrate provides a
Futexsyscall that basaltc uses to backpthread_mutex,pthread_cond, the malloc heap lock, the dlfcn lock, and the atexit lock. Three-phase acquire: CAS → spin → futex_wait. - getentropy
-
The BSD CSPRNG seed source. basaltc implements it on top of
trona_posix::getrandom, which talks to the kernel’s RDRAND or hardware random source. - Hardening mode
-
libc's configurable runtime safety check level. basalt sets `_LIBCPP_HARDENING_MODE_NONE` to disable all bounds checking and assertion overhead in the standard library. See xref:cxx/cxx-config-site.adoc[libc Configuration].
- init_array
-
The ELF section containing function pointers to run at process startup time, after
libc_start_mainand beforemain. Populated by C++ namespace-scope constructors andattribute__constructordeclarations. Walked in forward order. - Itanium C++ ABI
-
The cross-platform standard for C++ runtime representation. Used on Linux, macOS, FreeBSD, and SaltyOS. Implemented by libcxxabi. See libcxxabi and libunwind.
- libcxx
-
The LLVM C standard library. Provides `<vector>`, `<string>`, `<thread>`, etc. Built from `toolchain/llvm-project/libcxx/src/` and statically linked into `libc.so`. See libc++ Runtime.
- libcxxabi
-
The LLVM Itanium C ABI implementation. Provides RTTI, exception personality, `__cxa_*` functions, typeinfo objects. Statically linked into `libc.so`. See libcxxabi and libunwind.
- libunwind
-
The LLVM stack unwinder. Reads DWARF Call Frame Information to walk the stack during exception throws and to support
_Unwind_Backtrace. Statically linked intolibc++.so. - libxo
-
A FreeBSD library for structured output (text, XML, JSON, HTML from one source). basaltc provides a stub implementation in
compat/freebsd/xo.rsthat emits text only viaprintf, ignoring the structured-output annotations. - Link map
-
The chain of
DlHandlestructs maintained by basaltc andld-trona.sodescribing every loaded DSO. Walked bydlsym(RTLD_DEFAULT),dl_iterate_phdr, anddladdr. - no_std
-
The Rust attribute that excludes the
stdlibrary, leaving onlycore. basaltc is#![no_std]because there is no host libc to link against (basaltc is the libc). See Architecture. - POSIX TZ
-
The format used by the
TZenvironment variable to describe a time zone. basaltc parses POSIX TZ strings (e.g.,EST5EDT,M3.2.0,M11.1.0) forlocaltime/mktime. See Time and Timezones. - posix_sigcheck
-
The trona function that checks pending signal bits and dispatches the user handler. Called automatically at every IPC return. See Processes and Signals.
- __progname
-
The static pointer holding the program name (basename of
argv[0]). Set during__libc_start_mainviasetprogname. Read by BSDerr/warnfunctions to prefix diagnostic output. - rtld
-
The runtime dynamic linker (
ld-trona.so). LoadsDT_NEEDEDlibraries at process startup before_startruns. - Rune table
-
The 256-entry table that backs the
<ctype.h>macros. Each entry holds a category bitmask and the upper / lower case mapping for one byte value. Ported from FreeBSD’s_RuneLocaleand stored incompat/freebsd/rune.rs. - SA_RESTART
-
The POSIX
sigactionflag requesting that interrupted syscalls restart automatically. basaltc accepts the flag for compatibility but it has no effect because syscalls are never interrupted. See Processes and Signals. - sbrk
-
The classic Unix heap-extension primitive. basaltc’s
malloccallstrona_posix::mm::posix_sbrkto grow the heap when the free list is empty. - setjmp / longjmp
-
The non-local jump primitives. basaltc’s implementation is in
lib/basalt/c/src/arch/{x86_64,aarch64}/setjmp.S(callee-saved register save/restore). - Slot allocator
-
The per-process allocator for CSpace slots, initialized during
init_mm_from_auxv. Used to store capabilities returned by trona system calls (file descriptor capabilities, MO capabilities, etc.). - stdio init
-
The
ensure_stdio_initfunction that wires up the staticstdin,stdout,stderrslots and the FreeBSDstdinp,stdoutp,stderrpaliases. Called early inlibc_start_main. - strlcpy / strlcat
-
BSD-recommended buffer-safe string copy and concatenate. Differ from glibc’s
strncpy/strncatin two ways: the size argument is the buffer size (not the maximum copy length), and the result is always NUL-terminated. See Strings and Memory. - TLS (Thread-Local Storage)
-
Per-thread state. basaltc relies on
trona_posix::tls::Tls, a struct with fields forerrno, thegmtime/localtimereentrancy buffer, theasctimeandctimebuffers, thedlerrormessage, etc. Accessed through the architecture thread pointer (%fson x86_64,TPIDR_EL0on aarch64). See trona Boundary. - trona boundary
-
The line between basaltc (which translates C ABI to Rust calls) and
trona_posix(which makes the actual IPC calls to userland servers). Some basaltc modules cross the boundary heavily (unistd,stdio); others stay entirely above it (regex,iconv,string). See trona Boundary. - trona_posix
-
The Rust crate one layer below basaltc that exposes POSIX-shaped functions backed by trona IPC calls to userland servers. Almost every basaltc system-touching function is a thin wrapper around a
trona_posix::*call. - utsname
-
The struct returned by
uname(). Carriessysname("SaltyOS"),nodename(current hostname),release,version, andmachine("x86_64"or"aarch64"). - vfsserver
-
The userland Virtual File System server that backs every file fd. basaltc reaches it via
trona_posix::posix_*calls. - wcwidth
-
The function that returns the display column width of a wide character. Returns 1 for normal characters, 0 for combining characters, 2 for some CJK ranges. basaltc uses the FreeBSD compact wcwidth table.