Skip to content

Commit

Permalink
Add note about static linking for wasm
Browse files Browse the repository at this point in the history
See #126
  • Loading branch information
MDeiml authored Jan 17, 2024
1 parent 3dfb3aa commit 28aa3ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ These parts are marked as `inline` nodes. Children of those inline nodes should
be excluded from these ranges. For an example implementation see `lib.rs` in
the `bindings` folder.

### Usage with WASM

Unfortunately using this parser with WASM/web-tree-sitter does not work out of the box at the moment. This is because the parser uses some C functions that are not exported by tree-sitter by default. To fix this you can statically link the parser to tree-sitter. See also https://github.com/tree-sitter/tree-sitter/issues/949, https://github.com/MDeiml/tree-sitter-markdown/issues/126, and https://github.com/MDeiml/tree-sitter-markdown/issues/93

[CommonMark Spec]: https://spec.commonmark.org/
[Github flavored markdown]: https://github.github.com/gfm/
[tree-sitter]: https://tree-sitter.github.io/tree-sitter/
Expand Down

0 comments on commit 28aa3ba

Please sign in to comment.