Declarative Device Headers
Describe registers, signals, power states, and capabilities in .kdh
files, a purpose-built DSL; kdality lint warns about accesses the
header does not allow (the compiler does not reject them yet).
KDAL is a hardware-agnostic abstraction framework for the Linux kernel.
Describe your device in .kdh, implement your driver in .kdc, and let the
compiler generate the kernel module’s C (the generated module does not
build yet: open finding O7). In this ecosystem, KDAL’s module runs in Linux
inside HAVEN’s partition A on HAVEN pull requests that change code, at the
KDAL commit HAVEN pins.
Start with the introduction, then install it; the source is on GitHub.
The same diagram as KDAL’s README (key: Start here, Reading the
diagrams): green parts are built into kdal.ko, which CI loads and tests with its
KUnit suites; the user-space programs build, but CI does not run them
against the module.
| Part | State |
|---|---|
Kernel module (src/, include/) and the kdality CLI |
Active: the device-access driver inside HAVEN’s Linux partition |
Language, kdalc compiler, editor plugins |
Frozen since 2026-11-01: kept, still built and checked by CI |
Declarative Device Headers
Describe registers, signals, power states, and capabilities in .kdh
files, a purpose-built DSL; kdality lint warns about accesses the
header does not allow (the compiler does not reject them yet).
Imperative Driver Logic
Write event handlers in .kdc files with familiar control flow.
The compiler generates Linux kernel C; the generated module does not
build yet (O7).
Backend-Agnostic
A design goal: one driver across QEMU, MMIO, platform devices, Device Tree and VirtIO. Today the example drivers are written against the QEMU backend, and the compiler does not use a driver’s backend.
Full Toolchain
kdalc compiler, kdality CLI (init, lint, simulate, compile, dt-gen,
test-gen), VS Code extension, Vim plugin - everything you need.
curl -fsSL https://raw.githubusercontent.com/NguyenTrongPhuc552003/kdal/main/scripts/installer/install.sh | shOr install the packages from the v0.2.0 release (there is no Homebrew tap and no distribution repository yet):
# Debian / Ubuntu (x86_64)sudo apt install ./kdal_0.2.0-1_amd64.deb ./kdal-dev_0.2.0-1_amd64.deb
# Fedora (x86_64)sudo dnf install ./kdal-0.2.0-1.fc45.x86_64.rpm ./kdal-devel-0.2.0-1.fc45.x86_64.rpmThe release also has archives for macOS (aarch64, x86_64) and Linux
(aarch64, riscv64, x86_64), a source archive, the VS Code extension
(kdal-lang-0.2.0.vsix) and SHA256SUMS.
| Platform | Architecture | Status |
|---|---|---|
| Linux (QEMU aarch64) | ARM64 | Primary target: module and KUnit in CI (Linux 6.18) |
| Linux (native x86_64) | x86_64 | Development host |
| Linux (RISC-V) | riscv64 | Host tools only (release archive); module not tested |
| macOS (Apple Silicon) | ARM64 | Toolchain only |