How do I generate a valid WASM file
See original GitHub issueWe need c++14 here but there is no way to pass --std=c++14
to emcc
used by tree-sitter build-wasm
The Makefile mentions a patched version of web-tree-sitter
I’ve tried it but does not solve the issue;
When I use the generated WASM file (with npx tree-sitter build-wasm
) I get:
bad export type for `_ZNSt3__25ctypeIcE2idE`: undefined
I think that is related to build-wasm
not building with c++14 so how was it done here? (Makefile does not specify c++14)
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
WebAssembly.validate() - MDN Web Docs
The WebAssembly.validate() function validates a given typed array of WebAssembly binary code, returning whether the bytes form a valid wasm ...
Read more >WebAssembly - Validation - Tutorialspoint
Let us try one example. Go to Wasm fiddler, which is available at https://wasdk.github.io/WasmFiddle/, enter C code of your choice and down the...
Read more >WASM Tutorial - Marco Selvatici
Once Emscripten is installed, we are ready to create our first WASM app! ... With your previous terminal, move in to the new...
Read more >Build your own WebAssembly Compiler - Scott Logic Blog
These eight bytes form valid WebAssembly (or wasm) module. More typically these would be delivered to the browser as a .wasm file.
Read more >Questions about wasm files generation · Issue #3422 - GitHub
Hi, we are using opa build to generate wasm files. ... Is it true that only one wasm file is needed for all...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, compile web-tree-sitter with the —debug flag.
@FoamScience I ran your setup in a debugger, and this is where the error occured.
I’ve gone into the surrounding code and I’m 80% this will be fixed by adding
memset
in the same way as this pr.There was a point at which it was looking up memset in a dict of the symbols we’ve marked as exported.
Why exactly it manifests in this way, I have no idea…
@wenkokke did you have to do anything special to get the nice
undefined symbol
errors?edit I guess it’s slightly different, it can’t find
memset
, rather than_memset