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

feat: Wasm Linux support wasm32-wali #4244

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

arjunr2
Copy link

@arjunr2 arjunr2 commented Jan 16, 2025

Description

Retargetting support to main (from #3778) for wasm32-wali according to MCP rust-lang/compiler-team#797

Sources

WALI documentation: https://github.com/arjunr2/WALI

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot
Copy link
Collaborator

rustbot commented Jan 16, 2025

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @tgross35 (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 (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

// * Architecture-specific features
// * Dynamic linking (until Wasm gains support)
// Currently only supports the 'musl' environment
fn test_wasm32_linux(target: &str) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is most of this copied from test_linux? If so, it would just make more sense to configure wali using that same function instead of duplicating.

Copy link
Author

Choose a reason for hiding this comment

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

A lot of it is configured using test_linux, I can use the same function. Although if it's currently only Tier-3, we could maybe hold-off on libc-test support until a later point in time. I feel like the latter makes more sense to me at the moment

Comment on lines +4 to +5
#![feature(c_variadic)]
#![feature(concat_idents)]
Copy link
Contributor

Choose a reason for hiding this comment

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

This is just for experimentation, correct? Will need to be removed before merge.

Copy link
Author

Choose a reason for hiding this comment

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

This will not be necessary if we remove the syscall shims.

Copy link
Contributor

Choose a reason for hiding this comment

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

Same question as in #3778, why is there a b64 module when the arch is wasm32?

Copy link
Contributor

Choose a reason for hiding this comment

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

As mentioned in #3778, please drop the syscall shims

Copy link
Author

Choose a reason for hiding this comment

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

The syscall shims are rather integral to portability of many applications. What is the best direction forward to get that into the ecosystem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants