Skip to content
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

update to use tagged unions #41

Merged
merged 7 commits into from
Feb 18, 2020
Merged

update to use tagged unions #41

merged 7 commits into from
Feb 18, 2020

Conversation

pchickey
Copy link
Collaborator

@pchickey pchickey commented Feb 7, 2020

DO NOT MERGE until upstream WASI changes are merged into master, and submodule is pointed at master.

Implements WebAssembly/WASI#220

@kubkon
Copy link
Member

kubkon commented Feb 7, 2020

@pchickey I've now submitted #42 that fast-forwards WASI to the latest master, and fixes a lot of the issues you'd have to fix in this PR that are not directly relevant to the tagged unions proposal. So hopefully this will be useful to you!

@pchickey
Copy link
Collaborator Author

pchickey commented Feb 7, 2020

@kubkon many thanks, ive rebased

@pchickey pchickey marked this pull request as ready for review February 14, 2020 01:30
@@ -6,7 +6,7 @@ use core::mem::MaybeUninit;

pub use crate::error::Error;
pub type Result<T, E = Error> = core::result::Result<T, E>;
pub type Size = usize;
pub type Size = u32;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intentional? IIRC this was a convenience from before because usize is used so ubiquitously in Rust right nwo

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Just a question about usize but otherwise lgtm

@pchickey
Copy link
Collaborator Author

Oops, that was not intentional, I'll revert it. We now have BuiltinType::Size in witx but the snapshot isnt using it yet, so I'll leave the hack to make the target of the type named "size" a usize rather than u32.

@alexcrichton
Copy link
Member

👍

@alexcrichton alexcrichton deleted the pch/tagged_unions branch February 18, 2020 21:49
haraldh pushed a commit to haraldh/wasi that referenced this pull request Dec 1, 2022
Move `CLOCK_REALTIME` to be the first `clockid_t` value. This change
reflects the definitions used in [existing practice], so this patch
updates the `wasi_unstable_preview0` and `wasi_unstable` definitions
as well.

This is the same change as bytecodealliance#41, but updated for the WASI repository's
new phases directory structure.

[existing practice]: https://github.com/CraneStation/wasi-libc/blob/master/libc-bottom-half/headers/public/wasi/core.h#L42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants