rust-wasm-build

Build kham-wasm for WebAssembly targets using wasm-pack and wasm-bindgen.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/preedep/kham --skill rust-wasm-build
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-wasm-build
Source: https://github.com/preedep/kham/tree/main/.claude/skills/rust-wasm-build
Command: npx skills add https://github.com/preedep/kham --skill rust-wasm-build

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build kham-wasm for WebAssembly targets, enabling browser and Node.js environments with optimized bindings and a portable runtime.

Core Features & Use Cases

  • Cross-target wasm builds using wasm-pack for web, nodejs, and bundler workflows
  • Proper wasm-bindgen bindings and JS glue for smooth integration
  • Guidance on toolchain setup, cargo configuration, and packaging for npm

Quick Start

Run wasm-pack build kham-wasm --target web --release to generate the web-ready package.

Frequently Asked Questions about rust-wasm-build

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Rust project for WebAssembly using wasm-pack?

To build a Rust project for WebAssembly, run wasm-pack build with your target environment and release profile to generate optimized bindings and a portable runtime. This Skill guides the cargo configuration and wasm-bindgen setup required for deterministic, compact outputs.

What's the best way to package Rust WebAssembly for npm?

Packaging Rust WebAssembly for npm involves using wasm-pack to generate the web-ready package with proper JS glue. This Skill specifies the recommended build profiles and packaging steps to ensure smooth integration for browser, Node.js, or bundler workflows.

Do I need wasm-bindgen to compile Rust to WebAssembly?

Yes, you need wasm-bindgen to compile Rust to WebAssembly when generating JavaScript glue for browser and Node.js environments. This Skill guides the proper wasm-bindgen setup to ensure smooth integration and cross-target compatibility.

Does wasm-pack support different build targets like web and Node.js?

Yes, wasm-pack supports different build targets like web, nodejs, and bundler workflows for WebAssembly. This Skill guides the setup, dependencies, and build commands applicable to developers packaging kham-wasm for these varied environments.

Why does my Rust WebAssembly build output large files?

Your Rust WebAssembly build outputs large files when not using the recommended build profiles for deterministic, compact outputs. This Skill specifies the required cargo configurations and release profile settings to optimize your build size.