Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install wasm-bindgen-cli on github CI workflow #4422

Open
gents83 opened this issue Feb 1, 2025 · 0 comments
Open

Unable to install wasm-bindgen-cli on github CI workflow #4422

gents83 opened this issue Feb 1, 2025 · 0 comments
Labels

Comments

@gents83
Copy link
Contributor

gents83 commented Feb 1, 2025

I'm trying to install wasm-bindgen-cli on my workflow file
https://github.com/gents83/INOX/actions/runs/13087936821/workflow

cargo install -f wasm-bindgen-cli
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
env:
CARGO_TERM_COLOR: always
CARGO_TARGET_DIR: ./crates/target
RUSTFLAGS: --cfg getrandom_backend="wasm_js" --cfg=web_sys_unstable_apis
LLVM_PATH: D:\a_temp\llvm
LD_LIBRARY_PATH: D:\a_temp\llvm\lib;
DYLD_LIBRARY_PATH: D:\a_temp\llvm\lib;undefined
LIBCLANG_PATH: D:\a_temp\llvm\bin\

produce this error:

error: The "wasm_js" backend requires the `wasm_js` feature for `getrandom`. For more information see: https://docs.rs/getrandom/#webassembly-support
  --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\getrandom-0.3.1\src\backends.rs:28:17
   |
28 | /                 compile_error!(
29 | |                     "The \"wasm_js\" backend requires the `wasm_js` feature \
30 | |                     for `getrandom`. For more information see: \
31 | |                     https://docs.rs/getrandom/#webassembly-support"
32 | |                 );
   | |_________________^
error[E0425]: cannot find function `fill_inner` in module `backends`
  --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\getrandom-0.3.1\src\lib.rs:98:19
   |
98 |         backends::fill_inner(dest)?;
   |                   ^^^^^^^^^^ not found in `backends`
error[E0425]: cannot find function `inner_u32` in module `backends`
   --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\getrandom-0.3.1\src\lib.rs:127:15
    |
127 |     backends::inner_u32()
    |               ^^^^^^^^^ not found in `backends`
    |
help: consider importing this function
    |
32  + use crate::util::inner_u32;
    |
help: if you import `inner_u32`, refer to it directly
    |
127 -     backends::inner_u32()
127 +     inner_u32()
    |
error[E0425]: cannot find function `inner_u64` in module `backends`
   --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\getrandom-0.3.1\src\lib.rs:141:15
    |
141 |     backends::inner_u64()
    |               ^^^^^^^^^ not found in `backends`
    |
help: consider importing this function
    |
32  + use crate::util::inner_u64;
    |
help: if you import `inner_u64`, refer to it directly
    |
141 -     backends::inner_u64()
141 +     inner_u64()
    |
For more information about this error, try `rustc --explain E0425`.
error: could not compile `getrandom` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `wasm-bindgen-cli v0.2.100`, intermediate artifacts can be found at `D:\a\INOX\INOX\./crates/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

I've already tried setting this into the env, without success :

RUSTFLAGS: '--cfg getrandom_backend="wasm_js" --cfg=web_sys_unstable_apis' # required for wasmbindgen to work

@gents83 gents83 added the bug label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant