-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: wasm32-wali
support
#3778
base: libc-0.2
Are you sure you want to change the base?
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Notes about the new target
|
Is this still a work in progress? There are still failing tests. This should target @rustbot author |
As date of initiating this PR, Failing tests seem to emerge from using features like |
All in all I'm a little confused about the goal of this PR. Is If we do have something to add here, it should target Cc @alexcrichton per usual for anything wasm related |
It is intended for upstreaming. This fork of rustc supports the target. I'm also generally confused about the process since Thanks |
Process-wise what I might recommend (broadly for this target as opposed to this specific PR) would be:
Put another way to answer this:
The answer I think is generally "you don't" in the sense that new and/or tier 3 targets generally don't have tests. It takes a bit to bootstrap the target into a workable state. I'd also recommend going with what @tgross35 was mentioning by keeping this PR minimal to start out. This is definitely one where it'd be useful to have the CI checks all enabled for this target but that'll involve toolchain and CI wrangling. That'll ideally be in place before adding all of the target-specific bits and will serve as a good double-check that all the reused definitions here are correct too. |
Alex covered most of this, but basically a MCP followed by target support merged into After that happens, you can start to add support in |
Awesome, thanks @tgross35, @alexcrichton. Will split this PR into multiple chunks and get rid of testing as a tier-3 target |
☔ The latest upstream changes (presumably #4110) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
The proposal is at rust-lang/compiler-team#797 and was seconded, so that should be ready next week. That is enough to get some libc support going.
This should target main
and I will backport from there. These additions could probably just go into musl/b32/wali.rs
since I don't think we would wind up with a non-wali wasm32+musl target (also b32
or b64
? It's in 64 here but the target is wasm32
).
I'm not really sure we should have the syscall shim layer in this crate. It does makes sense to exist so things "just work" for any crates that use syscall
, but I think it might be better off only exposing the functions that wali actually makes available (e.g. fn SYS_read(a1: ...)
, not the dunder names unless they are in the headers) and put a syscall
wrapper in std or anywhere else that uses it. Especially true since it requires nightly for c_varidic
.
This makes sense. Whether the additions should go into either As for the syscall shim layer, the issue is that I'm unsure how many packages invoke the raw |
On a side note, I think it would actually be good to standardize the syscall shim across all targets as well. Implicit mismatching of types with expected values from C variadics is a nasty loophole that is not well defined. It would do good (especially for any future targets with virtual syscall layers) to typecast accordingly. |
libc-test/semver
when you add/remove item(s), e.g. editlinux.txt
if you add an item tosrc/unix/linux_like/linux/mod.rs
*LAST
or*MAX
(see #3131)ci/style.sh
passescd libc-test && cargo test