34 releases

new 0.8.3 May 9, 2026
0.8.1 Apr 17, 2026
0.7.5 Feb 25, 2026
0.7.2 Dec 20, 2025
0.0.3 Nov 5, 2021

#174 in Network programming

Download history 2124/week @ 2026-01-22 2382/week @ 2026-01-29 2484/week @ 2026-02-05 3524/week @ 2026-02-12 3799/week @ 2026-02-19 3093/week @ 2026-02-26 3466/week @ 2026-03-05 2962/week @ 2026-03-12 3258/week @ 2026-03-19 2892/week @ 2026-03-26 3229/week @ 2026-04-02 4011/week @ 2026-04-09 3792/week @ 2026-04-16 4010/week @ 2026-04-23 4701/week @ 2026-04-30 4692/week @ 2026-05-07

17,778 downloads per month

Apache-2.0

140KB
3.5K SLoC

worker-build

This is a tool to be used as a custom build command for a Cloudflare Workers project.

# wrangler.toml
# ...

[build]
command = "cargo install -q worker-build && worker-build --release"

[build.upload]
dir    = "build/worker"
format = "modules"
main   = "./shim.mjs"

[[build.upload.rules]]
globs = ["**/*.wasm"]
type  = "CompiledWasm"

Environment Variables

You can override the default binary lookup/download behavior by setting these environment variables:

  • WASM_BINDGEN_BIN: Path to a custom wasm-bindgen binary. When set, worker-build will use this binary instead of downloading or looking for a globally installed version.

  • WASM_OPT_BIN: Path to a custom wasm-opt binary. When set, worker-build will use this binary instead of downloading one.

Example

export WASM_BINDGEN_BIN=/path/to/custom/wasm-bindgen
export WASM_OPT_BIN=/path/to/custom/wasm-opt
worker-build --release

Dependencies

~26–44MB
~759K SLoC