1fb715a1d4
HTTP Server: - Replaced asynchttpserver with hunos (multi-threaded, trie router, CORS middleware) - JWT authentication via jwt-nim-baraba (HS256 with BearSSL crypto) - POST /query, GET /health, GET /metrics, POST /auth, GET /api (OpenAPI spec) - Proper CORS headers via hunos corsMiddleware WAL Recovery: - recover() now actually applies committed entries (REDO) - Skips uncommitted entries (UNDO) - Takes optional LSMTree parameter to apply recovery SSTable Compaction: - Real compaction: reads SSTable entries, merges by key (newest wins), writes merged file - Deduplication: keeps only newest version per key - Tombstone cleanup: removes deleted entries - Old SSTable files deleted after merge Dependencies: - Added hunos >= 1.2.0 and jwt >= 2.1.0 to nimble SSTable fields exported for compaction access. All 216 tests pass
27 lines
728 B
Nim
27 lines
728 B
Nim
# Package
|
|
version = "0.1.0"
|
|
author = "BaraDB Team"
|
|
description = "BaraDB — Multimodal database written in Nim"
|
|
license = "Apache-2.0"
|
|
srcDir = "src"
|
|
bin = @["baradadb"]
|
|
binDir = "build"
|
|
|
|
# Dependencies
|
|
requires "nim >= 2.2.0"
|
|
requires "hunos >= 1.2.0"
|
|
requires "jwt >= 2.1.0"
|
|
|
|
# Tasks
|
|
task build_debug, "Build debug version":
|
|
exec "nim c --debugger:native --linedir:on -o:build/baradadb src/baradadb.nim"
|
|
|
|
task build_release, "Build release version":
|
|
exec "nim c -d:release --opt:speed -o:build/baradadb src/baradadb.nim"
|
|
|
|
task test, "Run all tests":
|
|
exec "nim c -r tests/test_all.nim"
|
|
|
|
task bench, "Run benchmarks":
|
|
exec "nim c -d:release -r benchmarks/bench_storage.nim"
|