WASM-PACK(1)

πŸ“¦ version 0.15.0, in ubuntu stonking

πŸ’– WASM-PACK β€” bestie, we're building an npm package πŸ’–

okay so this is the manual for wasm-pack build, part of the wasm-pack family of User Commands, and honestly? it's giving "compile my Rust into something the JS girlies can install." no cap. πŸ¦‹


✨ NAME ✨

wasm-pack build β€” ??????? build your npm package! 🌸

(yeah bestie the question marks are literally in the source. we don't ask. we don't explain. we just build your npm package.) πŸ’…


🌈 SYNOPSIS 🌈

wasm-pack build [OPTIONS] [PATH] [EXTRA_OPTIONS]...

that's it. that's the whole vibe. ✨


πŸŽ€ DESCRIPTION πŸŽ€

??????? build your npm package! 🫢

like. that's the description. that's what it does. it builds your npm package. iconic behaviour, honestly.

🧚 Arguments: (the lil positional ones)

  • [PATH] β€” this is the path to your Rust crate, bestie. and if you don't set it? it goes on a lil adventure and searches up the path from your current directory to find one. so thoughtful. so main character. πŸ’–
  • [EXTRA_OPTIONS]... β€” a whole list of extra options you wanna pass straight through to cargo build. yes, plural, you can keep adding them. it's a whole buffet. πŸ“

πŸ‘‘ OPTIONS πŸ‘‘

every single one, fr fr, no skips:

  • -s, --scope <SCOPE> β€” the npm scope to use in package.json, if you have one. no scope? no problem, just don't pass it. πŸ’œ
  • -m, --mode <MODE> β€” sets which steps get run. possible values are: no-install, normal, force. default is normal. (don't be weird about it, normal is a great choice.) ✨
  • --no-typescript β€” by default a *.d.ts file gets generated alongside the generated JS file, but this flag says "no thank you ma'am" and disables generating that TypeScript file. some of us rawdog JS, and that's valid. πŸ’…
  • --weak-refs β€” turns on usage of the JS weak references proposal. 🧚
  • --reference-types β€” turns on usage of WebAssembly reference types. πŸ”₯
  • -t, --target <TARGET> β€” sets the target environment. possible values: bundler, nodejs, web, no-modules, deno. default is bundler. pick your fighter. πŸ‘‘
  • --debug β€” Deprecated. it got renamed to --dev. it's the old name living its lil retirement era. use --dev instead, bestie. 😭
  • --dev β€” makes a development build. enables debug info, disables optimizations. the chill, fast, slightly messy build. πŸ™ˆ
  • --release β€” makes a release build. enables optimizations, disables debug info. the polished, put-together, going-to-production build. πŸ’–
  • --profiling β€” makes a profiling build. enables optimizations and debug info. yes, both. she can do both. it's giving multitasking. ✨
  • --profile <PROFILE> β€” a user-defined profile, passed with the --profile flag. your profile, your rules. πŸŽ€
  • -d, --out-dir <OUT_DIR> β€” sets the output directory using a relative path. default is pkg. 🌸
  • --out-name <OUT_NAME> β€” sets the output file names. defaults to the package name. πŸ¦‹
  • --no-pack β€” the option to not generate a package.json. sometimes you just don't want one. respect. πŸ’…
  • --no-opt β€” the option to skip optimization with wasm-opt. πŸ’œ
  • --panic-unwind β€” buckle up bestie, this one's a whole saga. builds with panic=unwind. it requires the nightly Rust toolchain β€” and it uses -Z build-std to rebuild std with -Cpanic=unwind, so that panics can be caught at FFI boundaries instead of aborting the WebAssembly instance. and if you don't already have them? the nightly toolchain, the rust-src component, and the nightly wasm32-unknown-unknown target all get installed via rustup. it just does that. it's got main character energy fr. πŸ”₯
  • -h, --help β€” print help. the classic. the icon. the "when in doubt" move. ✨
⚠️ heads up bestie: --debug is deprecated and got renamed to --dev. and --panic-unwind is out here demanding nightly β€” no nightly, no service. live your truth, but know what you're signing up for. πŸ’–

and that's the whole page!! now go forth and build something cute. mwah. πŸ’œ


sign-off time, my little gremlins: this was wasm-pack build version 0.15.0+ds, dated June 2026, filed under the name WASM-PACK(1). love her, respect her, man her again whenever you forget a flag. periodt. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from