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
22,217 downloads per month
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 customwasm-bindgenbinary. When set, worker-build will use this binary instead of downloading or looking for a globally installed version. -
WASM_OPT_BIN: Path to a customwasm-optbinary. 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