WebAssembly / WebAssembly/WASI
Requesting file descriptors at runtime
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
Preopening file descriptors works well for directories with configuration/data because those directories are known for a given program. It also works fine for short-lived CLI programs because the directories they need are known when the program starts (because they are passed as args). But for long-running programs, like GUI programs, you may not know which files are needed until runtime.
So it would be nice to have an API to allow an application to request one or more fds at runtime. How this is handled would be up to the runtime, but one example option would be for it to open your system's file explorer, similarly to how it works for most GUI programs on modern OSes. For the CLI runtimes, they could for instance request the path(s) through the terminal.
Flatpak's org.freedesktop.portal.FileChooser is prior art in this area. Hopefully it wouldn't be as complex as theirs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the requested runtime file-descriptor API and the linked Flatpak org.freedesktop.portal.FileChooser prior art. Consider how the request should work for GUI and CLI runtimes, then define the API and behavior needed for applications to request one or more paths at runtime.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100