WasmEdge / wasmedge_hyper_demo

Lightweight HTTP servers based on hyper / warp frameworks in the WasmEdge Runtime.
77 stars 15 forks source link

Problems running on win #12

Closed enginefuture closed 1 year ago

enginefuture commented 1 year ago

The example of server-warp running on WIN,

 cargo --version
cargo 1.70.0-nightly (15d090969 2023-03-21)
wasmedge.exe .\target\wasm32-wasi\release\wasmedge_warp_server.wasm
thread 'main' panicked at 'error binding to 0.0.0.0:38080: error creating server listener: Function not implemented (os error 52)', C:\Users\xxx\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\warp_wasi-0.3.3\src\server.rs:213:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2023-03-25 22:03:24.514] [error] execution failed: unreachable, Code: 0x89
[2023-03-25 22:03:24.515] [error]     In instruction: unreachable (0x00) , Bytecode offset: 0x001113c4
[2023-03-25 22:03:24.515] [error]     When executing function name: "_start"

if set rustup stable ,build error


 rustup default stable
info: using existing install for 'stable-x86_64-pc-windows-msvc'
info: default toolchain set to 'stable-x86_64-pc-windows-msvc'

  stable-x86_64-pc-windows-msvc unchanged - rustc 1.68.0 (2c8cc3432 2023-03-06)

 rustup target add wasm32-wasi
info: component 'rust-std' for target 'wasm32-wasi' is up to date
 cargo build --target wasm32-wasi --release
   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling tokio-macros v1.8.2
   Compiling thiserror-impl v1.0.40
   Compiling errno v0.2.8
   Compiling hashbrown v0.12.3
   Compiling futures-channel v0.3.27
   Compiling mime v0.3.17
   Compiling url v2.3.1
   Compiling mime_guess v2.0.4
   Compiling serde v1.0.158
   Compiling unicase v2.6.0
   Compiling try-lock v0.2.4
   Compiling safemem v0.3.3
   Compiling ryu v1.0.13
   Compiling fastrand v1.9.0
error[E0554]: `#![feature]` may not be used on the stable release channel
  --> C:\Users\tab\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\errno-0.2.8\src\lib.rs:20:33
   |
20 | #![cfg_attr(target_os = "wasi", feature(thread_local))]
   |                                 ^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0554`.
error: could not compile `errno` due to previous error
warning: build failed, waiting for other jobs to finish...