Skip to content

Commit bc7d0ac

Browse files
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 build
1 parent c670b46 commit bc7d0ac

16 files changed

Lines changed: 303 additions & 340 deletions

grammars/tree-sitter-c.wasm

774 KB
Binary file not shown.

grammars/tree-sitter-c_sharp.wasm

3.79 MB
Binary file not shown.

grammars/tree-sitter-cpp.wasm

4.45 MB
Binary file not shown.

grammars/tree-sitter-go.wasm

230 KB
Binary file not shown.

grammars/tree-sitter-java.wasm

420 KB
Binary file not shown.
632 KB
Binary file not shown.

grammars/tree-sitter-python.wasm

465 KB
Binary file not shown.

grammars/tree-sitter-rust.wasm

800 KB
Binary file not shown.

grammars/tree-sitter-tsx.wasm

2.3 MB
Binary file not shown.
2.23 MB
Binary file not shown.

0 commit comments

Comments
 (0)