-
Notifications
You must be signed in to change notification settings - Fork 710
Labels
Description
This is a followed up of #832.
With the hard work of @Brooooooklyn, we now are ok to compile to wasi successfully and run wasi rolldown successfully in some simple cases.
However, there are still a lot of hard and wired problems to be solved.
As #894 showed
- In unbuntu
- The wasi rolldown could compile the basic example successfully
- Can't pass tests due to being hang while running
- In windows/macos
Unsupported Operationerror was throwed in rust even in the basic example case
Other problems
rolldown/.github/workflows/reusable-wasi-test.yml
Lines 43 to 47 in 7b64957
| # Node.js wasi runtime has bug with `std::fs::read_link` | |
| run: | | |
| touch .npmrc | |
| echo "node-linker=hoisted" >> .npmrc | |
| pnpm install |
rolldown/crates/rolldown_binding/src/bundler.rs
Lines 35 to 37 in 7b64957
| #[cfg(target_family = "wasm")] | |
| // if we don't perform this warmup, the following call to `std::fs` will stuck | |
| if let Ok(_) = std::fs::metadata(std::env::current_dir()?) {}; |
Update: oh no! When set RUST_LOG=trace, pnpm --filter=@example/basic build success, fails if unset RUST_LOG, so strange! #898 (comment)
- Running a playground on the browser is blocked by: tokio: enable rt-multi-thread for wasm32-wasi-preview1-threads target tokio-rs/tokio#6510. Because the
fspolyfill crosses the main thread/ web worker is usingAtomic.wait, anystd::fsoperations within theasync fnwill blocktokiocurrent_threadruntime forever.
Reactions are currently unavailable