One Page Wasm - How to

Write a Rust crate

It should expose a single function:

#[wasm_bindgen]
pub fn frame(frame_buffer: &mut [u8], key_down: bool) {
    // Your code here...
}

Compile to WebAssembly with wasm-pack build