Skip to content

rainlanguage/wasm-split-prototype

 
 

Repository files navigation

Wasm split

Runtime/macro

Crates.io version Download docs.rs docs

CLI

Crates.io version

This collection of crates allow you to indicate that certain functions are appropriate split points for lazy-loaded code in WebAssembly (WASM). A single input wasm module is then split into multiple modules that are fetched as needed, when a function in another module is called.

What this is not

This is not a dynamic linker for wasm! Runtime loading expects to receive exactly the modules that have been produced by splitting earlier. Selectively updating only specific files after recompiling is not supported. On the technical side, this is because a reachability analysis is run on the whole artifact which might migrate code from one module to another due to unrelated changes.

History

The tool originated out of a prototype written by @jbms. It has then received updates from the leptos maintainers and finally migrated into a stand-alone crate to serve general build tools.

About

Wasm code splitting with lazy async loading

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 98.8%
  • Other 1.2%