WebAssembly / annotations

Proposal for Custom Annotation Syntax in the Text Format
https://WebAssembly.github.io/annotations/
Other
19 stars 10 forks source link

Proposal: rename @custom annotation to @custom-section #10

Closed syrusakbary closed 2 years ago

syrusakbary commented 4 years ago

Following up from the discussion here: https://github.com/WebAssembly/wabt/issues/1376

I'd like to propose renaming the syntax for custom sections in wasm from @custom to @custom-section:

Eg. From:

(module
  (@custom "sectionName" (after function) "hello")
  ...
)

to:

(module
  (@custom-section "sectionName" (after function) "hello")
  ...
)

Why?

After reading the gist pointed by @binji I thought the @custom annotation was referring to just a custom annotation example, not a custom section.

I think a name such as @custom-section or @customSection might give a bit more context for people that are reading the text format.

rossberg commented 4 years ago

It's reasonable, though I don't feel strongly. Anybody else has a thought?

binji commented 4 years ago

sgtm. I prefer @custom-section to @customSection, though.

syrusakbary commented 4 years ago

Cool, I can proceed at creating a PR if everyone is ok with it :)

rossberg commented 2 years ago

Closing this, since the PR never materialised, and I actually have a slight preference for keeping "custom" – seems more in sync with the existing "func", "memory", etc declarations defining a respective section.