agency-webassembly-engineer

Compiles Rust, C/C++, and Go to WebAssembly with optimized JS interop and WASI sandboxing.

Updated Jul 14, 2026
One-click install
npx skills add https://github.com/AI-Staffing-Solution-Consultants-LLC/core-engineering-system --skill agency-webassembly-engineer-ai-staffing-solution-consultants-llc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agency-webassembly-engineer
Source: https://github.com/AI-Staffing-Solution-Consultants-LLC/core-engineering-system/tree/main/.agents/skills/engineering-webassembly-engineer
Command: npx skills add https://github.com/AI-Staffing-Solution-Consultants-LLC/core-engineering-system --skill agency-webassembly-engineer-ai-staffing-solution-consultants-llc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams porting code to WebAssembly often discover the result is slower than the JavaScript it replaced, bloated in size, or insecure on the server. This Skill provides expert guidance on deciding whether a workload belongs in Wasm at all, designing the JS↔Wasm boundary correctly, and shipping small, fast, sandboxed modules in the browser and on server runtimes. ## Core Features & Use Cases - Boundary-First Design: Eliminates per-element JS↔Wasm call overhead by batching data into buffers, using memory views, and keeping hot loops inside the module. - Toolchain & Language Guidance: Covers Rust (wasm-bindgen), C/C++ (Emscripten), and Go, with honest assessment of each language's runtime and binary-size tax. - Server-Side WASI Sandboxing: Runs untrusted plugins on Wasmtime/Wasmer with least-privilege capability grants and the component model for typed interfaces. - Size & Performance Tuning: Applies wasm-opt, dead-code elimination, streaming compilation, SIMD/threads with feature detection, and linear-memory management. - Use Case: A team wants to speed up an image-processing pipeline in the browser. The Skill first benchmarks the JS baseline, then ports the codec kernel to Rust/Wasm with a single batched boundary crossing, shrinks the module under a size budget, and ships it with streaming compilation. ## Quick Start Ask the WebAssembly engineer to evaluate whether your workload fits Wasm and to design a batched JS-to-Wasm boundary for your hot loop.

Frequently Asked Questions about agency-webassembly-engineer

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

FAQPage Schema
How do I compile Rust to WebAssembly for the browser?▼

Use wasm-bindgen with wasm-pack to compile Rust to Wasm and generate JS bindings. Expose coarse-grained functions that accept buffers rather than per-element calls, and build with opt-level z, LTO, and panic=abort to keep the binary small.

When should I use WebAssembly instead of JavaScript?▼

WebAssembly wins for compute-bound, boundary-light workloads like codecs, compression, physics, and ML inference kernels. It usually loses for DOM manipulation or chatty logic where marshalling cost across the JS boundary dwarfs the compute savings.

Why is my WebAssembly code slower than JavaScript?▼

The most common cause is crossing the JS↔Wasm boundary thousands of times per frame with small calls. Batch data into typed-array views over Wasm linear memory, move the loop inside the module, and measure marshalling time separately from in-module compute.

Can WebAssembly run untrusted code safely on a server?▼

Yes, WASI runtimes like Wasmtime and Wasmer provide deny-by-default sandboxing where the module has no ambient filesystem or network access. The host grants exactly the capabilities needed, such as one preopened directory, making it suitable for third-party plugin systems.

How do I reduce WebAssembly binary size?▼

Run wasm-opt with -Oz, strip-debug, and dead-code elimination, and configure the Rust release profile with opt-level z, LTO, and strip. Serve the module with streaming compilation via instantiateStreaming and track size in CI against a budget.

Does WebAssembly support SIMD and threads in all browsers?▼

No, SIMD, threads via SharedArrayBuffer, and the component model are not universally available, and threads require cross-origin isolation headers. Feature-detect at runtime and provide a fallback path rather than shipping a module that fails to instantiate.