Expand description
Lua os standard library.
Ports src/loslib.c (430 lines, 12 functions) to Rust.
§Platform access limitations
Several os.* functions require OS-level capabilities that are restricted to
lua-cli per PORTING.md (no std::fs, no std::process in lua-stdlib).
Those functions are stubbed with TODO(port) markers and return nil / error
until a capability-injection layer is designed in Phase B.
Time decomposition (os.date, os.time) requires C-library functions
(gmtime_r, localtime_r, mktime, strftime). Those call sites are
flagged with TODO(port) and the stubs use a zero-initialised TmFields.
Structs§
- TmFields
- Local mirror of C’s
struct tm.
Constants§
- OS_LIB
- Mapping from Lua-visible names to the Rust implementations of each
os.*function.
Functions§
- open_os
- Opens the
oslibrary: creates a new table populated withOS_LIBand leaves it on the stack.
Type Aliases§
- Native
Fn - Type alias for a Lua native function implementation in Rust.