wasm-interop

Community

Resolve JS↔WASM interop bugs in brepjs kernels.

Authorandymai
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill eliminates hours of frustrating debugging for common low-level issues that occur when working across the JavaScript and WebAssembly boundary in the brepjs CAD library, including broken enum comparisons, garbage mesh data, detached ArrayBuffers, and kernel initialization failures specific to Emscripten's WASM integration.

Core Features & Use Cases

  • Emscripten enum handling: Fixes silent failures where OCCT enum values are compared incorrectly or returned as unexpected object types instead of usable numbers.
  • WASM heap safety: Prevents stale heap views, detached buffers, and corrupted geometry data by enforcing correct typed array read and copy patterns for growing WASM linear memory.
  • Kernel initialization and build debugging: Resolves issues with missing WASM artifacts, incorrect kernel fallback behavior, broken dynamic imports for optional backends, and misconceptions about multi-threading support in shipped builds.
  • Use Case: If you are editing code in src/kernel/occt/meshOps.ts and seeing garbage mesh vertices after a later WASM operation, or debugging an "enum comparison is always false" error in src/kernel/occt/topologyOps.ts, this Skill provides the exact patterns and fixes to resolve the issue.

Quick Start

Use the wasm-interop skill to debug the "brepjs kernel not initialized" error you are encountering when trying to run brepjs operations in your TypeScript project.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: wasm-interop
Download link: https://github.com/andymai/brepjs/archive/main.zip#wasm-interop

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 536,000+ vetted skills library on demand.