Skip to content

Commit

Permalink
Use semicolons as delimiters in WIT text format (WebAssembly#249)
Browse files Browse the repository at this point in the history
This commit commit is an implementation of WebAssembly#142 where semicolons are now
required as delimiters between items in the WIT text format. All items
in the WIT format are now delimited with either curly braces (`{}`) or
semicolons except for the `package` statement where it subjectively felt
a bit weird to require a semicolon. I've updated the various examples in
`WIT.md` as an example of the new syntax.

My plan on implementing this would be along the lines of:

* Implement the semicolon syntax in `wit-parser`
* Add a parser mode which requires semicolons. This means that the same
  `wit-parser` crate can either or either not require semicolons.
* Update all tests in the `wasm-tools` repository to require semicolons.
* Publish `wit-parser` and `wasm-tools`, integrating the
  semicolon-supporting-mode into all existing tools.
* Wait for Wasmtime to get published with this support. At this point
  everything in the ecosystem should have a point where semicolons are
  optionally supported.
* Remove the parser mode which doesn't require semicolons, meaning
  semicolons are now required.
* Push this update through the tooling, fixing any issues that arise.

The hope is to create a period of time where both syntax forms are
accepted. This provides a transitionary means from one syntax to the
other while proposals are updated. This transitionary period is finite
in length, however.

Closes WebAssembly#142
  • Loading branch information
alexcrichton authored Sep 25, 2023
1 parent cdae165 commit 01ebd9e
Showing 1 changed file with 150 additions and 150 deletions.
Loading

0 comments on commit 01ebd9e

Please sign in to comment.