Using D without libphobos
sarn
sarn at theartofmachinery.com
Fri Apr 27 00:21:51 UTC 2018
On Thursday, 26 April 2018 at 03:04:55 UTC, A. Nicholi wrote:
> I am not sure if this is possible though
I think you've got the technical answer already (just don't link
in phobos2) but I'll add my 2c that Phobosless programming isn't
just possible but realistically doable. It's a shame to go
without Phobos because it's got so much higher-level
functionality, but if you're okay with writing things from the
ground up in C-like code, it works. Most third-party D libraries
depend on Phobos, though, so it's mostly DIY and using bindings
to other languages.
Have a look at the standard library here:
https://dlang.org/phobos/index.html
Basically, all the std.* is Phobos, and most of the core.* stuff
needs linking with the D runtime library. However, there's a
bunch of bindings to standard C stuff in core.stdc.* that only
need the C runtime and standard library, and these come in really
handy when you're not using Phobos. (There are more
platform-specific C bindings in core.sys.* that aren't listed on
that page.) Also, there are some other things in core.bitop and
core.atomic (probably more) that don't need linking to druntime.
More information about the Digitalmars-d
mailing list