Skip to content

Installation

Install the KDAL SDK with one command:

Terminal window
curl -fsSL https://raw.githubusercontent.com/NguyenTrongPhuc552003/kdal/main/scripts/installer/install.sh | sh

This installs kdalup, the KDAL version manager, in ~/.kdal/bin/ and runs kdalup install, which downloads the latest release. The default profile, minimal, installs kdalc, kdality and the standard library: enough for driver development. kdalup install --profile full adds the kernel headers, the CMake package and the Vim syntax files.

After install, restart your shell or run:

Terminal window
export PATH="$HOME/.kdal/bin:$PATH"
Terminal window
kdalup version # Show installed version
kdalup list # List all components
kdalup update # Update to latest release
kdalup self-update # Update kdalup itself
kdalup install v0.2.0 # Install a specific version
kdalup uninstall # Remove everything
Terminal window
KDAL_HOME=/opt/kdal curl -fsSL .../install.sh | sh

Or install the packages from the v0.2.0 release (there is no Homebrew tap and no distribution repository yet):

Terminal window
# 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.rpm

The 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.

  • macOS (M1/M2/M3/M4) or Linux (x86_64 or aarch64)
  • QEMU with aarch64 system emulation
  • Cross-compiler for aarch64 (if host is not aarch64)
  • Linux 6.6 LTS kernel source for the module build (scripts/env/kernel.sh fetches 6.6.80; KDAL’s CI builds the module against Linux 6.18)
Terminal window
brew install qemu aarch64-elf-gcc dtc cppcheck
  1. Install host dependencies:
Terminal window
./scripts/env/dependencies.sh
  1. Prepare QEMU environment:
Terminal window
./scripts/env/prepare.sh
  1. Build guest kernel with KUnit and module support:
Terminal window
./scripts/env/kernel.sh
  1. Build compiler, CLI, docs, and editor artifacts:
Terminal window
./scripts/dev/build.sh --variant release all
  1. Build the kernel module against your prepared kernel tree:
Terminal window
KDAL_KERNEL_DIR=$HOME/kdal-qemu/kernel/linux-6.6.80 \
./scripts/dev/build.sh --variant debug module
  1. Run smoke tests and local validation:
Terminal window
./scripts/ci/test.sh
./scripts/dev/test.sh --variant release all
  1. Launch QEMU and load module:
Terminal window
cp kdal.ko $HOME/kdal-qemu/shared/modules/
./scripts/env/run.sh

Inside the QEMU guest:

Terminal window
mount -t 9p -o trans=virtio kdal-share /mnt
insmod /mnt/modules/kdal.ko
Command Description
./scripts/dev/build.sh --variant release all Build compiler + CLI + website + VS Code extension
./scripts/dev/build.sh --variant debug module Build kernel module (requires KDAL_KERNEL_DIR)
./scripts/dev/build.sh --variant debug kdalc Build kdalc compiler with symbols
./scripts/dev/build.sh --variant release kdality Build kdality CLI
./scripts/dev/test.sh --variant release all Run local validation suite
./scripts/ci/test.sh Run the CI smoke-test contract locally
./scripts/dev/build.sh --variant asan clean Remove ASan build artifacts

For normal local development, prefer --variant release|debug|asan. Reserve --preset for automation-only trees such as ci-release, nightly, and release-matrix.

Terminal window
# Check the compiler
kdalc --version
# Check the CLI tool
kdality version
# List installed components
kdalup list

Once QEMU is running with the module loaded:

Terminal window
lsmod | grep kdal
ls -la /dev/kdal
cat /sys/kernel/debug/kdal/version
cat /sys/kernel/debug/kdal/devices
Problem Solution
/dev/kdal not found Check `dmesg \
Module won’t load Verify kernel version matches build headers
ENODEV on device ops Ensure backend initialized before drivers
Permission denied Use sudo or set udev rules for /dev/kdal