Skip to content

wasi: add locale category constants - #5378

Merged
JohnTitor merged 1 commit into
rust-lang:mainfrom
subotac:fix/wasi-locale-constants
Aug 6, 2026
Merged

wasi: add locale category constants#5378
JohnTitor merged 1 commit into
rust-lang:mainfrom
subotac:fix/wasi-locale-constants

Conversation

@subotac

@subotac subotac commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the locale category constants defined by wasi-libc to the WASI bindings and semver list. This allows callers to use setlocale without hardcoding category values.

Fixes #5352.

Source: https://github.com/WebAssembly/wasi-libc/blob/6d8745c8cec1aaa82c24f2e3d7a544f7ea9c2089/libc-top-half/musl/include/locale.h#L23-L29

Checklist

  • Relevant tests in libc-test/semver have been updated
  • Commit messages permalink to headers for added or changed API
  • No placeholder or unstable values are added
  • Tested locally with cargo test -p libc-test --target wasm32-wasip1

@rustbot label +stable-nominated

@rustbot rustbot added O-wasi S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Aug 6, 2026

@JohnTitor JohnTitor left a comment

Copy link
Copy Markdown
Member

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 Aug 6, 2026
Merged via the queue into rust-lang:main with commit 364e4b6 Aug 6, 2026
57 checks passed
@tgross35 tgross35 mentioned this pull request Sep 4, 2026
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-wasi stable-applied This PR has been cherry-picked to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wasi: setlocale is declared but the LC_* category constants (LC_CTYPE, LC_ALL, etc.) are missing

4 participants