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

unresolved import libc::c_char when compiled to WASM #9

Open
chaosprint opened this issue Feb 15, 2022 · 1 comment
Open

unresolved import libc::c_char when compiled to WASM #9

chaosprint opened this issue Feb 15, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@chaosprint
Copy link

cargo new js-sandbox-test --lib

Add in cargo.toml:

[dependencies]
js-sandbox = "0.1.6"

Then compile:

cargo build --target wasm32-unknown-unknown --release

Got error:

   Compiling serde_derive v1.0.136
   Compiling futures-macro v0.3.21
   Compiling pin-project-internal v1.0.10
   Compiling rusty_v8 v0.22.3
error[E0432]: unresolved import `libc::c_char`
 --> /Users/chaosprint/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.22.3/src/V8.rs:2:5
  |
2 | use libc::c_char;
  |     ^^^^^^^^^^^^ no `c_char` in the root

error[E0432]: unresolved import `libc::c_int`
 --> /Users/chaosprint/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.22.3/src/V8.rs:3:5
  |
3 | use libc::c_int;
  |     ^^^^^^^^^^^ no `c_int` in the root

For more information about this error, try `rustc --explain E0432`.
@Bromeon Bromeon added the bug Something isn't working label Feb 21, 2023
@Bromeon
Copy link
Owner

Bromeon commented Apr 2, 2023

Does this also appear with the latest release 0.2.0-rc.1?

Also, it looks like this error appears in the upstream crate rusty_v8 (of which 0.22 is heavily outdated). If the problem still appears on latest js-sandbox version and is still originating in upstream, I'd recommend to file an issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants