Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
Phobos Runtime Library
Phobos is the standard runtime library that comes with the D language compiler.
Generally, the std namespace is used for the main modules in the Phobos standard library. The etc namespace is used for external C/C++ library bindings. The core namespace is used for low-level D runtime functions.
The following table is a quick reference guide for which Phobos modules to use for a given category of functionality. Note that some modules may appear in more than one category, as some Phobos modules are quite generic and can be applied in a variety of situations.
Modules | Description |
---|---|
Algorithms & ranges | |
std.algorithm std.range std.range.primitives std.range.interfaces |
Generic algorithms that work with ranges of any type, including strings, arrays, and other kinds of sequentially-accessed data. Algorithms include searching, comparison, iteration, sorting, set operations, and mutation. |
Array manipulation | |
std.array std.algorithm |
Convenient operations commonly used with built-in arrays. Note that many common array operations are subsets of more generic algorithms that work with arbitrary ranges, so they are found in std.algorithm. |
Containers | |
std.container.array std.container.binaryheap std.container.dlist std.container.rbtree std.container.slist |
See std.container.* for an overview. |
Data formats | |
std.base64 | Encoding / decoding Base64 format. |
std.csv | Read Comma Separated Values and its variants from an input range of dchar. |
std.json | Read/write data in JSON format. |
std.xml | Read/write data in XML format. |
std.zip | Read/write data in the ZIP archive format. |
std.zlib | Compress/decompress data using the zlib library. |
Data integrity | |
std.experimental.checkedint | Checked integral types. |
std.digest | Compute digests such as md5, sha1 and crc32. |
std.digest.crc | Cyclic Redundancy Check (32-bit) implementation. |
std.digest.hmac | Compute HMAC digests of arbitrary data. |
std.digest.md | Compute MD5 hash of arbitrary data. |
std.digest.murmurhash | Compute MurmurHash of arbitrary data. |
std.digest.ripemd | Compute RIPEMD-160 hash of arbitrary data. |
std.digest.sha | Compute SHA1 and SHA2 hashes of arbitrary data. |
Date & time | |
std.datetime | Provides convenient access to date and time representations. |
core.time | Implements low-level time primitives. |
Exception handling | |
std.exception | Implements routines related to exceptions. |
core.exception | Defines built-in exception types and low-level language hooks required by the compiler. |
External library bindings | |
etc.c.curl | Interface to libcurl C library. |
etc.c.odbc.sql | Interface to ODBC C library. |
etc.c.odbc.sqlext | |
etc.c.odbc.sqltypes | |
etc.c.odbc.sqlucode | |
etc.c.sqlite3 | Interface to SQLite C library. |
etc.c.zlib | Interface to zlib C library. |
I/O & File system | |
std.file | Manipulate files and directories. |
std.path | Manipulate strings that represent filesystem paths. |
std.stdio | Perform buffered I/O. |
Interoperability | |
core.stdc.complex core.stdc.ctype core.stdc.errno core.stdc.fenv core.stdc.float_ core.stdc.inttypes core.stdc.limits core.stdc.locale core.stdc.math core.stdc.signal core.stdc.stdarg core.stdc.stddef core.stdc.stdint core.stdc.stdio core.stdc.stdlib core.stdc.string core.stdc.tgmath core.stdc.time core.stdc.wchar_ core.stdc.wctype |
D bindings for standard C headers. These are mostly undocumented, as documentation for the functions these declarations provide bindings to can be found on external resources. |
Memory management | |
core.memory | Control the built-in garbage collector. |
std.typecons | Build scoped variables and reference-counted types. |
Metaprogramming | |
core.attribute | Definitions of special attributes recognized by the compiler. |
core.demangle | Convert mangled D symbol identifiers to source representation. |
std.demangle | A simple wrapper around core.demangle. |
std.meta | Construct and manipulate template argument lists (aka type lists). |
std.traits | Extract information about types and symbols at compile time. |
std.typecons | Construct new, useful general purpose types. |
Multitasking | |
std.concurrency | Low level messaging API for threads. |
std.parallelism | High level primitives for SMP parallelism. |
std.process | Starting and manipulating processes. |
core.atomic | Basic support for lock-free concurrent programming. |
core.sync.barrier | Synchronize the progress of a group of threads. |
core.sync.condition | Synchronized condition checking. |
core.sync.exception | Base class for synchronization exceptions. |
core.sync.mutex | Mutex for mutually exclusive access. |
core.sync.rwmutex | Shared read access and mutually exclusive write access. |
core.sync.semaphore | General use synchronization semaphore. |
core.thread | Thread creation and management. |
Networking | |
std.socket | Socket primitives. |
std.net.curl | Networking client functionality as provided by libcurl. |
std.net.isemail | Validates an email address according to RFCs 5321, 5322 and others. |
std.uri | Encode and decode Uniform Resource Identifiers (URIs). |
std.uuid | Universally-unique identifiers for resources in distributed systems. |
Numeric | |
std.bigint | An arbitrary-precision integer type. |
std.complex | A complex number type. |
std.math | Elementary mathematical functions (powers, roots, trigonometry). |
std.mathspecial | Families of transcendental functions. |
std.numeric | Floating point numerics functions. |
std.random | Pseudo-random number generators. |
core.checkedint | Range-checking integral arithmetic primitives. |
core.math | Built-in mathematical intrinsics. |
Paradigms | |
std.functional | Functions that manipulate other functions. |
std.algorithm | Generic algorithms for processing sequences. |
std.signals | Signal-and-slots framework for event-driven programming. |
Runtime utilities | |
object | Core language definitions. Automatically imported. |
std.getopt | Parsing of command-line arguments. |
std.compiler | Host compiler vendor string and language version. |
std.system | Runtime environment, such as OS type and endianness. |
core.cpuid | Capabilities of the CPU the program is running on. |
core.memory | Control the built-in garbage collector. |
core.runtime | Control and configure the D runtime. |
String manipulation | |
std.string | Algorithms that work specifically with strings. |
std.array | Manipulate builtin arrays. |
std.algorithm | Generic algorithms for processing sequences. |
std.uni | Fundamental Unicode algorithms and data structures. |
std.utf | Encode and decode UTF-8, UTF-16 and UTF-32 strings. |
std.format | Format data into strings. |
std.path | Manipulate strings that represent filesystem paths. |
std.regex | Regular expressions. |
std.ascii | Routines specific to the ASCII subset of Unicode. |
std.encoding | Handle and transcode between various text encodings. |
std.windows.charset | Windows specific character set support. |
std.outbuffer | Serialize data to ubyte arrays. |
Type manipulations | |
std.conv | Convert types from one type to another. |
std.typecons | Type constructors for scoped variables, ref counted types, etc. |
std.bitmanip | High level bit level manipulation, bit arrays, bit fields. |
std.variant | Dynamically-typed variable that can hold a value of any type. |
core.bitop | Low level bit manipulation. |
std.sumtype | Type-safe discriminated union. |
Vector programming | |
core.simd | SIMD intrinsics |
Copyright © 1999-2022 by the D Language Foundation | Page generated by
Ddoc on (no date time)