svelte-wasi-with-rust icon indicating copy to clipboard operation
svelte-wasi-with-rust copied to clipboard

can't run this project

Open passchaos opened this issue 3 years ago • 3 comments

When i run yarn dev-wasm-bindgen, it failed with message:

thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `2`,
 right: `1`', /home/passchaos/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/wasm-bindgen-cli-support-0.2.70/src/js/binding.rs:166:9

version info: wasm-bindgen 0.2.70 wasm-bindgen-cli 0.2.70

passchaos avatar Feb 26 '21 11:02 passchaos

Hey, thanks for trying this out and reporting the problem. The following works here:

git clone https://github.com/happybeing/svelte-wasi-with-rust
cd svelte-wasi-with-rust
yarn && yarn dev-wasm-bindgen

The issue is probably due to a difference in your setup, so you will need to supply information which allows me to compare our environments (OS, versions of prerequisites etc.). I'm only able to test on Ubuntu, but if you provide fuller information others may be able to help if you are using a different OS.

happybeing avatar Feb 26 '21 13:02 happybeing

I found the cause of the problem. Please refer to this link: https://github.com/rustwasm/wasm-bindgen/issues/2471

passchaos avatar Feb 28 '21 08:02 passchaos

Thanks for the update. I'm also using wasm-bindgen 0.2.70 and as noted I don't get an error. The issue is probably your using Rustc Nightly. Suggest you try rustc 1.47.0 (18bf6b4f0 2020-10-07).

happybeing avatar Feb 28 '21 15:02 happybeing