-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebAssembly build error #622
Comments
It's difficult to determine what's going on here, but this line
Implies that perhaps too much code was being generated (although I'm not sure why that would be the case). Are you compiling with optimisations enabled? |
I just use command: |
This seems much more likely to be an issue with wasm-pack than chumsky, I'd recommend asking on the relevant GitHub repo instead. |
Try building in release and see if the issue persists. In a project that I was working on, I found that the debug build included type information that was larger than some limitation in the wasm parser. When I built in release mode, that type information wasn't included, and so it worked. Its obviously not ideal, but at least its a workaround until a final solution is implemented. |
An alternative there might be to just skip including that debug information:
Obviously this is very non-ideal. I can't think of a good way to strip that information for specifically chumsky code though. You can declare crate-specific debug settings, but since chumsky is basically all generic code, it'll get inlined at the use site and probably won't be counted as code for chumsky-the-crate any longer. |
I had a similar issue on a different project. Installing LLVM from brew and making sure brew's LLVM was called (by updating PATH) instead of using Xcode's worked for me.
versus:
|
The reason for this error is caused by the stacker library, |
|
Yeh, It can be resolved through the following dependencies
[package]
name = "demo"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
chumsky = { version = "1.0.0-alpha.6", features = ["std"], default-features = false }
|
build log:
The text was updated successfully, but these errors were encountered: