Commit bc7d0ac
committed
Migrate tree-sitter to WASM for cross-platform compatibility
Replace native tree-sitter with web-tree-sitter (WASM) to eliminate
native module compilation on first run. This is Phase 1 of enabling
zero-install binary distribution.
Changes:
- Remove 9 native tree-sitter packages, add web-tree-sitter
- Add tree-sitter-wasms devDep for pre-built WASM grammars
- Create wasm-loader.ts for async WASM initialization and caching
- Update languages.ts with wasmPath for each language config
- Split TS/TSX and JS/JSX into separate configs, add C language
- Add tree.delete() for proper WASM memory cleanup
- Add scripts/copy-grammars.js to bundle WASM files during build1 parent c670b46 commit bc7d0ac
16 files changed
Lines changed: 303 additions & 340 deletions
File tree
- grammars
- scripts
- src/chunker
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments