packages/std
Official Kale Standard Library
The backbone of all Kale software. Delivers generic lists, dynamic byte buffers, hash maps, piece tables, path manipulation, directory walkers, and UTF-8 string builders. Designed for maximum runtime performance and zero unnecessary allocations.

Zero-Overhead Foreign Function Interface
Kale links directly against native C dynamic libraries with no runtime marshaling wrapper. Functions declared with extern symbols resolve directly through the platform loader (kernel32, user32, opengl32, glfw3, sqlite3).

import "packages/std/collections/list.kl" as list;
import "packages/std/fs/path.kl" as path;
import "packages/std/text/string_builder.kl" as sb;
fn main() -> int32 {
let b: sb.StringBuilder = sb.new();
sb.append(&b, "Kale standard library initialized at: ");
sb.append(&b, path.join("packages", "std"));
print(sb.to_string(&b));
return 0;
}Deterministic command-line invocations to build, link native dynamic dependencies, and run automated regression tests:
kale build tests/test_std_collections.kl -o bin/test_std.exe./bin/test_std.exeGPG Key 1B917D4779A6102E • Continuous integration with automated symbol verification.
Generic dynamic arrays, ring buffers, and fast associative map implementations.
Cross-platform path resolution, recursive directory traversal, and file manipulation.
Industrial-strength text editing data structure used across both the compiler and the flagship editor.