Skip to main content

resolve_out_name

Function resolve_out_name 

Source
pub fn resolve_out_name(args: &ModeArgs) -> String
Expand description

Resolves the output JS filename for HTML generation.

Uses --out-name from wasm-pack args if specified, otherwise reads the crate name from Cargo.toml [package] name field and replaces hyphens with underscores (matching wasm-pack behavior). Appends .js extension to form the complete JS filename.

§Arguments

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

§Returns

  • String - The resolved JS filename with .js extension (e.g. euv_example.js).