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.
Fig.1: JS API step to define "the index of the host function"
Fig.2: JS API algorithm for the name of the WebAssembly function