36 releases

new 0.8.5 Jun 12, 2026
0.8.3 May 9, 2026
0.7.5 Feb 25, 2026
0.7.2 Dec 20, 2025
0.0.3 Nov 5, 2021

#179 in Network programming

Download history 3892/week @ 2026-02-22 3088/week @ 2026-03-01 3214/week @ 2026-03-08 3036/week @ 2026-03-15 3301/week @ 2026-03-22 2904/week @ 2026-03-29 3383/week @ 2026-04-05 4143/week @ 2026-04-12 3961/week @ 2026-04-19 3755/week @ 2026-04-26 5100/week @ 2026-05-03 5475/week @ 2026-05-10 5197/week @ 2026-05-17 4369/week @ 2026-05-24 6325/week @ 2026-05-31 5824/week @ 2026-06-07

22,217 downloads per month

Apache-2.0

140KB
3K 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–43MB
~743K SLoC