WebAssembly / WebAssembly/WASI

WASI and POSIX?

Open
#122 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I'm curious to hear what people think about how much of POSIX should be possible to implement via WASI.

As a concrete example, I may be wrong but I think you can't implement the commandline tool ls in WASI atm, because WASI can't represent the owner/group/world permission levels (there is just "read" permission, but not separately for the owner/group/world, etc.). That is, if one tried to port ls to wasi, I'm not sure how it could print the rwx etc. stuff here;

$ ls -al foo
-rwxrwxr-x 1 me me 117312 Oct 17 19:10 foo

ls may seem trivial, but this also limits how much Python's system libraries can be ported, for example, as people do use Python to script operations on POSIX permissions. So the system ls, python, etc. seem to not be replaceable by wasi alternatives atm.

Of course file permissions is just an example of something that seems not possible in wasi atm. I'm more curious about the general thinking here. Maybe there could be an optional wasi POSIX module (which would have a posix_path_open that parallels path_open)? Or maybe 100% POSIX support isn't a use case people here care about?

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 with the POSIX permission example and WASI's path_open model described in the issue. Compare whether ls and Python permission use cases fit current WASI capabilities, then use the discussion to determine whether a scoped POSIX module is desired. Done is not defined until maintainers agree on a direction.

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
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.