druntime vs phobos

Jonathan M Davis jmdavisProg at gmx.com
Wed Feb 1 18:34:34 PST 2012


On Thursday, February 02, 2012 02:33:39 Mattbeui wrote:
> Hi,
> 
> What are the main differences between these two libs?
> 
> Since I saw:
> 
> On Github:
> 
> Druntime: Druntime is the minimum library required to support the
> D programming
> language. It includes the system code required to support the
> garbage
> collector, associative arrays, exception handling, array vector
> operations,
> startup/shutdown, etc.
> 
> phobos: Runtime library for the D programming language — Read
> more d-programming-language.org
> 
> 
> On this forum - Index:
> 
> D-runtime: Runtime library design and implementation
> 
> phobos: Phobos standard library design and implementation
> 
> 
> 1) Using D2 I need both?
> 
> 2) Where phobos replaces druntime and vice-versa?

druntime contains the D runtime. It's required for any D program to work. 
Phobos is D's standard library and thus uses druntime. It's not actually 
required, but you're not likely to write a D program without it. Both are 
provided with dmd combined as a single library (libphobos.a or phobos.lib, 
depending on the OS). The core.* modules are in druntime, and the std.* 
modules are in Phobos.

- Jonathan M Davis


More information about the Digitalmars-d mailing list