Skip to main content

build_wasm

Function build_wasm 

Source
pub async fn build_wasm(args: &ModeArgs) -> Result<(), EuvError>
Expand description

Runs wasm-pack build for the target crate.

All arguments in args.wasm_pack_args are transparently forwarded to wasm-pack build. If --out-dir is not specified by the user, --out-dir {www_dir}/pkg is automatically injected so that build artifacts are placed inside the www directory served by the development server.

§Arguments

  • &ModeArgs - The CLI arguments containing crate_path, www_dir, and wasm_pack_args.

§Returns

  • Result<(), EuvError> - Indicates success or failure of the wasm-pack build.