Currently this repository takes this abstraction and ports it directly
to Rust. The interface here is a cdylib at src/lib.rs
and has a few
implementations currently for assessing size:
naive
- this is an implementation built directly on Vec
in the standardhand-optimized-vec
- this is also using Vec
but hand-optimizes a fewClone
and push
are optimized to have better codegen and generate lesscrazy
- this is a 100% unsafe implementation that uses the raw wasmThe foo.sh
script will compile everything (using cargo features on the main
crate) and run the test.js
script to ensure at least a smoke test passes. The
size for each of these implementations is:
implementation | gz size in bytes |
---|---|
naive | 15551 |
hand-optimzied | 3343 |
crazy | 711 |