Skip to content

feat: enable watcher in wasi build#8563

Closed
sapphi-red wants to merge 1 commit intomainfrom
03-06-feat_enable_watcher_in_wasi_build
Closed

feat: enable watcher in wasi build#8563
sapphi-red wants to merge 1 commit intomainfrom
03-06-feat_enable_watcher_in_wasi_build

Conversation

@sapphi-red
Copy link
Copy Markdown
Member

@sapphi-red sapphi-red commented Mar 6, 2026

It still doesn't seem to work perfectly, but I confirmed that it sometimes works.
https://stackblitz.com/edit/rolldown-rolldown-starter-stackblitz-bkk1awfz?file=src%2Fentry.js

I get the following panic sometimes:

thread 'tokio-runtime-worker' (1) panicked at library/std/src/sys/thread/wasip1.rs:179:22:
thread::sleep(): unexpected result of poll_oneoff

It might be related to rust-lang/rust@dfbb0fd, but we are blocked by rust-lang/rust#153475 to try 1.94.0 so leaving it for now.

refs #2778, #5051, rolldown/notify#67

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 6, 2026

Deploy Preview for rolldown-rs failed.

Name Link
🔨 Latest commit 7c28b23
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69aa852aab73a40008448bc6

Copy link
Copy Markdown
Member Author


How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 6, 2026

Open in StackBlitz

@rolldown/browser

npm i https://pkg.pr.new/@rolldown/browser@8563

@rolldown/debug

npm i https://pkg.pr.new/@rolldown/debug@8563

@rolldown/pluginutils

npm i https://pkg.pr.new/@rolldown/pluginutils@8563

rolldown

npm i https://pkg.pr.new/rolldown@8563

@rolldown/binding-android-arm64

npm i https://pkg.pr.new/@rolldown/binding-android-arm64@8563

@rolldown/binding-darwin-arm64

npm i https://pkg.pr.new/@rolldown/binding-darwin-arm64@8563

@rolldown/binding-darwin-x64

npm i https://pkg.pr.new/@rolldown/binding-darwin-x64@8563

@rolldown/binding-freebsd-x64

npm i https://pkg.pr.new/@rolldown/binding-freebsd-x64@8563

@rolldown/binding-linux-arm-gnueabihf

npm i https://pkg.pr.new/@rolldown/binding-linux-arm-gnueabihf@8563

@rolldown/binding-linux-arm64-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-arm64-gnu@8563

@rolldown/binding-linux-arm64-musl

npm i https://pkg.pr.new/@rolldown/binding-linux-arm64-musl@8563

@rolldown/binding-linux-ppc64-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-ppc64-gnu@8563

@rolldown/binding-linux-s390x-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-s390x-gnu@8563

@rolldown/binding-linux-x64-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-x64-gnu@8563

@rolldown/binding-linux-x64-musl

npm i https://pkg.pr.new/@rolldown/binding-linux-x64-musl@8563

@rolldown/binding-openharmony-arm64

npm i https://pkg.pr.new/@rolldown/binding-openharmony-arm64@8563

@rolldown/binding-wasm32-wasi

npm i https://pkg.pr.new/@rolldown/binding-wasm32-wasi@8563

@rolldown/binding-win32-arm64-msvc

npm i https://pkg.pr.new/@rolldown/binding-win32-arm64-msvc@8563

@rolldown/binding-win32-x64-msvc

npm i https://pkg.pr.new/@rolldown/binding-win32-x64-msvc@8563

commit: ca81166

@sapphi-red sapphi-red marked this pull request as ready for review March 6, 2026 08:53
Copilot AI review requested due to automatic review settings March 6, 2026 08:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables the file system watcher functionality in WASI/Wasm builds by removing the #[cfg(not(target_family = "wasm"))] guards that previously disabled it, relying on updated versions of rolldown-notify (10.2.0) and rolldown-notify-debouncer-full (0.7.5) which presumably add WASI support.

Changes:

  • Remove WASI/Wasm cfg guards from rolldown_fs_watcher to enable real fs watching in Wasm targets
  • Bump rolldown-notify and rolldown-notify-debouncer-full to versions with WASI support
  • Remove the NoopFsWatcher fallback in watcher.rs that was used for Wasm targets

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/rolldown_watcher/src/watcher.rs Removes cfg guards and the NoopFsWatcher Wasm fallback
crates/rolldown_fs_watcher/src/utils.rs Removes non_wasm module gating for DebounceEventHandlerAdapter
crates/rolldown_fs_watcher/src/lib.rs Removes cfg guards on poll and debounced watcher modules
crates/rolldown_fs_watcher/Cargo.toml Moves rolldown-notify-debouncer-full from wasm-gated to unconditional dependency
Cargo.toml Bumps rolldown-notify to 10.2.0 and rolldown-notify-debouncer-full to 0.7.5

Copy link
Copy Markdown
Member Author

sapphi-red commented Mar 6, 2026

Merge activity

  • Mar 6, 9:07 AM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 7, 10:39 AM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Mar 7, 10:39 AM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..
  • Mar 7, 10:39 AM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 8, 8:34 AM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 6, 2026

Benchmarks Rust

  • target: main(36b69d8)
  • pr: 03-06-feat_enable_watcher_in_wasi_build(7c28b23)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.04     83.7±3.03ms        ? ?/sec    1.00     80.4±6.36ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.02     88.4±2.11ms        ? ?/sec    1.00     86.7±1.45ms        ? ?/sec
bundle/bundle@rome_ts                                        1.01    168.7±8.13ms        ? ?/sec    1.00    166.3±7.12ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.07    194.1±4.64ms        ? ?/sec    1.00    180.9±4.87ms        ? ?/sec
bundle/bundle@threejs                                        1.01     73.9±3.37ms        ? ?/sec    1.00     73.3±3.03ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     80.8±1.07ms        ? ?/sec    1.03     83.3±3.35ms        ? ?/sec
bundle/bundle@threejs10x                                     1.01   770.4±11.89ms        ? ?/sec    1.00    761.0±9.34ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.01   884.2±13.21ms        ? ?/sec    1.00   872.0±11.16ms        ? ?/sec
scan/scan@rome_ts                                            1.00     77.8±1.77ms        ? ?/sec    1.07     83.2±5.15ms        ? ?/sec
scan/scan@threejs                                            1.00     27.7±0.49ms        ? ?/sec    1.05     29.1±1.64ms        ? ?/sec
scan/scan@threejs10x                                         1.00    269.2±3.70ms        ? ?/sec    1.02    274.5±5.39ms        ? ?/sec

graphite-app bot pushed a commit that referenced this pull request Mar 8, 2026
graphite-app bot pushed a commit that referenced this pull request Mar 8, 2026
@sapphi-red
Copy link
Copy Markdown
Member Author

Done in #8575

@sapphi-red sapphi-red closed this Mar 8, 2026
@sapphi-red sapphi-red deleted the 03-06-feat_enable_watcher_in_wasi_build branch March 17, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants