Request: make WASM file available to download
Closed this issue · 7 comments
It would be great if there was a wasm file to download as in https://github.com/tree-sitter/tree-sitter-javascript. I've tried building my own but got errors (bad magic number). Having it in a central place would also mean we could see which version of tree-sitter it has been compiled against.
I will have to probably write some github actions for that. Its some work though. You will probably have to wait. But that being said. I will push the next update with a WASM file for now.
Here's an example that gives me an error: https://github.com/user896724/wasm
The tree-sitter-svelte.wasm
file was created like this:
npx tree-sitter build-wasm --docker node_modules/tree-sitter-svelte/
Can you give me the error message?
Here's what I get in the console:
Uncaught (in promise) TypeError: Cannot read property 'apply' of undefined
at e.<computed> (tree-sitter.js:1)
at za_New (<anonymous>:wasm-function[14]:0xe01)
at tree_sitter_svelte_external_scanner_create (<anonymous>:wasm-function[71]:0x2c3f)
at ts_parser_set_language (tree-sitter.wasm:0x21894)
at Object.Module._ts_parser_set_language (tree-sitter.js:1)
at Parser.setLanguage (tree-sitter.js:1)
at (index):13
Strange error. Its coming from the C side (za_New
is a custom memory allocator). I will have to look more into this.
Next release you will get the Wasm file in the root directory.
Check root folder