Closed godronus closed 2 weeks ago
I also tried it, but I encountered the following error:
error[E0658]: use of unstable library feature 'wasi_ext'
--> /home/myname/.cargo/git/checkouts/tokio-2eb71367495b4da5/833de72/tokio/src/fs/open_options.rs:19:5
|
19 | use std::os::wasi::fs::OpenOptionsExt;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #71213 <https://github.com/rust-lang/rust/issues/71213> for more information
= help: add `#![feature(wasi_ext)]` to the crate attributes to enable
I put #![feature(wasi_ext)]
at the top of the file main.rs
, but it didn't work.
Hey @godronus!
To fix this issue, you need a build of the wasix-libc
, available here: https://github.com/wasix-org/wasix-libc
You'd need to clone that repo, run build32.sh
, and feed the resulting sysroot into the WinterJS build process using WASI_SYSROOT=path/to/sysroot
, which is what the error message is complaining about. Make sure you have the latest version of the WASIX toolchain as well, since WinterJS does not compile with older versions.
@MasatoDev which version of the WASIX toolchain do you have? That looks like an error message from an outdated compiler to me.
@Arshia001
Thank you for your reply.🙇♂️
I've already tried with cargo 1.76.
@MasatoDev Try running:
cargo wasix download-toolchain
and retry your build, see if the output changes? Unfortunately, it's not easy to view the WASIX toolchain version, so I don't know if you have the latest version or not. The downloader should find version v2023-11-01.1
and install it for use.
@Arshia001
thank you!
I've already installedx86_64-unknown-linux-gnu_v2023-11-01.1
but it's not working with same error.
@godronus, how did you manage to build winter.js on linux? Please your immediate reply would be deeply appreciated.
Having managed to get winterjs building on Linux, @Arshia001 thanks again.. I am now trying to build it to wasm. My understanding is that I should be able to follow your build.sh script to get this done. i.e.
cargo +wasix build --target wasm32-wasmer-wasi -r
so long as I have the required tooling installed.Any help here would be appreciated... :)