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
17,778 downloads per month
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 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–44MB
~759K SLoC