Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
tree-sitter-swift WASM (vendored)
This directory ships a pre-built tree-sitter-swift.wasm because the published
[email protected] npm package ships native .node prebuilds and C
sources, but no WASM artifact.
Why vendored
The core analyzer loads grammars through [email protected], which expects
modern dylink.0 WASM modules. Vendoring the Swift grammar keeps runtime
loading consistent with the Dart grammar package in this workspace and avoids a
runtime dependency on a third-party bundle of many unrelated grammars.
How to rebuild
git clone https://github.com/alex-pinkus/tree-sitter-swift.git /tmp/tree-sitter-swift
cd /tmp/tree-sitter-swift
git checkout d42e9bb24646c4dbf1f5ec476a35b96d817da448
npx -y [email protected] build --wasm --output tree-sitter-swift.wasm .
cp tree-sitter-swift.wasm \
/path/to/understand-anything-plugin/packages/tree-sitter-swift-wasm/
Verify the resulting wasm:
node -e "const b=require('fs').readFileSync('tree-sitter-swift.wasm'); console.log(b.toString('latin1').includes('dylink.0'))"
# Expect: true
Provenance
- Grammar source:
alex-pinkus/tree-sitter-swiftat commitd42e9bb24646c4dbf1f5ec476a35b96d817da448, recorded in.swift-grammar-pin. - Current artifact source: extracted from
@plurnk/[email protected], which vendors a compatibletree-sitter-swift.wasmfor this grammar revision. - The checked-in artifact was verified to load with this repository's
[email protected]runtime and to contain thedylink.0custom section. - License: MIT, inherited from
tree-sitter-swift.
When to remove this package
If tree-sitter-swift publishes a refreshed npm package with a compatible
tree-sitter-swift.wasm, this workspace package can be deleted and
@understand-anything/core can depend directly on the upstream grammar package.