WebAssembly / WebAssembly/WASI

Drop explicit preopens

Open
#742 34 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-filesystem
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

Given WASI's CloudABI heritage I understand why preopens currently are the way that they are.

But they feel like something that should be just an host implementation detail. Ie. could the following also work?:

Remove

get-directories: func() -> list<tuple<descriptor, string>>

in exchange for:

instance-root-directory: func() -> descriptor

which returns a single directory that represents the "default filesystem". In similar vein to:

  • wasi-clocks/instance-monotonic-clock
  • wasi-clocks/instance-wall-clock
  • wasi-network/instance-network

By default this is an empty directory. But the host can "mount" specific external directories/files into it. Exactly how the contents of this "filesystem" are populated (preopened or not), would be of concern only to the host, not the client application / libc.

Contributor guide

Open the contributing guide

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

Start by reading the issue discussion and compare the proposed instance-root-directory interface with the existing get-directories interface and the listed wasi-clocks and wasi-network instance interfaces. Done means reaching a maintainer-approved design for whether preopens should be hidden and clearly defining the proposed host/client contract.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
backend-api-design, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.