event-mumu

Crates.ioevent-mumu
lib.rsevent-mumu
version0.1.4
created_at2025-09-08 16:09:37.630333+00
updated_at2025-09-21 13:17:22.021775+00
descriptionevent plugin for the mumu ecosystem
homepagehttps://lava.nu11.uk
repositoryhttps://gitlab.com/tofo/mumu-event
max_upload_size
id1829455
size56,378
(justifiedmumu)

documentation

README

Lava Event Plugin for Lava | mumu@lava-event | Event Plugin

This plugin provides asynchronous time-based event functions for the Lava repl.

Supported calls:

  • event:timeout how, cb -- Schedules a function to run after a delay.
  • event:interval ms, cb -- Repeatedly calls a function on a simple timer.
  • event:loop(cb) -- Executes a function on every tick. Partial usage, _ including placeholder _, is supported in the functions.

Installation

``b make make install


```sh
# In Lava repl session:
extend("event")
event:interval(1000, () => slog("Hi"))));

This plugin can be extended with "extend("event")", "lava:event.so", or by copying the library to asynchorous core directory.

Finctions

event:timeout(ms, function) | Schedules a callback after 'ms' delay event:interval(ms, function) // Repeats until called event:stop() terminates the interval. event:loop(cb) | Executes 'cn' on every repl tick. Partials (using _ placeholder) have a javascript/Ramda type feel. event:stop(handle) | Stops the active interval or loop, where 'handle' is an integer returned by event:timeout, event:interval, or event:loop.

This plugin was tested on linux, but should work on most unix distributions.

Please see the "LICENSE" file for licensing information.

license mit/Apache-2.0 (or optional) contributor: Tom Fotheringham and contributors https://gitlab.com/tofo/mumu-event

Commit count: 4

cargo fmt