Freelang – a Libc-free, direct sys/kernel call language with weird concurrency

keepamovin1 pts0 comments

FreedomLang | Libc-Free Native Tools, Explicit State

No libc. No VM. No hidden jobs.

Native x86-64.

OS-process jobs.

No libc.

"Model the world as data. Treat bugs as fatal."

FreedomLang is a small AOT systems language that lowers source through a compact IR to<br>libc/CRT-free native x86-64. Linux emits ELF64 machine-code bytes directly; macOS and<br>Windows emit platform assembly. Jobs are real OS processes with filesystem-visible state.

View on GitHub<br>See the Code

Linux ELF, no libc

macOS -nostdlib

Windows PE/COFF, no CRT

No more magic &rarr;

No Runtime Maze

No VM, JIT, LLVM IR path, or libc/CRT in generated programs. The compiler is readable JavaScript lowering through a compact IR.

Bugs Die There

Bad tags, bad field access, and impossible states terminate immediately. No exception soup pretending bugs are data.

The World Is Data

Missing files, permission failures, and network timeouts are explicit states, not hidden recovery paths.

Native Artifacts

Linux emits ELF64 machine code directly. macOS emits x86-64 AT&T assembly. Windows emits x86-64 assembly for PE/COFF.

Actual Processes

Linux/macOS use fork; Windows uses CreateProcessA. FSABI inbox/outbox paths make job state inspectable.

UTF-8 & Bytes

First-class byte arrays and UTF-8 string conversion. Handle binary protocols naturally.

Byline

Native x86-64 without libc. Concurrency as inspectable OS processes.

The Weird Parts

Generated programs are libc/CRT-free. There is no VM, JIT, or LLVM IR path. Linux writes ELF64 machine code directly, macOS emits AT&T assembly, and Windows emits assembly linked into PE/COFF.

The Tradeoff

Process-per-job concurrency is heavier than goroutines or async tasks. The point is a smaller story: job state you can inspect on disk, failure boundaries the OS understands, and execution that humans and AI agents can reason about.

Backends and Process Model

These are the backend paths in the current compiler source. There is no bytecode VM: Linux emits x86-64 machine-code bytes directly, while macOS and Windows emit platform assembly for native linkers.

Target<br>Code output<br>Process backend<br>Concurrency state

Linux x86-64<br>Direct ELF64 with raw x86-64 machine code and kernel syscalls.<br>fork syscall; wait4/waitpid for joins.<br>FSABI tree under /tmp/freelang/jobs.

macOS x86-64<br>AT&T x86-64 assembly linked as Mach-O with -nostdlib.<br>Darwin fork syscall; wait4 for joins.<br>FSABI tree under /tmp/freelang/jobs.

Windows x86-64<br>x86-64 assembly linked into PE/COFF without CRT default.<br>CreateProcessA self re-exec with worker flags; WaitForSingleObject for joins.<br>FSABI tree under %TEMP%\freelang\jobs.

The cost is that process-per-job concurrency is heavier than goroutines or green threads. The benefit is containment and auditability: job boundaries are OS process boundaries, and values cross those boundaries through files you can inspect.

Feature Domains

FreedomLang is early, but its core claims are implementation-backed. The table separates what is solid today from surfaces that are still being hardened.

Domain<br>Status<br>What exists now<br>Honest note

Native compiler pipeline<br>✅ covered<br>Parser, IR lowering, and x86-64 backends live in the repo.<br>No serious optimizer yet; the compiler is pre-1.0.

Node-readable compiler<br>✅ covered<br>The compiler is JavaScript source run with Node.js, not a sealed project-specific compiler binary.<br>Node.js is still a binary dependency; the claim is about the FreedomLang compiler distribution.

Native targets<br>✅ covered<br>Linux ELF64 machine code, macOS Mach-O via AT&T assembly, and Windows PE/COFF via native x86-64 assembly.<br>Windows is native assembly for the Microsoft ABI, not a VM or transpiler path.

Small binaries, no libc/CRT default<br>🟡 bounded<br>Generated programs are libc/CRT-free across the supported backend paths and emit helper code only as needed.<br>Smaller dependency surface is not a security proof; OS APIs and runtime helpers still matter.

Bounds, shape, and fast-fail checks<br>✅ covered<br>Array/object access checks, fatal invalid-state paths, fall, assert, and expect_eq.<br>Runtime checking, not static memory safety or formal verification.

Custom operators<br>✅ covered<br>Positional, object-shaped, infix, shaped infix, and value-shape operator forms.<br>The syntax is unusual and will need careful examples and restraint.

FSABI concurrency<br>✅ covered<br>Fork blocks, handles, wait, blocking fork sugar, job directories, and inbox/outbox paths. Linux/macOS use fork; Windows uses CreateProcessA.<br>Favors explicit process/job semantics over lightweight in-process concurrency.

Chaos/world-state modeling<br>🟡 hardening<br>with chaos and chaos tags model external outcomes as explicit data.<br>Strongest on macOS today; Linux and Windows parity are still moving.

Heap and GC<br>🟡 hardening<br>Heap allocation exists across targets; macOS has the strongest generated GC path today.<br>No-heap/no-GC mode is an aspiration, not a stable flag yet.

AI-agent ergonomics<br>🟡 thesis<br>Small compiler, explicit jobs, behavior tests, and visible failure...

libc macos windows assembly native linux

Related Articles