joka ~main
A nogc utility library.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
🃏 Joka
A nogc utility library for the D programming language. Joka provides data structures and functions that can work without garbage collection, offering precise memory control. It is designed to complement the D standard library, not replace it.
Why Joka
- Minimalistic: Avoids abstractions
- Focused: Doesn't try to support every use case
- Simple: Uses a single global allocator, set at compile time
- Friendly: Memory-safety features and many examples
WebAssembly Support
WebAssembly is supported with the betterC flag, but a tool like Emscripten is required. In case of errors, the i flag may help. The combination -betterC -i works in most cases.
Modules
joka.algo: Range utilitiesjoka.ascii: ASCII string utilitiesjoka.cli: Command-line parsing utilitiesjoka.containers: General-purpose containersjoka.interpolation: IES supportjoka.io: Input and output functionsjoka.math: Mathematical data structures and functionsjoka.memory: Functions for dealing with memoryjoka.types: Common type definitionsjoka.stdc: C standard library functions
Versions
JokaCustomMemory: Allows the declaration of custom memory allocation functionsJokaGcMemory: LikeJokaCustomMemory, but preconfigured to use the D garbage collector
Documentation
Start with the examples folder for a quick overview.
Frequently Asked Questions
Does Joka have an allocator API?
No. Joka is designed to feel a bit like the C standard library because that's easier for most people to understand and keeps the library simple.
Will Joka get a global context like Jai?
No. A public global context tends to make generic low-level APIs fragile. That doesn't mean it's a bad idea. It can be useful for libraries with a specific purpose, such as UI frameworks.
Why aren't some functions @nogc?
Because the D garbage collector can be used to allocate memory with the JokaGcMemory version.
Why are you supporting the D garbage collector?
It's another tool for memory management.
Joka normally uses a tracking allocator in debug builds to help identify mistakes, but the JokaGcMemory version exists for people who prioritize safety.
This approach is similar to the one used in Fil-C.
What is Joka used for?
It's primarily used for Parin, a game engine.
- ~main released a day ago
- Kapendev/joka
- MIT
- Copyright © 2025, Alexandros F. G. Kapretsos
- Authors:
- Dependencies:
- none
- Versions:
-
Show all 47 versions0.1.3 2025-Dec-05 0.1.2 2025-Dec-03 0.1.1 2025-Dec-02 0.1.0 2025-Oct-26 0.0.42 2025-Sep-28 - Download Stats:
-
-
0 downloads today
-
8 downloads this week
-
37 downloads this month
-
374 downloads total
-
- Score:
- 1.4
- Short URL:
- joka.dub.pm