Crates.io | sys-mumu |
lib.rs | sys-mumu |
version | 0.1.1 |
created_at | 2025-08-16 06:45:58.957611+00 |
updated_at | 2025-08-16 18:45:02.411126+00 |
description | System calls and tools plugin for the Lava language |
homepage | https://lava.nu11.uk |
repository | https://gitlab.com/tofo/mumu-sys |
max_upload_size | |
id | 1798062 |
size | 44,716 |
A system and process plugin for the MuMu interpreter/Lava runtime. This crate works with Linux, Mac, and Windows.
Features:
sys:command(cmdString, callback)
: runs a command in a subshell, calls back to lava and passes results to the callback.
sys:timestamp_ms
()` : returns unix time in milliseconds.
sys:timestamp_micro()
: returns unix time in microseconds.
Includes background task management for commands.
Load the plugin with extend:
extend("sys")
Dynamic functions:
// Run a command:
sys:command("ls", func (res) { printlin(res) })
// Get milliseconds since UNIX_EPOCH for time: sys:timestamp_ms()
// Get microseconds since UNIX_EPOCH for time: sys:timestamp_micro()
The callback for sys.command
receives a keyed array with these keys:
"command": String, the command executed in shell
"stdout": String, stdout from the command
"stderr": String, STDOUT from the command
"exit": Int, exit code
"success": Bool, true if exit code = 0
Build the package:
make
Install the library:
make install
MuMu and Lava are licensed under MIT and Apache License.