LDC 1.43.0
Kapendev
alexandroskapretsos at gmail.com
Sun Sep 20 16:37:09 UTC 2026
On Monday, 14 September 2026 at 19:02:42 UTC, Andrea Fontana
wrote:
> On Sunday, 30 August 2026 at 17:15:54 UTC, kinke wrote:
>> * DRuntime and Phobos now support WASI preview levels 1 and 2,
>> as well as Emscripten, incl. general WebAssembly fixes for EH
>> and GC support. Thanks to Demetrius for making this happen!
>
> Wow!
I am just a fan boy at this point about this, but it works really
well.
Here are some posts I made where I'm using Phobos with
`wasm32-wasip1` on the web:
- https://x.com/Kapendev/status/2101410708315394168
- https://x.com/Kapendev/status/2101690051557998751
Only thing I am not sure is how to avoid that WASI Libc error the
compiler prints if you try to compile without `-c`. Right now I
am linking manually like this:
```sh
ldc2 -c --mtriple=wasm32-wasip1 source/index.d source/wasip1libc.d
wasm-ld \
-o index.wasm \
index.o wasip1libc.o \
"$LDC_WASIP1_FOLDER/libphobos2-ldc.a"
"$LDC_WASIP1_FOLDER/libdruntime-ldc.a" \
--export=_start --gc-sections --error-limit=0
```
More information about the Digitalmars-d-announce
mailing list