Configuration & Build
helix.toml schema, linker scripts, build commands, cargo workspace, and toolchain setup.
Configuration & Build
Every Helix kernel profile is configured through a helix.toml file, linked with architecture-specific linker scripts, and built with a 12-step LFS-inspired build system. This section covers the real configuration schema, linker scripts, and build commands — all taken directly from the codebase.
helix.toml Schema
The only profile with a helix.toml today is profiles/minimal/. This is the actual file from the repository:
Configuration Options Reference
| Section | Key | Type | Default | Description |
|---|---|---|---|---|
profile | name | String | — | Profile identifier |
profile | target | String | "embedded" | Target use-case |
profile.arch | primary | String | "x86_64" | Primary target architecture |
profile.arch | supported | Array | ["x86_64"] | All supported architectures |
profile.features | multicore | Bool | false | Enable SMP support |
profile.features | hot_reload | Bool | false | Enable runtime module swap |
profile.features | userspace | Bool | false | Enable ring-3 transition |
memory | heap_size_kb | Integer | 256 | Kernel heap in KB |
memory | stack_size_kb | Integer | 16 | Per-thread stack in KB |
memory | virtual_memory | Bool | false | Enable paging |
scheduler | module | String | "round_robin" | Scheduler implementation |
scheduler | time_slice_ms | Integer | 10 | Default time quantum |
console | backend | String | "serial" | Output backend |
console | baud_rate | Integer | 115200 | Serial baud rate |
boot | entry | String | "kernel_main" | Kernel entry function name |
debug | panic_behavior | String | "halt" | "halt" · "reboot" · "dump" |
build | opt_level | String | "s" | "0" · "1" · "2" · "3" · "s" · "z" |
build | lto | Bool | true | Link-Time Optimization |
build | strip | Bool | true | Strip debug symbols |
Profiles Directory
There are 4 profile directories in the repository:
| Directory | Purpose | Contents |
|---|---|---|
profiles/minimal/ | The only runnable kernel profile | helix.toml, linker.ld, linker_pie.ld, src/ (main.rs, boot.rs, framebuffer.rs, filesystem.rs, nexus.rs) |
profiles/limine/ | Limine-specific linker script | linker.ld (352 lines, PIE + KASLR + HHDM) |
profiles/uefi/ | UEFI-specific linker script | linker.ld (339 lines, PIE + RELRO) |
profiles/common/ | Shared base linker script | linker_base.ld (350 lines, included by others) |
Linker Scripts
Minimal — Multiboot2 (flat physical, 1 MB load)
Minimal — PIE variant (higher-half, KASLR-ready)
Limine — PIE with HHDM
Common — Universal base (included by others)
Exported Linker Symbols
| Symbol | Script | Description |
|---|---|---|
_start | All | Entry point — 32-bit trampoline to long mode |
__bss_start / __bss_end | All | Zero-initialized data — cleared to 0 during boot |
_kernel_end | minimal | End of all kernel sections |
__kernel_start / __kernel_end | limine, uefi, common | Kernel image boundaries |
__text_start / __text_end | limine, uefi, common | Code segment — R-X |
__rodata_start / __rodata_end | limine, uefi, common | Read-only data — R-- |
__data_start / __data_end | limine, uefi, common | Mutable data — RW- |
__rela_start / __rela_end | PIE scripts | Relocation entries for KASLR |
__got_start / __got_end | PIE scripts | Global Offset Table |
Build Commands
The build system uses a 12-step LFS-inspired pipeline orchestrated by scripts/build.sh.
The 12 build steps:
| Step | Name | Description |
|---|---|---|
| 0 | Prepare Environment | Validate toolchain, create build dirs |
| 1 | Build Bootloader | Compile boot protocol crate |
| 2 | Build Kernel Core | Compile helix-core |
| 3 | Build Memory Subsystem | Compile helix-memory |
| 4 | Build Scheduler | Compile helix-execution + DIS |
| 5 | Build I/O Subsystem | Compile drivers and I/O |
| 6 | Build Module System | Compile helix-modules |
| 7 | Build Communication Layer | Compile IPC + syscalls |
| 8 | Build System Interface | Compile helix-userspace |
| 9 | Build Userland Framework | Compile userspace tools + shell |
| 10 | Test All | Run cargo test on host target |
| 11 | Package Kernel | Link final ELF, strip, create ISO |
Cargo Workspace
The root Cargo.toml defines the workspace with 14 member crates:
Cargo Build Profiles
Toolchain
To create a new profile, create a directory under
profiles/with at minimum aCargo.toml, alinker.ld, and asrc/main.rs. Add it to the workspacemembersarray in the rootCargo.toml, configure ahelix.tomlfor your target settings, and build with./scripts/build.sh.