Expand description
The builtin surface every host shares, described once as ScriptFns.
The builtin surface every script host shares, described once.
A builtin whose whole body is “push one ScriptCommand” or “read one
process-global and return it” says nothing about the language calling it, so
it lives here as a ScriptFn rather than three times over in the host
crates. Each host binds this table through its own
ScriptHost::register_script_fn
when it is constructed, so a bare host in a test, in lumenc check, or in a
server render carries the same builtins a windowed app does.
What stays in a host crate is what a host cannot share: the signal mirror
and its handle types, closure registries (on, derive, event handlers),
anything whose return shape differs per language, and the receiver-method
surfaces (node.set_text(..)) each engine spells its own way.
Functions§
- builtin_
script_ fns - The whole shared builtin table, in registration order.
- parse_
dialog_ filter_ spec - Parse a
pick_file_filteredspec like"Images:png,jpg|All:*"into the(label, [extensions])list the dialog backend takes. A group with no:is a label with no extensions, and a literal*extension is dropped (no extension filter means “all files”).