Changelog
Copy MarkdownAll notable changes to this project will be documented in this file.
This project publishes to three registries. Version bumps are kept in sync.
| Registry | Package |
|---|---|
| hex.pm | exclosured (Elixir library) |
| npmjs.com | exclosured (JS LiveView hook) |
| crates.io | exclosured_guest (Rust guest crate) |
0.1.4
hex.pm (exclosured@0.1.4)
- Fixed: generated inline and scaffolded crates now pin
wasm-bindgento the installedwasm-bindgen-cliversion, avoiding schema mismatches. - Fixed: compilation now fails clearly when
rustupis missing instead of silently skipping the wasm32 target check. - Fixed: incremental compilation now detects changes to
Cargo.lock, optimization mode, feature flags, cargo args, and build environment. - Fixed: LiveView calls and state pushes are routed to the intended WASM module.
- Fixed: protocol decoding now raises clear
ArgumentErrors for invalid, truncated, trailing, or unknown-atom payloads.
npm (exclosured@0.1.4)
- Fixed: LiveView hook calls and state events ignore payloads for other modules.
- Fixed:
exclosured/loaderCommonJS exports now includeWasmBuffer. - Added: TypeScript declarations for
exclosured/loader.
crates.io (exclosured_guest@0.1.4)
- Version synced with the Hex and npm release.
0.1.2
hex.pm (exclosured@0.1.2)
- Fixed: inline WASM compiler now checks if output files exist, not just if the Rust source is unchanged. Prevents skipping compilation when a previous build was interrupted (e.g., by a concurrent download failure).
0.1.1
hex.pm (exclosured@0.1.1)
- Added:
deps:indefwasmnow supports keyword options for Cargo features:{"serde", "1", features: ["derive"]}generatesserde = { version = "1", features = ["derive"] }in Cargo.toml - Added:
#[allow(unreachable_code)]to generated Rust functions, suppressing warnings when user code has an explicitreturn - Added:
~RUSTsigil for inline Rust code indefwasm. Behaves like~S(no interpolation) but enables editor extensions to provide Rust syntax highlighting and LSP support inside Elixir files - Added:
defwasmone-liner syntax:defwasm :add, args: [a: :i32, b: :i32], do: "return a + b;" - Changed: LiveView wrapper functions in
defwasmare only generated whenExclosured.LiveViewis available (fixes compile warnings in non-Phoenix projects) - Changed:
wasm_path/0now returns an absolute path (works correctly in Livebook/Mix.install)
0.1.0
hex.pm
Initial release of the Exclosured library.
- Mix compiler:
mix compilebuilds Rust to.wasmvia cargo + wasm-bindgen - Incremental compilation with manifest-based staleness detection
Exclosured.LiveView:call/5,push_state/3,stream_call/5withon_chunk/on_doneExclosured.LiveView.sandbox/1: HEEx component withsyncattribute for declarative state bindingExclosured.LiveView.sync/2: shorthand helper for building sync maps from assigns- Server fallback:
call/5acceptsfallback:option, runs Elixir function when WASM not loaded Exclosured.Inline:defwasmmacro for inline Rust functions withdeps:for external cratesExclosured.Events: generate Elixir structs from/// exclosured:eventannotated Rust structsExclosured.Telemetry::telemetryevents for compilation and runtime operationsExclosured.Watcher: dev file watcher for auto-recompilationExclosured.Protocol: binary encoding for high-frequency state syncmix exclosured.init: scaffolding task for new WASM modules~Ssigil support indefwasmfor Rust code with escaped quotes
0.1.1
npm (exclosured@0.1.1)
- Fixed:
const fnrenamed toconst wasmFn(reserved word in JS strict mode) - Fixed:
destroyed()now callsthis.wasmBindgen.destroyed?.()for WASM cleanup - Added:
WasmBufferclass inexclosured/loaderwith automatic memory cleanup viaFinalizationRegistry - Added:
loadAsset()returnsWasmBufferinstead of raw{ ptr, len }(no more manualdeallocneeded) - Added: documentation comment about shared
window.__exclosuredlimitation on multi-module pages - Changed:
loader.mjsexportsWasmBufferalongsideExclosuredLoader
0.1.2
npm (exclosured@0.1.2)
- Fixed: added
/* @vite-ignore */to the dynamicimport()in ExclosuredHook, preventing Vite'simport-analysisplugin from erroring on/wasm/paths during development - Same fix applied to
priv/static/exclosured_hook.js
0.1.0
npm (exclosured@0.1.0)
Initial release of the JavaScript package.
ExclosuredHook: Phoenix LiveView hook for loading and communicating with WASM modules- Declarative state sync via
data-wasm-syncattribute andupdated()callback wasm:call,wasm:state,wasm:emit,wasm:result,wasm:error,wasm:readyevent protocol- Inter-module broadcast via
window.__exclosured_busEventTarget - Canvas auto-creation for interactive WASM modules
ExclosuredLoader: standalone WASM loader (no LiveView required)loadAsset(): load binary assets into WASM memory
crates.io (exclosured_guest@0.1.0)
Initial release of the Rust guest crate.
emit(event, payload): send events to Phoenix LiveView via wasm-bindgen JS importsbroadcast(channel, data): send messages to other WASM modules on the same pagealloc(size)/dealloc(ptr, size): memory management for JS interop- wasm-bindgen
js_namespace = __exclosuredfor emit/broadcast binding
crates.io (exclosured_guest@0.1.1)
- Fixed: zero-size
allocnow returns an aligned dangling pointer instead of undefined behavior - Fixed:
deallocskips freeing for size 0 - Added:
repository,homepage,keywords,categories,readmemetadata to Cargo.toml - Added: README.md with usage examples