PolyMeilex / PolyMeilex/rfd

Doesn't work in web workers

Open
#155 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
830
Forks
108
Avg merge
6d 33m
Merged PRs (30d)
2

Description

On wasm32 target, the file dialog doesn't work when exeucted from a web worker, not the main thread.

image

I think this problem needs a hand, because running Rust code in web workers is a common situation. Though window is not defined in web workers, there is still FileReader API that it is still possible to be used.

https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Functions_and_classes_available_to_workers
https://developer.mozilla.org/en-US/docs/Web/API/FileReader

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by locating the wasm32 file-dialog entry point and reproducing the failure from a web worker, then compare the worker-available APIs in the linked MDN references. Done means file dialogs work in wasm32 web workers without breaking main-thread behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.