CompileErrror when initializing the wasm driver
adomasven opened this issue · comments
CompileError: wasm validation error: at offset 7591: can't import/export mutable globals in the MVP
I am getting the above error when initializing the wasm driver with the latest canary build.
This is a runtime thing, which I could possibly fix by not running wasm-opt at all I think. This is in Zotero/Firefox ESR, right?
Yes. I'm using the same initialization code that worked 2 months ago.
Ok, got it, pushing a new canary in a minute. It:
- Disabled wasm-opt, which was emitting mutable globals
- Pinned to Rust 1.43 on CI, I believe the rust compiler might have started emitting them on its own recently. Not that you should care, just for documenting this stuff.
I tweaked some things with the init code, not that different but altogether it will work once you npm install @citeproc-rs/wasm@canary
again after that PR's merged. Here are my changes:
Ah, no, this hasn't done it.
Confirm, that fixed it. That's ESR life I suppose. You should see the breaking JS API changes to string ids making things not work, that's how you know it's real this time.
My next thing is to avoid rustwasm/wasm-bindgen#1963 and hopefully make sure #78 doesn't rear its head with a custom JS Result type (i.e. a slightly annoying but overall fine .unwrap()
after each API call), so there's a little more pain to go with that, but then you'll also get the improved init/locales/dependent styles/style metadata stuff I've been working on.