WebAssembly/design

Include types, tables, labels, globals, and memories in binary format name section

AndrewScheidecker opened this issue · 6 comments

I realize the name section is probably seen as a stopgap for a more expressive metadata section, but it would be nice if it could round trip the names that are in the text format. At a glance, it's missing names for imports, types, tables, and labels.

It's also missing names for globals and memories.

And as a minor nit, there are no distinct names for imports; imports are imported into their respective entities' index spaces, such as the function index space, so for example the existing "name" section covers imported functions.

So to summarize, the wasm binary format currently doesn't have names for:

  • types
  • tables
  • labels
  • globals
  • memories

Yes the import names would be converted by the function names. Could this issue subsume #861 and close that? Could the local names for functions be applied to the function arguments and thus also the import argument names? None of this is a show stopper.

@AndrewScheidecker could you file a PR for this?

@AndrewScheidecker could you file a PR for this?

Will do.

JFTR, this seems to have evolved into a proposal at https://github.com/WebAssembly/extended-name-section

binji commented

Thanks for that info @nomeata! Let's close this issue then.