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

failed to resolve: could not find wasi in os could not find wasi in os #85

Open
carrycooldude opened this issue May 22, 2023 · 8 comments

Comments

@carrycooldude
Copy link

I don't know why the error is coming, I am working on LFX Assignment but facing this issue...

[{
	"resource": "/home/kartikey/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmedge_wasi_socket-0.4.3/src/lib.rs",
	"owner": "rustc",
	"code": {
		"value": "Click for full compiler diagnostic",
		"target": {
			"$mid": 1,
			"external": "rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B0%5D?0#file%3A%2F%2F%2Fhome%2Fkartikey%2F.cargo%2Fregistry%2Fsrc%2Fgithub.com-1ecc6299db9ec823%2Fwasmedge_wasi_socket-0.4.3%2Fsrc%2Flib.rs",
			"path": "/diagnostic message [0]",
			"scheme": "rust-analyzer-diagnostics-view",
			"query": "0",
			"fragment": "file:///home/kartikey/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmedge_wasi_socket-0.4.3/src/lib.rs"
		}
	},
	"severity": 8,
	"message": "failed to resolve: could not find `wasi` in `os`\ncould not find `wasi` in `os`",
	"source": "rustc",
	"startLineNumber": 12,
	"startColumn": 9,
	"endLineNumber": 12,
	"endColumn": 13
}]

Screenshot from 2023-05-23 01-16-36

@juntao
Copy link
Member

juntao commented May 22, 2023

I believe you need to configure the rust toolchain to use wasm32-wasi

https://wasmedge.org/docs/develop/rust/setup

@carrycooldude
Copy link
Author

carrycooldude commented May 22, 2023

I already did that @juntao

@CreponneKarim
Copy link

@carrycooldude so have you found a solution to that ?

@carrycooldude
Copy link
Author

@carrycooldude so have you found a solution to that ?

Nope not till now

@andylau004
Copy link

@carrycooldude
Has this problem been solved?

I have the same problem

when I use wasmedge_wasi_socket in my wasm lib project (rust)...

image

image

@carrycooldude
Copy link
Author

@carrycooldude
Has this problem been solved?

I have the same problem

when I use wasmedge_wasi_socket in my wasm lib project (rust)...

image

image

Nope , not till now

@andylau004
Copy link

This library is no longer used,,change other library instead of
wasmedge_wasi_socket

Now I use gloo_net::websocket::futures::WebSocket and futures::{SinkExt, StreamExt};

that work well.

@hydai
Copy link
Member

hydai commented Nov 10, 2024

Hi @andylau004 and @carrycooldude

I cannot reproduce your issues since we have several CIs for verifying the behavior. I also run the examples inside this crate without any issues.
Could you please provide more context about your problem?
Are you using wasm32-wasi or wasm32-wasip1 as the target?

Here is my environment:

  • rustc 1.82.0 (f6e511eec 2024-10-15)
  • wasmedge_wasi_socket 0.5.5
  • compiled command: cargo build --target wasm32-wasip1 --release

logs:

    Updating crates.io index
     Locking 26 packages to latest compatible versions
      Adding quick-error v1.2.3 (latest: v2.0.1)
      Adding syn v1.0.109 (latest: v2.0.87)
      Adding trackable v0.2.24 (latest: v1.3.0)
      Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.13.3+wasi-0.2.2)
      Adding zerocopy v0.7.35 (latest: v0.8.9)
      Adding zerocopy-derive v0.7.35 (latest: v0.8.9)
  Downloaded trackable_derive v1.0.0
  Downloaded ppv-lite86 v0.2.20
  Downloaded trackable v1.3.0
  Downloaded bytecodec v0.4.15
  Downloaded zerocopy-derive v0.7.35
  Downloaded trackable v0.2.24
  Downloaded bytes v1.8.0
  Downloaded zerocopy v0.7.35
  Downloaded syn v2.0.87
  Downloaded libc v0.2.162
  Downloaded httpcodec v0.2.3
  Downloaded 11 crates (1.4 MB) in 2.78s
   Compiling proc-macro2 v1.0.89
   Compiling unicode-ident v1.0.13
   Compiling byteorder v1.5.0
   Compiling syn v1.0.109
   Compiling cfg-if v1.0.0
   Compiling wasi v0.11.0+wasi-snapshot-preview1
   Compiling libc v0.2.162
   Compiling quick-error v1.2.3
   Compiling bytes v1.8.0
   Compiling getrandom v0.2.15
   Compiling dns-parser v0.8.0
   Compiling rand_core v0.6.4
   Compiling quote v1.0.37
   Compiling syn v2.0.87
   Compiling trackable_derive v1.0.0
   Compiling zerocopy-derive v0.7.35
   Compiling trackable v1.3.0
   Compiling zerocopy v0.7.35
   Compiling trackable v0.2.24
   Compiling bytecodec v0.4.15
   Compiling ppv-lite86 v0.2.20
   Compiling httpcodec v0.2.3
   Compiling rand_chacha v0.3.1
   Compiling rand v0.8.5
   Compiling wasmedge_wasi_socket v0.5.5 (/Users/hydai/workspace/tmp/wasmedge_wasi_socket)
   Compiling http_server v0.1.0 (/Users/hydai/workspace/tmp/wasmedge_wasi_socket/examples/http_server)
    Finished `release` profile [optimized] target(s) in 16.35s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants