• v5.2.0 a742bfb9e9

    v5.2.0 — Native Codegen: Variables, Control Flow & Logical Ops
    Some checks are pending
    CI / build-and-test (push) Waiting to run
    Stable

    root released this 2026-03-16 12:39:45 -03:00 | 127 commits to main since this release

    What's New in v5.2.0

    Self-Hosted Native Code Generator

    Koder can now compile programs to standalone x86_64 ELF binaries (238-439 bytes) via its self-hosted pipeline:

    source → tokenize → parse → compile → native x86_64 ELF → execute
    

    Supported in native codegen:

    • Integer constants and arithmetic (+, -, *, /, %)
    • String output (inline sys_write)
    • Variables (STORE/LOAD with rbp-relative addressing)
    • All comparisons (<, >, ==, !=, <=, >=)
    • Logical operators (&&, || with short-circuit)
    • If/else with label patching
    • While loops with backward branching
    • Function definitions and calls (FUNC/CALL/RETURN with stack frames)
    • Multiple functions in same binary
    • Booleans, nil, POP, DUP

    15 Native ELF Tests Passing

    Test Program Result Size
    NT1 puts 42 42 238B
    NT2 1+2*3 7 260B
    NT7 fib(10) iterative 55 410B
    NT11 puts "Hello, Koder!" Hello, Koder! 264B
    NT13 add(3,4) 7 346B
    NT14 square(9) 81 325B
    NT15 double(7) + triple(5) 14, 15 439B

    Bootstrap Self-Hosted Pipeline

    • 3800+ lines of Koder processing Koder
    • 11 VM bytecode tests + 15 native codegen tests
    • Full tokenizer, parser, compiler, VM, and native codegen

    Parser Fixes

    • Added % (modulo), !=, <=, >= operators
    • Added string literal tokenization (double/single quotes)
    • Fixed JUMP dispatch operator bug

    Infrastructure

    • Version 5.2.0
    • 20 Rust integration tests passing
    • Backlog #035: Native HTTP protocol & server (pending)
    Downloads