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

Wasmtime-wasi fails to build on WASI itself #8688

Closed
aruokhai opened this issue May 23, 2024 · 4 comments
Closed

Wasmtime-wasi fails to build on WASI itself #8688

aruokhai opened this issue May 23, 2024 · 4 comments
Labels
wasmtime:platform-support Related to supporting a new platform in Wasmtime

Comments

@aruokhai
Copy link

Test Case

Building rust crate wasmtime-wasi = "21.0.1" in a project

Steps to Reproduce

  • rustup default stable
  • rustup target add wasm32-wasi
  • cargo build --target wasm32-wasi

Expected Results

To build Without Error

Actual Results

error[E0554]: #![feature] may not be used on the stable release channel --> /home/joshua/.cargo/registry/src/index.crates.io-6f17d22bba15001f/io-extras-0.18.2/src/lib.rs:21:41 | 21 | #![cfg_attr(target_os = "wasi", feature(wasi_ext))] | ^^^^^^^^

Versions and Environment

Wasmtime version or commit: 21.0.1

Operating system: Ubuntu 22.04.3 LTS

Architecture: amd64

cargo: 1.78.0

@aruokhai aruokhai added the bug Incorrect behavior in the current implementation that needs fixing label May 23, 2024
@sunfishcode
Copy link
Member

The wasmtime-wasi crate contains a native-host implementation of WASI, and is not meant to be itself compiled to WASI. Could you say more about what you're looking to do here?

@alexcrichton alexcrichton added wasmtime:platform-support Related to supporting a new platform in Wasmtime and removed bug Incorrect behavior in the current implementation that needs fixing labels May 23, 2024
@alexcrichton alexcrichton changed the title Wasmtime-wasi fails to build Wasmtime-wasi fails to build on WASI itself May 23, 2024
@aruokhai
Copy link
Author

My understanding is that wasmtime-wasi library can be used to call wasi-0.2 api's in a project that is to be complied to WASI. Specifically I want to make use of the Socket api, which tokio doesn't seem to have implemented. If this is not the case, what options do I have .

@bjorn3
Copy link
Contributor

bjorn3 commented May 23, 2024

You are probably looking for the wasi crate. The wasmtime-wasi crate contains the host implementation of wasi when using wasmtime. It is never used as part of your wasm module. The guest (wasm module) side bindings are provided by the wasi crate.

@aruokhai
Copy link
Author

Oh ok, thanks a lot for clearing that up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:platform-support Related to supporting a new platform in Wasmtime
Projects
None yet
Development

No branches or pull requests

4 participants