A nogc utility library for the D programming language. Joka provides data structures and functions that work without garbage collection, offering precise memory control. It is designed to complement the D standard library, not replace it.
joka.ascii: ASCII string utilitiesjoka.cli: Command-line parsing utilitiesjoka.containers: General-purpose containersjoka.io: Input and output functionsjoka.math: Mathematical data structures and functionsjoka.memory: Functions for dealing with memoryjoka.types: Type definitions and compile-time utilities
JokaCustomMemory: Allows the declaration of custom memory allocation functionsJokaGcMemory: LikeJokaCustomMemory, but preconfigured to use the D garbage collector
WebAssembly is supported with the BetterC flag, but something like Emscripten is needed to make it work.
If you encounter errors with BetterC, try using the -i flag.
Start with the examples folder for a quick overview. To try an example, run:
./scripts/run_example examples/_001_hello.d
# Or: .\scripts\run_example.bat examples\_001_hello.d
# Or: ./scripts/run_example examples/_001_hello.d ldc2Here are a few things I like about Joka that I don't see in other libraries:
- Minimalistic: Avoids abstractions
- Focused: Doesn't try to support every use case
- Simple: Uses a single global allocator, set at compile time
- Fast: Compile times are blazingly fast
- Friendly: Includes many examples
Because the D garbage collector can be used as a global allocator.
Because I can and it's useful sometimes.
Primarily for Parin, a game engine I'm working on.
- Maybe think about IO.
- Maybe "copy-paste" this thing: subprocess.h