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

Add intial support for wasm32-unknown-wasi #1307

Merged
merged 3 commits into from Mar 28, 2019

Conversation

Projects
None yet
4 participants
@alexcrichton
Copy link
Member

alexcrichton commented Mar 27, 2019

This target is being proposed int he rust-lang/rust repository
and this is intended to get coupled with that proposal. The definitions
here all match the upstream reference-sysroot definitions and the
functions all match the reference sysroot as well. The linkage here is
described more in detail on the Rust PR itself, but in general it's
similar to musl.

Automatic verification has been implemented in the same manner as other
targets, and it's been used locally to develop this PR and catch errors
in the bindings already written (also to help match the evolving sysroot
of wasi). The verification isn't hooked up to CI yet though because
there is no wasi target distributed via rustup just yet, but once that's
done I'll file a follow-up PR to execute verification on CI.

Add intiial support for wasm32-unknown-wasi
This target is [being proposed][LINK] int he rust-lang/rust repository
and this is intended to get coupled with that proposal. The definitions
here all match the upstream reference-sysroot definitions and the
functions all match the reference sysroot as well. The linkage here is
described more in detail on the Rust PR itself, but in general it's
similar to musl.

Automatic verification has been implemented in the same manner as other
targets, and it's been used locally to develop this PR and catch errors
in the bindings already written (also to help match the evolving sysroot
of wasi). The verification isn't hooked up to CI yet though because
there is no wasi target distributed via rustup just yet, but once that's
done I'll file a follow-up PR to execute verification on CI.

[LINK]:
@rust-highfive

This comment has been minimized.

Copy link

rust-highfive commented Mar 27, 2019

r? @gnzlbg

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton alexcrichton changed the title Add intiial support for wasm32-unknown-wasi Add intial support for wasm32-unknown-wasi Mar 27, 2019

@alexcrichton alexcrichton force-pushed the alexcrichton:wasi-pr branch from 899c5e6 to 87def1f Mar 27, 2019

@gnzlbg
Copy link
Collaborator

gnzlbg left a comment

So this looks really good, thanks!

Modulo stylistic issues, I find the CI setup nice and quite straightforward, but I also think when this breaks for the first time I won't remember how the whole CI for this was set up and it took a bit to understand it, so I'd appreciate if there was at least a top-level comment in the Docker container explaining the set up.

Then there is the issue with __clockid, which I'm not sure I fully understand. Might also be worth of a comment in the libc wasi.rs module explaining more precisely what C does, and why do we map C to Rust in this particular way here. The code mentions that __clockid is an "opaque" struct, but in the Rust code it isn't opaque, it is a zero-sized type, and improper_ctypes lint should lint against those in C FFI because C does not have ZSTs. I personally think it would be simpler to just use *mut c_void here, but I am not sure I fully understand the issue so maybe this is not possible. Also, if ctest needs to be fixed to support some of these, we don't need to do that here, but it might be useful to fill in a ctest issue about what exactly would need to be supported.

Show resolved Hide resolved ci/docker/wasm32-unknown-wasi/Dockerfile Outdated
Show resolved Hide resolved ci/docker/wasm32-unknown-wasi/Dockerfile
Show resolved Hide resolved ci/docker/wasm32-unknown-wasi/Dockerfile Outdated
Show resolved Hide resolved ci/docker/wasm32-unknown-wasi/Dockerfile Outdated
Show resolved Hide resolved ci/docker/wasm32-unknown-wasi/Dockerfile
Show resolved Hide resolved src/wasi.rs
Show resolved Hide resolved src/wasi.rs Outdated
Show resolved Hide resolved src/wasi.rs Outdated
Show resolved Hide resolved src/wasi.rs Outdated
Show resolved Hide resolved src/wasi.rs Outdated

@alexcrichton alexcrichton force-pushed the alexcrichton:wasi-pr branch from 6a600c5 to 8662b47 Mar 27, 2019

@gnzlbg

gnzlbg approved these changes Mar 27, 2019

Copy link
Collaborator

gnzlbg left a comment

LGTM.

@bors: r+

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Mar 27, 2019

@bors: r=gnzlbg

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 27, 2019

📌 Commit bce4454 has been approved by gnzlbg

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 27, 2019

⌛️ Testing commit bce4454 with merge 2f552b8...

bors added a commit that referenced this pull request Mar 27, 2019

Auto merge of #1307 - alexcrichton:wasi-pr, r=gnzlbg
Add intial support for wasm32-unknown-wasi

This target is [being proposed][LINK] int he rust-lang/rust repository
and this is intended to get coupled with that proposal. The definitions
here all match the upstream reference-sysroot definitions and the
functions all match the reference sysroot as well. The linkage here is
described more in detail on the Rust PR itself, but in general it's
similar to musl.

Automatic verification has been implemented in the same manner as other
targets, and it's been used locally to develop this PR and catch errors
in the bindings already written (also to help match the evolving sysroot
of wasi). The verification isn't hooked up to CI yet though because
there is no wasi target distributed via rustup just yet, but once that's
done I'll file a follow-up PR to execute verification on CI.

[LINK]: rust-lang/rust#59464
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 28, 2019

💥 Test timed out

@gnzlbg

This comment has been minimized.

Copy link
Collaborator

gnzlbg commented Mar 28, 2019

@bors: retry


something weird is going on

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 28, 2019

⌛️ Testing commit bce4454 with merge 1dda916...

bors added a commit that referenced this pull request Mar 28, 2019

Auto merge of #1307 - alexcrichton:wasi-pr, r=gnzlbg
Add intial support for wasm32-unknown-wasi

This target is [being proposed][LINK] int he rust-lang/rust repository
and this is intended to get coupled with that proposal. The definitions
here all match the upstream reference-sysroot definitions and the
functions all match the reference sysroot as well. The linkage here is
described more in detail on the Rust PR itself, but in general it's
similar to musl.

Automatic verification has been implemented in the same manner as other
targets, and it's been used locally to develop this PR and catch errors
in the bindings already written (also to help match the evolving sysroot
of wasi). The verification isn't hooked up to CI yet though because
there is no wasi target distributed via rustup just yet, but once that's
done I'll file a follow-up PR to execute verification on CI.

[LINK]: rust-lang/rust#59464
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 28, 2019

💔 Test failed - checks-cirrus

@gnzlbg

This comment has been minimized.

Copy link
Collaborator

gnzlbg commented Mar 28, 2019

@bors: retry

bors added a commit that referenced this pull request Mar 28, 2019

Auto merge of #1307 - alexcrichton:wasi-pr, r=gnzlbg
Add intial support for wasm32-unknown-wasi

This target is [being proposed][LINK] int he rust-lang/rust repository
and this is intended to get coupled with that proposal. The definitions
here all match the upstream reference-sysroot definitions and the
functions all match the reference sysroot as well. The linkage here is
described more in detail on the Rust PR itself, but in general it's
similar to musl.

Automatic verification has been implemented in the same manner as other
targets, and it's been used locally to develop this PR and catch errors
in the bindings already written (also to help match the evolving sysroot
of wasi). The verification isn't hooked up to CI yet though because
there is no wasi target distributed via rustup just yet, but once that's
done I'll file a follow-up PR to execute verification on CI.

[LINK]: rust-lang/rust#59464
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 28, 2019

⌛️ Testing commit bce4454 with merge 1b346b8...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Mar 28, 2019

☀️ Test successful - checks-cirrus, checks-travis, status-appveyor
Approved by: gnzlbg
Pushing 1b346b8 to master...

@bors bors merged commit bce4454 into rust-lang:master Mar 28, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.