WebAssembly / WebAssembly/spec

[js-api] Informal description about "the index of the host function"

Open
#1,959 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
3.5k
Forks
539
Avg merge
2d 1h
Merged PRs (30d)
13

Description

The definition and use of "the index of the host function" seems to be somewhat informal, and I'm curious whether it is intentional.

Being algorithmic in nature, js-api specification should explicitly describe how something is computed, rather than merely what it is. However, Fig.1 defines "the index of the host function" by specifying what it is. As a consequence, how to obtain "the index of the host function" (line 3.2) of Fig.2 is ambiguous. I'd like to ask for a step-by-step description of how “the name of the host function” is defined and used.

Image

Fig.1: JS API step to define "the index of the host function"

Image

Fig.2: JS API algorithm for the name of the WebAssembly function

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 JS API specification sections shown in Fig. 1 and Fig. 2, comparing how “the index of the host function” is defined and used. Clarify the algorithmic steps for obtaining and using that index, and consider the issue resolved when the specification removes the ambiguity.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
compilers, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.