eris

A non-standard library for DasBetterC.

This is the library I wish I had when I started using D as a better alternative and complement to C.

Modules

allocator
module eris.allocator

Custom memory allocators and related helpers.

array
module eris.array

In-place manipulation of slices.

btree
module eris.btree

Generic B-tree data structure.

core
module eris.core

Core type definitions, templates and helper procedures.

math
module eris.math

Miscellaneous numeric math.

Public Imports

eris.core
public import eris.core;
Undocumented in source.
eris.array
public import eris.array;
Undocumented in source.
eris.math
public import eris.math;
Undocumented in source.
eris.allocator
public import eris.allocator;
Undocumented in source.
eris.btree
public import eris.btree;
Undocumented in source.

Detailed Description

Goals

The following list ranks the goals of this project, in order of importance:

  1. Maintain compatibility with -betterC mode and/or[1] nothrow @nogc.
  2. Maintain portability across mainstream platforms (x86-64 for desktop, ARM for mobile and WASM for the web).
  3. Provide good documentation for all publicly exposed functionality.
  4. Provide fast single-threaded implementations of certain ADTs and algorithms.

Rationale for the first point is that it allows C developers to use D-generated code in their apps and libraries, even if that may require some explicit template instantations, manual symbol mangling directives and extern(C). The other goals constitute reasons for wanting to use this library in C or D codebases in the first place.

[1] BetterC mode works best with LDC. In fact, using -betterC with DMD often leads to impossible-to-debug linker errors. Therefore, betterC compatibility is only tested against LDC. Still, @nogc and nothrow should apply for all compilers.

Dependencies

Since I still value my time and sanity, I gave up on trying to partition this library into DUB subpackages. So, if you want to use any particular module here without the rest of the project, just make sure you carry its dependency subtree along with it. Here's a dependency graph (forest) to help with that.

intra-package dependencies

Note

  • D interfaces showing up in the docs are only there to document static interfaces; this is a betterC library and procedures assume all containers are structs, so classes probably won't work in most cases.