Skip to content

WASI support - #11079

Merged
0xEAB merged 3 commits into
dlang:masterfrom
QuantumSegfault:wasi-upstream
Aug 7, 2026
Merged

WASI support#11079
0xEAB merged 3 commits into
dlang:masterfrom
QuantumSegfault:wasi-upstream

Conversation

@QuantumSegfault

Copy link
Copy Markdown
Contributor

Rationale

Adds support for WASI (p1 & p2; wasi-libc) to Phobos. This builds on prior work done in DRuntime to support the same targets (largely using wasi-libc's POSIX emulation).

Pre-review checklist

  • I have performed a self-review of my code.
    • This code has also already been reviewed and merged in LDC by @kinke. This is a cherry-pick of the changes. I checked that there are no faulty conflict resolutions, but did NOT verify that support is 100% complete with anything new master Phobos may have added.
  • If my PR fixes a bug or introduces a new feature, I have added thorough tests.
    • No new tests are added to Phobos, but the existing unittests are run during LDC CI for both WASIp1 and WASIp2 targets.
  • If my changes are non-trivial and do not concern a reported issue, I have added a changelog entry.
    • I did NOT add an entry, as these changes do not impact upstream DMD's Phobos, and are only visible in LDC.

@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

@kinke
@thewilsonator

@thewilsonator

Copy link
Copy Markdown
Contributor
Enforce Allman style
grep -nrE '(if|for|foreach|foreach_reverse|while|unittest|switch|else|version) .*{$' $(find etc std -name '*.d'); test $? -eq 1
std/socket.d:1153:        else {
std/socket.d:1733:    else {
std/socket.d:2612:version (CRuntime_WASI) {
std/datetime/systime.d:2706:            else {
std/parallelism.d:4436:    version (WASI) {

braces on newlines

Comment thread std/exception.d
@thewilsonator

Copy link
Copy Markdown
Contributor

ping when this is green

@0xEAB

0xEAB commented Aug 6, 2026

Copy link
Copy Markdown
Member

Style check fails due to:

  • std/file.d(2284:6)[warn]: Public declaration 'setAttributes' has no documented example.
  • std/file.d(3533:17)[warn]: Public declaration 'thisExePath' has no documented example.
  • std/file.d(3683:16)[warn]: Local imports should specify the symbols being imported to avoid hiding local symbols.
  • std/file.d(5614:7)[warn]: Public declaration 'getAvailableDiskSpace' has no documented example.
  • std/typecons.d(3533:10)[warn]: Public declaration 'UnqualRef' has no documented example.

@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

Style check fails due to:

* `std/file.d(2284:6)[warn]`: Public declaration 'setAttributes' has no documented example.

* `std/file.d(3533:17)[warn]`: Public declaration 'thisExePath' has no documented example.

* `std/file.d(3683:16)[warn]`: Local imports should specify the symbols being imported to avoid hiding local symbols.

* `std/file.d(5614:7)[warn]`: Public declaration 'getAvailableDiskSpace' has no documented example.

* `std/typecons.d(3533:10)[warn]`: Public declaration 'UnqualRef' has no documented example.

I saw (but thanks for the nice extract). Just didn't get to it yet. Just starting now.

@QuantumSegfault

QuantumSegfault commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

@thewilsonator

The three external CI runs all pass.

But all the GHA checks are stalling.

@0xEAB

0xEAB commented Aug 6, 2026

Copy link
Copy Markdown
Member

I saw (but thanks for the nice extract). Just didn't get to it yet. Just starting now.

No rush. Didn’t mean to stress you, sorry.
(Just wanted to point out what’s left to do.)

@0xEAB

0xEAB commented Aug 6, 2026

Copy link
Copy Markdown
Member

But all the GHA checks are stalling.

Caused by the ongoing GitHub outage:

Workflow runs are still failing, and jobs may remain queued for an extended period before starting or may time out. Jobs using GitHub-hosted runners are particularly affected while capacity is constrained.

https://www.githubstatus.com/

@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

1 workflow awaiting approval

@0xEAB
0xEAB merged commit a0cbc23 into dlang:master Aug 7, 2026
10 checks passed
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