Open andybalaam opened 2 days ago
possibly we can work around this by post-processing the generated typescript, but that is clearly an unsatisfactory solution :/
I strongly suspect that the dependency update causing the change is the wasm-bindgen
dependency itself. This looks like a similar issue: https://github.com/rustwasm/wasm-bindgen/issues/4234
Ah, it looks like this is caused by https://github.com/rustwasm/wasm-bindgen/issues/4207 or at least very closely related.
So we should stay on wasm-bindgen v0.2.93 until https://github.com/rustwasm/wasm-bindgen/issues/4207 is fixed.
If I am using Rust 1.82.0 and run a
cargo update
then I get this error:Reading around this, it looks like some change in the dependencies causes this version of rustc¹ to use bulk memory operations in the generated wasm.
¹ Before I upgraded to rustc 1.82.0 it all actually built fine with no errors, but staying on an old rustc version doesn't seem viable.
If I enable bulk memory operations in wasm-opt by doing:
Then the build works OK but linting the generated TypeScript fails:
It looks like this lint is correctly identifying invalid/incomplete TypeScript being emitted (by wasm-bindgen?).
So we are unable to update our dependencies until we can fix this problem.