-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Component and WIT import/export syntax (#1027)
* Implement basic support for new import/export names * Remove the old URL fields. * Change the binary format, updating the major version, to have a discriminator byte. * Implement validation of ID names including parsing and uniqueness. * Update existing tests for new changes. * Add text-parsing support * Add text-printing support * Add encoding support * Support new WIT syntax in `wit-parser` This commit implements the changes outlined in WebAssembly/component-model#193 for the `wit-parser` crate. Namely this updates all parsing, lexing, and resolution of a WIT package. The largest change is that the concept of a "document" has been removed. Additionally most tests needed an update to have a `package foo` header. Intra-package resolution is also a bit trickier now and required a restructuring of the AST resolution pass, but nothing too too radical for what it's doing. * Update the wit-component crate This is a very large commit which gets the wit-component crate's tests working again. The main changes this accounts for are: * URLs are removed. * Documents are removed and instead interfaces/worlds are directly in a package. * The encoding structure of a package was slightly updated to reflect this. * A few minor bugs were fixed now that the ID format is more expressive than the prior format. * Update the wasm-compose crate This is mostly dealing with the fallout of removing URLs. * Update the wasm-tools CLI This removed a few now-obsolete options to `wasm-tools component wit` (yay!) as they're contextually no longer needed given the new structure of WIT. * Update the wit-smith crates * Require namespaces in WIT IDs * Add Ord/PartialOrd for PackageName * Review comments * Merge import/export names These may get split again in the future, but for now they're the same. * rustfmt * Improve world selection Add support for syntax to select any world within the `Resolve`, avoiding the need for the `WorldId` to be defined within the package specified. * Support full semver Add support for full semver versions on interface strings
- Loading branch information
1 parent
e7e7976
commit a636906
Showing
731 changed files
with
5,589 additions
and
5,311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.