0.8
This release is mostly about internal optimizations, read the related blog post if you are interested in the details.
- Event listeners no longer allocate any memory. (#78)
ListProduct
is now using a new internal collection to allocate the generated products. (#78)- State-bound zero-sized event listeners have their update method turned into a no-op. (#75)
- Event listeners no longer store their
JsValue
in their product, making them more memory efficient. (#75) - Added
rlsf
feature to quickly enable and turn on the rlsf allocator. (#78)
While the above changes are mostly to do with internals and the user-facing API surface hasn't changed, to make the new event listeners work the following is now a required addition in the Trunk.toml
configuration:
[build]
pattern_script = "<script type=\"module\">import init, { koboldCallback } from '{base}{js}';init('{base}{wasm}');window.koboldCallback = koboldCallback;</script>"
Debug builds will check if koboldCallback
is defined and log an error in console with this exact line in it.
This will hopefully not be required in the future, but it requires upstream changes in Trunk or wasm-bindgen to allow for exported Rust functions to be invoked from imported JavaScript modules without knowing the name of the binary that's being compiled.