rapier.js
rapier.js copied to clipboard
Rollup hangs indefinitely after a successful build of rapier-compat
For some reasons, Rollup hangs indefinitely after a successful build of rapier-compat (cd compat; npm run build;).
This makes the release process annoying as I have to manually kill the task. And this prevents the CI from terminating.
Hmm, trying to compile Wasm for 0.7.2 (non-compat) and it gives me compilation errors. If the compat version compiles it and embeds as string, maybe this could be related.

On screenshot I am trying to first instantiateStreaming(), which fails and falls back to compile(), which fails too.
It looks like the hang is caused by https://github.com/rollup/rollup/issues/4213 which is itself caused by a bug in TypeScript. The TypeScript bug has been merged: https://github.com/microsoft/TypeScript/pull/45642 but not released yet. So we either need to wait for a new TypeScript release, or we need to downgrade it to an older version (TypeScript 4.3.5 appears to work).
https://github.com/wasm-tool/rollup-plugin-rust
use this plugin directly, you can even just import from Cargo.toml