Closed gushogg-blake closed 4 months ago
I seem to remember something about header files with emscripten - like you were restricted in what standard header files you could use or something. Could this be related? (Also to #116). Comparing to e.g. JavaScript which does work for me:
#include <tree_sitter/parser.h>
#include <cstring>
#include <cwctype>
#include <string>
#include <vector>
vs JavaScript (https://github.com/tree-sitter/tree-sitter-javascript/blob/e3a5149f8bc3a3bf2fe931f05851428a1197e0e6/src/scanner.c):
#include <tree_sitter/parser.h>
#include <wctype.h>
I'm seeing this error when trying to parse using a wasm build:
I've set up a basic repo to reproduce: https://github.com/gushogg-blake/ruby-wasm-test, deployed at https://ruby-wasm-test.vercel.app/.
I built the wasm file using the latest tree-sitter-cli with
npx tree-sitter-cli build-wasm tree-sitter-ruby
.tree-sitter.js
andtree-sitter.wasm
are from the latest version of tree-sitter. I've also tried it with an earlier version and got the same error. Any idea what could be causing this?