Skip to main content

Crate catallaxy_stdlib

Crate catallaxy_stdlib 

Source
Expand description

Native implementations of the Catallaxy standard library.

Each native receives the calling thread’s Vm and its arguments (the receiver first for methods). A missing optional argument arrives as the empty marker; use [opt].

Modules§

fiber
Fibers: lightweight cooperative threads for I/O-bound work (M:N scheduling).

Statics§

ARGS
Command-line arguments passed to the program (after the script path).

Functions§

flush
Flushes buffered standard output (at exit, before reading input, before errors).
internal_error_message
The Catallaxy panic message for a Rust panic caught at a thread’s or fiber’s entry (an internal error of the runtime), or None if the payload is not a panic message (such as the forced unwind that drops a suspended fiber), which the catcher must resume.
lookup
Looks up a native implementation by name: the standard library, then extensions.
register_native
Registers a native function implemented by a Rust extension crate. Catallaxy code declares it with native fn name(...) -> T (a top-level native fn uses its plain name; a native fn in a class C uses C.name). Must be called before the program is loaded.
report_unjoined_panics
Warns about threads that panicked and were never joined (their Err was never seen).
write_out
Writes to the buffered standard output.