web-wasm
web-wasm
Purpose
This skill enables the AI to compile and integrate code from Rust, Go, or C into WebAssembly (WASM) for high-performance web applications, using tools like wasm-bindgen, Emscripten, and the WASM Component Model.
When to Use
Use this skill for browser-based tasks requiring speed, such as running simulations, processing large datasets, or porting legacy C/C++ code to the web. Apply it when JavaScript performance is insufficient, or when working with languages like Rust for safe, concurrent code in the browser.
Key Capabilities
- Compile Rust to WASM with wasm-pack, including generating JavaScript bindings via wasm-bindgen.
- Convert C/C++ to WASM using Emscripten, with options for HTML output and memory management.
- Support Go to WASM via TinyGo, enabling lightweight modules.
- Handle WASM Component Model for composing modules, using tools like wasm-tools for interface definitions.
- Optimize for performance with flags like Emscripten's
-s ALLOW_MEMORY_GROWTH=1for dynamic memory.
Usage Patterns
To compile Rust to WASM, first ensure dependencies: install Rust via rustup and wasm-pack via cargo install wasm-pack. In your project directory, add wasm-bindgen to Cargo.toml, write annotated code, then run wasm-pack build --target web --release. For C/C++, install Emscripten SDK, set up with emsdk install latest && emsdk activate latest, then compile files with emcc. Always verify outputs in a browser by loading the generated JS and WASM files.
More from alphaonedev/openclaw-graph
playwright-scraper
Playwright web scraping: dynamic content, auth flows, pagination, data extraction, screenshots
1.4Kgcp-iam
Manages identity and access control for Google Cloud resources using IAM policies and roles.
370humanize-ai-text
AI text humanization: reduce AI-detection patterns, natural phrasing, tone adjustment
260macos-automation
AppleScript, JXA, Shortcuts, Automator, osascript, System Events, accessibility API
173tavily-web-search
Tavily: web search optimized for AI agents, answer synthesis, domain filtering, depth control
154clawflows
OpenClaw workflow automation: multi-step task chains, conditional logic, triggers, schedule
102