Skip to content

Add WASI support to compiler and DRuntime#120

Merged
adamdruppe merged 2 commits into
opendlang:masterfrom
QuantumSegfault:wasi
Jul 14, 2026
Merged

Add WASI support to compiler and DRuntime#120
adamdruppe merged 2 commits into
opendlang:masterfrom
QuantumSegfault:wasi

Conversation

@QuantumSegfault

@QuantumSegfault QuantumSegfault commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Adds WASI support for LDC and DRuntime.

Based on my various related PRs upstream.

Phobos, GC, and EH are not yet functional. Use manual GC or run GC.disable to prevent unexpected frees

@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

Not quite ready yet.

Still needs a few tweaks...

@QuantumSegfault
QuantumSegfault marked this pull request as ready for review July 14, 2026 18:08
@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

Requesting review
@adamdruppe

@adamdruppe

Copy link
Copy Markdown
Contributor

eyeballs fine... let's just merge and run lol

@adamdruppe
adamdruppe merged commit 6db95e7 into opendlang:master Jul 14, 2026
3 checks passed
@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

Hmm....

bb.0 (%ir-block.0):
  liveins: $arguments
  RETURN %1:i32, implicit-def dead $arguments

# End machine code for function _D4core6thread8osthread11getStackTopFNbNiZPv.

*** Bad machine code: Reading virtual register without a def ***
- function:    _D4core6thread8osthread11getStackTopFNbNiZPv
- basic block: %bb.0  (0x56176c95ee00)
- instruction: RETURN %1:i32, implicit-def dead $arguments
- operand 0:   %1:i32
LLVM ERROR: Found 1 machine code errors.

Didn't do that on LLVM 19.

Let me open PR against LDC and see if LLVM 18 CI has the issue.

@adamdruppe

Copy link
Copy Markdown
Contributor

yes indeed, that's the emscripten build in the ci so maybe that is a bit different too, but it would still trigger version webassembly etc.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants