-
Notifications
You must be signed in to change notification settings - Fork 299
witx crate: improve public API #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or 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
…l invariants the definitions/entries pattern involves upgrading Weak into Rc and also its not super intuitive, especially given ive written zero (0) docs. This is a bit nicer to use
sunfishcode
reviewed
Sep 26, 2019
Member
sunfishcode
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
04172b8 to
bd75cdf
Compare
Contributor
Author
|
Thanks for all the helpful review comments! |
Contributor
Author
|
Published as witx 0.2.0 |
pchickey
pushed a commit
that referenced
this pull request
Sep 27, 2019
dan pointed this out in the review for PR #96 but I somehow lost the commit in a rebase.
pchickey
pushed a commit
that referenced
this pull request
Sep 30, 2019
dan pointed this out in the review for PR #96 but I somehow lost the commit in a rebase.
yoshuawuyts
added a commit
to yoshuawuyts/WASI
that referenced
this pull request
Nov 25, 2025
yoshuawuyts
pushed a commit
to yoshuawuyts/WASI
that referenced
this pull request
Nov 25, 2025
* witx tool: improve public api so you don't have to know about internal invariants the definitions/entries pattern involves upgrading Weak into Rc and also its not super intuitive, especially given ive written zero (0) docs. This is a bit nicer to use * witx: add render trait, make sure it roundtrips by implementing Eq * witx crate: IntRepr variants are U8, U16... to reflect syntax as "u8"... * witx crate: doc comments
yoshuawuyts
pushed a commit
to yoshuawuyts/WASI
that referenced
this pull request
Nov 25, 2025
…ebAssembly#101) * witx crate: fix equality impl for document, module dan pointed this out in the review for PR WebAssembly#96 but I somehow lost the commit in a rebase. * witx crate: calculate module type signature of an interface func * witx crate: rename moduletype to core / WebAssembly type
yoshuawuyts
pushed a commit
to yoshuawuyts/WASI
that referenced
this pull request
Nov 25, 2025
* Document that `monotonic-clock.now` doesn't wrap. 584 years ought to be enough for anyone. * Document that implementations should pick a low start value.
yoshuawuyts
pushed a commit
to yoshuawuyts/WASI
that referenced
this pull request
Nov 25, 2025
* witx tool: improve public api so you don't have to know about internal invariants the definitions/entries pattern involves upgrading Weak into Rc and also its not super intuitive, especially given ive written zero (0) docs. This is a bit nicer to use * witx: add render trait, make sure it roundtrips by implementing Eq * witx crate: IntRepr variants are U8, U16... to reflect syntax as "u8"... * witx crate: doc comments
yoshuawuyts
pushed a commit
to yoshuawuyts/WASI
that referenced
this pull request
Nov 25, 2025
…ebAssembly#101) * witx crate: fix equality impl for document, module dan pointed this out in the review for PR WebAssembly#96 but I somehow lost the commit in a rebase. * witx crate: calculate module type signature of an interface func * witx crate: rename moduletype to core / WebAssembly type
yoshuawuyts
pushed a commit
to yoshuawuyts/WASI
that referenced
this pull request
Nov 25, 2025
Update release candidate version to 0.2.0-rc-2024-01-16
yoshuawuyts
pushed a commit
to yoshuawuyts/WASI
that referenced
this pull request
Nov 25, 2025
* witx tool: improve public api so you don't have to know about internal invariants the definitions/entries pattern involves upgrading Weak into Rc and also its not super intuitive, especially given ive written zero (0) docs. This is a bit nicer to use * witx: add render trait, make sure it roundtrips by implementing Eq * witx crate: IntRepr variants are U8, U16... to reflect syntax as "u8"... * witx crate: doc comments
yoshuawuyts
pushed a commit
to yoshuawuyts/WASI
that referenced
this pull request
Nov 25, 2025
…ebAssembly#101) * witx crate: fix equality impl for document, module dan pointed this out in the review for PR WebAssembly#96 but I somehow lost the commit in a rebase. * witx crate: calculate module type signature of an interface func * witx crate: rename moduletype to core / WebAssembly type
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DocumentandModule- expose a getter and an iterator for each kind of definition in each, rather than expose the internal Vec/HashMap<Id, Entry> datastructures.PartialEqandEqfor all AST nodes. The Document and Module implementations are implemented manually, and are not sensitive to the order of definitions.parse(&str) -> Result<Document,...>function available. This usesMockFsunder the hood.WitxIoRendertrait that converts AST nodes back into s-expressions. A separate SExpr enum is used because it needs to ownStrings, rather than have refs (&'a str) andLocationthroughout. ImplementDisplayto render SExprs to text. This allows the validated AST to be serialized to a single string or file.