surviving wasm

monkyyy crazymonkyyy at gmail.com
Wed Dec 13 23:14:49 UTC 2023


On Wednesday, 13 December 2023 at 21:15:47 UTC, Julian Fondren 
wrote:
>
> 6. statically build against musl and include it in the wasm 
> binary. Since phobos is slow to change, its libc dependencies 
> will also be slow to change, and you can work on reducing how 
> much musl goes into the binary. Musl's MIT-licensed and D has 
> ImportC; maybe this can be upstreamed as a pseudo-libc-less 
> build option. People who don't care about wasm may still care 
> about dodging glibc due to binary portability hassles with 
> deployment to older servers. ldc already uses musl on Alpine 
> Linux, popular with containers.

I have alpine linux running in distro box and im getting more 
"not my problem" errors
-mtriple=wasm32-unknown-unknown-musl : /stdc/time.d(34): Error: 
undefined identifier `time_t`,
-mtriple=wasm32-linux-musl-webassembly : posix/signal.d(394): 
Error: static assert:  "unimplemented"
--mtriple=i686-linux-musl: /usr/include/d/std/array.d(3418): 
Error: `TypeInfo` cannot be used with -betterC

etc. whats the correct triple even, who knows!!!!!

I just can't fix posix signaling or libc.time or clib.math or 
array using typeinfo because I called `float.to!string`

https://github.com/crazymonkyyy/raylib-2024/blob/bf23aede90ea75bfffd074a4bcae04281f21ce27/examples/001-helloworld.d#L11

I have no patience with this direction either, d's std depends on 
libc any claim that "d's std is pay-as-you-go with betterc" is 
delusional, wasm support is half-baked and undocumented Im 
trail-bazing as is.


More information about the Digitalmars-d-learn mailing list