RSSAmplifier

nickb.dev · Oct 7, 2022

Avoiding allocations in Rust to shrink Wasm modules

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.


 Rust lacks a runtime, enabling small .wasm sizes because there is no extra bloat included like a garbage collector. You only pay (in code size) for the functions you actually use. 
 The Rust Wasm Book, “Why Rust and WebAssembly?” 
 
 We can see small Wasm sizes in action with a contrived example: 
 use wasm_bindgen::prelude::wasm_bindgen;
 
…

Read on nickb.dev

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.