/tree-sitter-wasi-web

Example setup for compiling Rust code that depends on an unmodified tree-sitter crate to the web via WebAssembly (and WASI).

Primary LanguageRust

Example setup for compiling Rust code that depends on an unmodified tree-sitter crate to the web via WebAssembly (and WASI).

https://agentcooper.github.io/tree-sitter-wasi-web/

Install

Install WASI SDK to /opt/wasi-sdk.

Run (web)

Run make web-start to start a local dev server.

Or create web/dist directory ready for use with any static web server:

make web-build
python3 -m http.server -d web/dist

Run (local)

cargo run