WebAssembly / WebAssembly/shared-everything-threads

Text format for inline `shared` tables

Open
#71 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
97
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Tables can be written in WAT in inline form and the addition of shared in the text format means that inline table expressions (e.g., (table <type> (elem ...))) are difficult to parse: the parser would potentially have to look past two tokens now, shared and i32|i64 to see if a type appears that indicates we should be parsing an inline format.

Here's an example of the problem:

(table shared i64 (ref null (shared func)) (elem (ref.null (shared func))))

Some options for what to do here:

  • disallow inline table expressions with shared; after all, these can be expressed other ways
  • force parsers to lookahead more tokens

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 reviewing the inline table example in the issue and the two proposed parsing options. Determine which text-format behavior should be adopted for shared tables; done means the chosen behavior is specified clearly and reflected consistently in the relevant parser expectations.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.