Skip to content

wasi: add all _SC_* sysconf constants from wasi-libc#5023

Merged
JohnTitor merged 1 commit intorust-lang:mainfrom
rust-wasi-web:wasip1-sysconf
Mar 19, 2026
Merged

wasi: add all _SC_* sysconf constants from wasi-libc#5023
JohnTitor merged 1 commit intorust-lang:mainfrom
rust-wasi-web:wasip1-sysconf

Conversation

@surban
Copy link
Contributor

@surban surban commented Mar 18, 2026

Description

Add the complete set of _SC_* sysconf constants for WASI targets from wasi-libc's musl-based unistd.h.

Applies to both wasm32-wasip1 and wasm32-wasip1-threads.

Sources

Checklist

  • Relevant tests in 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 label +stable-nominated

Copilot AI review requested due to automatic review settings March 18, 2026 11:50
@rustbot rustbot added S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Mar 18, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the WASI target’s exported sysconf name constants in src/wasi/mod.rs and updates the WASI semver symbol list accordingly, improving libc API completeness for WASI consumers.

Changes:

  • Added a broad set of _SC_* sysconf selector constants for the WASI target.
  • Updated libc-test/semver/wasi.txt to include the newly exported WASI symbols.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/wasi/mod.rs Adds WASI _SC_* constants (sysconf name IDs) to the WASI libc surface.
libc-test/semver/wasi.txt Records the new WASI symbols in the semver baseline list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@surban
Copy link
Contributor Author

surban commented Mar 18, 2026

@rustbot retry

@JohnTitor
Copy link
Member

Could you squash commits into one?

@surban
Copy link
Contributor Author

surban commented Mar 19, 2026

Could you squash commits into one?

Done.

Add the complete set of _SC_* constants from wasi-libc's musl-based unistd.h.
@rustbot
Copy link
Collaborator

rustbot commented Mar 19, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

@JohnTitor JohnTitor added this pull request to the merge queue Mar 19, 2026
Merged via the queue into rust-lang:main with commit 2aa834e Mar 19, 2026
51 checks passed
surban added a commit to rust-wasi-web/libc that referenced this pull request Mar 23, 2026
Add the complete set of _SC_* constants from wasi-libc's musl-based unistd.h.

(backport <rust-lang#5023>)
(cherry picked from commit 2aa834e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants