Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Text format for shorthand `shared` functions

Open
#81 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with the current WAT examples in the issue and the linked pull request review. Compare the two proposed shorthand forms for readability, consistency with unshared functions, and compatibility with existing syntax. Done means the discussion reaches an agreed syntax and documents why it was chosen.

Written by the indexing model from the issue text.

Description

The current text format only allows specifying a shared function with an explicit type index:

(type $shared (shared (func)))
(func (type $shared))

I had thought (and so have others) that it might be nice to have a short-hand form for writing shared functions when printing WAT. There are some advantages to this: easier to read WAT, easier to write WAT manually, consistency with unshared functions, etc. But, for now, we have left this out because it's unclear how to best express this:

  • (shared (func ...))?
  • (func (shared (param) (result)) ...)?

I'm opening this issue to track this for discussion and for future users who are interested in why things are the way they are.

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

Getting set up

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.

More from WebAssembly/shared-everything-threads

All issues in WebAssembly/shared-everything-threads

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.