Skip to main content

Crate islands_runtime

Crate islands_runtime 

Source

Structs§

Signal

Functions§

__islands_remount
Called by the JS side after $ISLANDS_REPLACE injects new island markers. Idempotent because mount_all only processes :not([data-island-mounted]).
effect
Run callback immediately as a reactive effect. Any Signal::get calls inside the callback register a subscription; the callback re-runs whenever those signals change.
init_nav
Initialize client navigation when the nav feature is enabled.
init_panic_hook
Install the console_error_panic_hook so Rust panics appear in the browser console instead of a cryptic “unreachable executed” message.
keep_alive_in_current_scope
Transfer ownership of value into the current scope’s keeper list so it stays alive for the scope’s lifetime. Used by islands-runtime-bindings to hand Closure objects across the module boundary without Closure::forget.
mount_all
Walk [data-island]:not([data-island-mounted]), create a Scope per island, call the registered mount function inside the scope, then mark the element as mounted. Islands that error are logged and skipped; others continue.
navigate
Programmatic client-side navigation, exported into the shared core bundle so page WASM can import it (the islands-runtime-bindings raw_module block declares navigate as a core import under its nav feature).
on_event
Attach an event listener on target for event_name, calling handler. A cleanup that removes the listener is registered on the current scope so the listener is removed when the island is unmounted.
register_island
Register a mount function for a named island.
scope_registry_len
Number of scopes the registry currently holds. Exposed for the navigation layer’s leak canary: a mount/unmount round-trip must return this count to its baseline (no orphaned SCOPE_REGISTRY entries — AC-V14).
unmount_island
Tear down a mounted island: run its Scope’s LIFO cleanups exactly once and drop its registry entry so the slot is reclaimed.