Osteon is a structured assembly language with a type-aware, human-readable syntax. It is designed for systems programmers who need assembly-level control without the noise of raw assembly, and for LLM agents that require an unambiguous format to generate correct machine code.
Osteon is "bone-level" code: what you write maps 1:1 to machine instructions. There is no hidden stack management, no garbage collector, and no implicit calling convention.
- Explicit Machine State: Every instruction is visible. Sugar (like loops and arenas) desugars transparently via
--dry-run. - DOD-First: Native support for SoA (Struct of Arrays) layouts and Arena Allocation with inline bump-pointer arithmetic.
- LLM-First Design: Compiler errors provide exact "Correction" fields and JSON output to enable autonomous agent self-correction.
- Static Analysis Pipeline: Advanced checks for clobbering, uninitialized register reads, unreachable code, and width inconsistencies.
- Arch-Agnostic Source: The same
.ostnsource is valid across targets, with the compiler handling the heavy lifting of encoding (currently targeting x86-64).
- Odin Compiler (for building the Osteon compiler).
- Just (optional task runner).
# Clone the repository
git clone https://github.com/your-repo/osteon.git
cd osteon
# Build the compiler
just build
# OR
odin build compiler -out:osteon.exe# Compile and run an example (Windows x64)
./osteon.exe examples/hello.ostn
./hello.exefn add_nums {
let a = rcx # Register aliases
let b = rdx
add(u64) a, b # Explicit width annotations
mov(u64) rax, a
ret
}
layout(soa) struct Particle {
x: f32,
y: f32,
vx: f32,
vy: f32,
}
fn update {
arena pool = init(rdi, imm(1024))
alloc(pool, imm(SIZEOF_SOA(Particle, 100)), imm(64))
let pts = rax
for rcx = imm(0), imm(100), imm(1) {
# Loop body with transparent desugaring
}
ret
}
| Flag | Description |
|---|---|
--check |
Validate syntax and logic without emitting code. |
--dry-run |
Show fully desugared/inlined source. |
--release |
Strip assert and breakpoint instructions. |
--json |
Output errors in machine-readable JSON format. |
--debug |
Emit RADDBG debug information. |
--explain <CODE> |
Get a plain-English explanation of an error code. |
compiler/: The Osteon compiler implementation (Odin).docs/: Detailed language and performance specifications.examples/: Sample.ostnprograms demonstrating features.tests/: Comprehensive test suite (valid and invalid cases).ml/: Experimental integration for LLM sidecars and local models.
Use the provided justfile for common development tasks:
just build # Build the compiler
just test # Run the test suite
just clean # Remove build artifacts[Insert License Information Here]