Skip to content

cdylib for the target wasm32-wasi #64187

Closed

Description

@yurydelendik

Problem
cannot produce cdylib for the target wasm32-wasi

Steps

  1. Add "cdylib" to the Cargo.toml, e.g.
    cargo new check-wasi && cd check-wasi
    echo "[lib]" >> Cargo.toml 
    echo "crate-type = [\"cdylib\"]" >> Cargo.toml
    
  2. Build using
    cargo +nightly build --target=wasm32-wasi
    
  3. Observe
    error: cannot produce cdylib for `check-wasi v0.1.0` as the target `wasm32-wasi` does not support these crate types
    

Possible Solution(s)
Allow cdylib for all wasm32-* targets: it's available for wasm32-unknown-unknown and is required by wasm-pack

Activity

  1. alexcrichton commented on Sep 5, 2019

    @alexcrichton
    Member

    I've transferred this to the rust-lang/rust repository after debugging it and am working on a fix locally (the fix is here in the compiler, not in Cargo)

  2. added a commit that references this issue on Sep 5, 2019
    bb9d3be
  3. added a commit that references this issue on Sep 10, 2019
    71f3fbc
  4. added
    O-wasmTarget: WASM (WebAssembly), http://webassembly.org/
    C-feature-acceptedCategory: A feature request that has been accepted pending implementation.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Sep 10, 2019
  5. added 2 commits that reference this issue on Sep 10, 2019
    3d06207
    751aec8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-acceptedCategory: A feature request that has been accepted pending implementation.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions