fix(docs): final updates before 0.26.1

- Indicate where xtask looks for wasi-sdk
- Indicate where `build --wasm` looks for and downloads wasi-sdk binary
  to
- Mark native runtime as experimental, describe limitations
- Note ABI 13 support limitations
- Mention that `test --wasm` and `parse --wasm` require
  `--features=wasm` build
This commit is contained in:
Will Lillis 2025-11-20 01:10:44 -05:00 committed by Christian Clason
parent 0d656de98b
commit e92a7803eb
6 changed files with 34 additions and 11 deletions

View file

@ -18,7 +18,9 @@ will attempt to build the parser in the current working directory.
### `-w/--wasm`
Compile the parser as a Wasm module.
Compile the parser as a Wasm module. This command looks for the [Wasi SDK][wasi_sdk] indicated by the `TREE_SITTER_WASI_SDK_PATH`
environment variable. If you don't have the binary, the CLI will attempt to download it for you to `<CACHE_DIR>/tree-sitter/wasi-sdk/`, where
`<CACHE_DIR>` is resolved according to the [XDG base directory][XDG] or Window's [Known_Folder_Locations][Known_Folder].
### `-o/--output`
@ -36,3 +38,7 @@ in the external scanner does so using their allocator.
### `-0/--debug`
Compile the parser with debug flags enabled. This is useful when debugging issues that require a debugger like `gdb` or `lldb`.
[Known_Folder]: https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid
[wasi_sdk]: https://github.com/WebAssembly/wasi-sdk
[XDG]: https://specifications.freedesktop.org/basedir/latest/

View file

@ -52,8 +52,9 @@ Report conflicts in a JSON format.
The path to the JavaScript runtime executable to use when generating the parser. The default is `node`.
Note that you can also set this with `TREE_SITTER_JS_RUNTIME`. Starting from version 0.26.0, you can
also pass in `native` to use the native QuickJS runtime that comes bundled with the CLI. This avoids
the dependency on a JavaScript runtime entirely.
also pass in `native` to use the experimental native QuickJS runtime that comes bundled with the CLI.
This avoids the dependency on a JavaScript runtime entirely. The native QuickJS runtime is compatible
with ESM as well as with CommonJS in strict mode. If your grammar depends on `npm` to install dependencies such as base grammars, the native runtime can be used *after* running `npm install`.
### `--disable-optimization`

View file

@ -45,7 +45,7 @@ The graphs are constructed with [graphviz dot][dot], and the output is written t
### `--wasm`
Compile and run the parser as a Wasm module.
Compile and run the parser as a Wasm module (only if the tree-sitter CLI was built with `--features=wasm`).
### `--dot`

View file

@ -55,7 +55,7 @@ The graphs are constructed with [graphviz dot][dot], and the output is written t
### `--wasm`
Compile and run the parser as a Wasm module.
Compile and run the parser as a Wasm module (only if the tree-sitter CLI was built with `--features=wasm`).
### `--open-log`