Skip to content

Error targeting wasm32-unknown-unknown #42

Closed
@dsherret

Description

@dsherret

Thanks for adding wasm support as this library was the only one that didn't allow using the Rust compiler in wasm. It seems though that it only works for wasm32-wasi and not wasm32-unknown-unknown. I'm not sure what the fix is.

Reproduction steps:

git clone https://github.com/rust-lang/stacker.git
cd stacker
cargo build --release --target wasm32-unknown-unknown

Outputs:

Compiling stacker v0.1.10 (/mnt/v/stacker)
error[E0412]: cannot find type `c_void` in crate `libc`
   --> src/lib.rs:121:35
    |
121 |             new_stack: *mut libc::c_void,
    |                                   ^^^^^^ not found in `libc`
    |
help: possible candidates are found in other modules, you can import them into scope
    |
35  | use std::ffi::c_void;
    |
35  | use std::os::raw::c_void;
    |

error: aborting due to previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions