You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then trunk build failed to build due to that path not resolving; I created a blank scss file at the top of the repo, adjusted the path to point to it, then tried again:
$ trunk build
2025-02-22T18:58:01.382159Z INFO 🚀 Starting trunk 0.21.7
2025-02-22T18:58:01.431624Z INFO 📦 starting build
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.00s
error: failed to find intrinsics to enable `clone_ref` function
2025-02-22T18:58:01.562214Z ERROR ❌ error
error from build pipeline
Caused by:
0: HTML build pipeline failed (1 errors), showing first
1: error from asset pipeline
2: running wasm-bindgen
3: wasm-bindgen call to executable '[myhome]/.cargo/bin/wasm-bindgen' with args: '["--target=web", "--out-dir=[projectdir]/chip8/target/wasm-bindgen/debug", "--out-name=chip8", "[projectdir]/chip8/target/wasm32-unknown-unknown/debug/chip8.wasm", "--no-typescript"]' returned a bad status: exit status: 1
2025-02-22T18:58:01.562232Z ERROR error from build pipeline
2025-02-22T18:58:01.562235Z INFO 1: HTML build pipeline failed (1 errors), showing first
2025-02-22T18:58:01.562236Z INFO 2: error from asset pipeline
2025-02-22T18:58:01.562238Z INFO 3: running wasm-bindgen
2025-02-22T18:58:01.562239Z INFO 4: wasm-bindgen call to executable '[myhome]/.cargo/bin/wasm-bindgen' with args: '["--target=web", "--out-dir=[projectdir]/chip8/target/wasm-bindgen/debug", "--out-name=chip8", "[projectdir]/chip8/target/wasm32-unknown-unknown/debug/chip8.wasm", "--no-typescript"]' returned a bad status: exit status: 1
FAIL
I'm not sure what's happening here. The trunk build seems to be failing due to a wasm-bindgen failure; I assume this is the error above, whatever that is -- failed to find intrinsics to enable clone_ref function. I have no idea what this means, but considering my rust file is just fn main() {} I'm not sure what to do about it.
Is there more setup to be done here? I tried to follow the hello world guide pretty closely, so I'm not really sure where I could have gone wrong (I did find that target myself, so maybe I did that wrong, I'm not sure).
The text was updated successfully, but these errors were encountered:
I'm going to leave this open in case it's of use to the maintainers but I now think it's a documentation bug; I followed the steps in https://trunkrs.dev/guide/getting-started/project.html and it worked flawlessly. I would suggest moving the content from the guide into the website, or making the website redirect to the guide, or something like that; but I see that there are a number of open issues about that, so it's a known issue.
Anyway let me take the time to say thank you all for the work you do 🙏 I'm thrilled to have it working locally with (comparatively) little effort.
It's a strange issue. I removed all crates from Cargo.toml, except console_error_panic_hook, and then used this in the main:
fnmain(){
console_error_panic_hook::set_once();}
That's enough to make the error disappear. But so is having web_sys in the Cargo.toml, and add a use web_sys; to the main.rs. However, removing the unused use web_sys; from the main.rs makes the error re-appear again.
What I did (following the instructions https://trunkrs.dev/#install as well as possible):
rustup target add wasm32-unknown-unknown
cargo install --locked trunk
cargo install --locked wasm-bindgen-cli
Created a new project:
cargo new chip8
Went into the project. Copied the sample code here into the top of the repo:
Then
trunk build
failed to build due to that path not resolving; I created a blank scss file at the top of the repo, adjusted the path to point to it, then tried again:I'm not sure what's happening here. The trunk build seems to be failing due to a wasm-bindgen failure; I assume this is the error above, whatever that is --
failed to find intrinsics to enable
clone_reffunction
. I have no idea what this means, but considering my rust file is justfn main() {}
I'm not sure what to do about it.Is there more setup to be done here? I tried to follow the hello world guide pretty closely, so I'm not really sure where I could have gone wrong (I did find that target myself, so maybe I did that wrong, I'm not sure).
The text was updated successfully, but these errors were encountered: