Kelft

A self-hosted compiler still needs a platform boundary

How Kelft separates language semantics, native object emission, and the host mechanisms that run a program.

By Isaac Ekhagu’ere / EVMlord

Published

What does self-hosted mean?

A self-hosted compiler is written in the language it compiles. In Kelft, the frontend, analysis, lowering, and native object emission are implemented in Kelft. This makes the language itself a substantial consumer of its own features. It does not mean that every component of the installed toolchain is written in Kelft.

Follow the compilation pipeline

Typed Core source passes through checking and lowering before the compiler emits native object bytes directly. It does not invoke a C compiler to produce those objects. Prepared native linkers then assemble the executable: LLVM LLD on Windows and macOS, and GNU ld on Linux. Keeping those stages explicit makes it easier to reason about which component owns a diagnostic, an object-format decision, or a link failure.

Why the host is a separate concern

A compiler decides what a program means and how to represent it for execution. Operating-system access is a different responsibility. Kelft uses a Rust coordinator, Rust platform boundaries on Windows and macOS, and a C supervisor with namespace tools on Linux. These components authenticate inputs, broker access, apply resource limits, and manage process cleanup. A portable language contract and a host implementation solve related but distinct problems.

Where AI fits

Kelft is an AI-native, intent-first programming language. Core describes executable behavior; Intent describes outcomes, constraints, permissions, and verification contracts. The compiler builds accepted source independently of AI generation. The broader authoring workflow and the native alpha have separate availability boundaries: checking an intent declaration alone does not establish that an implementation fulfills it.

Bootstrapping and repeatable builds

A self-hosted compiler needs a starting point. Kelft publishes native bootstrap tooling and source-build instructions with identified inputs. The public release supports rebuilding from its tracked seed without requiring Node or Rust/C development tools. Reproducibility helps inspect the relationship between inputs and outputs; it does not replace behavioral tests or a review of the trusted starting point.

The architectural lesson

The useful boundary is the one that gives each component a clear responsibility. Keep language behavior, object emission, linking, and platform access distinguishable. Then test the contracts between them and document release-specific support. The same approach applies to SDKs and developer platforms: a clear interface is valuable when it explains both the normal path and the point where responsibility changes.

Explore the public source ↗

Kelft case study / Developer tooling services

Need help applying this?

Discuss your project ↗