WASM-PACK(1)
π 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 tocargo 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 inpackage.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 isnormal. (don't be weird about it,normalis a great choice.) β¨--no-typescriptβ by default a*.d.tsfile 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 isbundler. pick your fighter. π--debugβ Deprecated. it got renamed to--dev. it's the old name living its lil retirement era. use--devinstead, 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--profileflag. your profile, your rules. π-d,--out-dir <OUT_DIR>β sets the output directory using a relative path. default ispkg. πΈ--out-name <OUT_NAME>β sets the output file names. defaults to the package name. π¦--no-packβ the option to not generate apackage.json. sometimes you just don't want one. respect. π--no-optβ the option to skip optimization withwasm-opt. π--panic-unwindβ buckle up bestie, this one's a whole saga. builds withpanic=unwind. it requires the nightly Rust toolchain β and it uses-Z build-stdto rebuildstdwith-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, therust-srccomponent, and the nightlywasm32-unknown-unknowntarget all get installed viarustup. 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:--debugis deprecated and got renamed to--dev. and--panic-unwindis 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
- ubuntu stonking: wasm-pack 0.15.0+ds-2 Β· Apache-2.0 OR MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms