wasm-wrapper-gen

JavaScript wrapper generation for rust code targeting wasm32-unknown-unknown.

This repository is currently very WIP, but there's a full working example Cargo project in examples/simple_summation/.

General overview:

wasm-wrapper-gen is composed of two interlocking parts: - wasm-wrapper-gen provides the js_fn!() macro which generates extern "C" functions - wasm-wrapper-gen-build is a build-script utility which scrapes the source for usages of js_fn!() and generates a JavaScript file which binds to those exported functions.

Note: this assumes little-endian hardware (the majority of modern hardware).

Currently supported:

Unimplemented:

Links: