6 releases

new 0.2.4 Jul 26, 2024
0.2.3 Jul 26, 2024
0.2.0 Jun 27, 2024
0.1.0 May 18, 2023
0.0.0 Dec 10, 2022

#72 in WebAssembly

Download history 9/week @ 2024-04-04 2/week @ 2024-04-18 13/week @ 2024-04-25 146/week @ 2024-06-27 6/week @ 2024-07-04 52/week @ 2024-07-18

204 downloads per month

Apache-2.0 WITH LLVM-exception

15MB
296K SLoC

TypeScript 243K SLoC // 0.3% comments JavaScript 48K SLoC // 0.1% comments Rust 4.5K SLoC // 0.0% comments WebAssembly 40 SLoC

weval: the WebAssembly partial evaluator

weval partially evaluates WebAssembly snapshots to turn interpreters into compilers (see Futamura projection for more).

weval binaries are available via releases on this repo or via an npm package.

Usage of weval is like:

$ weval weval -w -i program.wasm -o wevaled.wasm

which runs Wizer on program.wasm to obtain a snapshot, then processes any weval requests (function specialization requests) in the resulting heap image, appending the specialized functions and filling in function pointers in wevaled.wasm.

See the API in include/weval.h for more.

Releasing Checklist

  • Bump the version in Cargo.toml and cargo check to ensure Cargo.lock is updated as well.

  • Bump the tag version (TAG constant) in npm/weval/index.js.

  • Bump the npm package version in npm/weval/package.json.

  • Run npm i in npm/weval/ to ensure the package-lock.json file is updated.

  • Commit all of this as a "version bump" PR.

  • Push it to main and ensure CI completes successfully.

  • Tag as v0.x.y and push that tag.

  • cargo publish from the root.

  • npm publish from npm/weval/.

Dependencies

~51MB
~890K SLoC