Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

questions on tag identity #324

@yamt

Description

@yamt

some embedder apis have two-step instatantiation. that is,

  1. load (and validate) a module
  2. instantiate the loaded module

some embedder apis allow to instantiate a loaded module multiple times.

consider a module, module-A, which exports a tag.

load the module (loaded-module-A)
create two instances from the loaded module: instance-A1 and instance-A2

now another instance imports the tags from both of instance-A1 and instance-A2.
my understanding is that these two imported tags should be considered as different tags.
(it's how i implemented the tag matching in my runtime: https://github.com/yamt/toywasm/blob/4924e0efe7785b2482131a681928a61ca9916910/lib/type.h#L605-L619)

questions:

  • is my understanding correct?
  • i don't think wast can express the situation. the closest thing would be to write two identical (module). am i right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions