A collection of standalone Odin utility packages. Each subdirectory is an independent package with no inter-package dependencies — use only what you need.
| Package | Description |
|---|---|
btree |
In-memory B-Tree with reference-counted nodes, COW cloning, and free-list recycling. Port of google/btree. |
colors |
RGB, RGBA, CMYK, HSL/HSV color types with conversions and basic filters (grayscale, sepia, alpha blend). |
dxt |
DXT1/DXT5/BC4/BC5 4x4 block compressors. Pure Odin rewrite of stb_dxt.h. |
filepos |
Maps byte offsets to human-readable line/column positions for parser error messages. |
i18n |
Internationalization basics — plural form dispatch and relative date formatting (English, Russian). |
jsonc |
Strip // and /* */ comments from JSON before parsing. |
kvcfg |
Parser and serializer for a simple key = value config format with comments. |
rect_pack |
Skyline rectangle bin-packer. Pure Odin rewrite of stb_rect_pack.h. |
utils |
Grab-bag: math, string ops, slice helpers, semver, strftime, vectors/matrices, geometry, ring buffer, fuzzy search, and more. |
- Odin compiler (July 2025 or newer)
- No external dependencies — only
core:*andbase:*standard library imports
Import any package by path:
import "path/to/dssodinlib/btree"
import "path/to/dssodinlib/utils"Add the repository root to your project's import path via -I or ODIN_ROOT.
odin test btree # run all tests for a single package
odin test colors
odin test dxt
odin test filepos
odin test i18n
odin test jsonc
odin test kvcfg
odin test rect_pack
odin test utilsAll packages include _test.odin files using core:testing. The btree and rect_pack tests use mem.Tracking_Allocator to verify zero memory leaks; the dxt tests do the same to prove the compressors never allocate.
See individual package headers for attribution. btree, dxt, and rect_pack are ports of externally-licensed code.