Linguagem de programação moderna com sintaxe Ruby-like, OOP + funcional, interpretada e compilada (AOT), GUI nativo multiplataforma e web frontend
  • Ruby 88.3%
  • HTML 7%
  • CSS 1.3%
  • Shell 1.1%
  • Python 1%
  • Other 0.9%
Find a file
Rodrigo Mendonça 03a761b17b
Some checks are pending
CI / build-and-test (push) Waiting to run
GitHub Mirror / mirror (push) Waiting to run
Convert .md files to KOD format (.kd)
Converted 205 file(s) from Markdown to KOD (Koder Document) format.
KOD is now the default document format on Koder Flow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:02:13 -03:00
.gitea/workflows release: v6.2.0 — FULL SELF-HOSTING: All Rust code removed 2026-03-20 12:47:51 -03:00
.githooks v3.1.0: CI/CD pipeline, Makefile, CONTRIBUTING.md 2026-03-14 18:21:11 -03:00
backlog Convert .md files to KOD format (.kd) 2026-03-21 21:02:13 -03:00
benchmarks feat: benchmarks multi-lang, playground interativo, backlog EN, YAML/interpreter melhorias 2026-03-19 20:28:10 -03:00
docs Convert .md files to KOD format (.kd) 2026-03-21 21:02:13 -03:00
editor/vscode Convert .md files to KOD format (.kd) 2026-03-21 21:02:13 -03:00
editors/vscode Convert .md files to KOD format (.kd) 2026-03-21 21:02:13 -03:00
examples feat: benchmarks multi-lang, playground interativo, backlog EN, YAML/interpreter melhorias 2026-03-19 20:28:10 -03:00
scripts feat: live benchmark — all languages execute on server (#086) 2026-03-20 16:37:19 -03:00
self-hosted fix: clone flags (0x10F00), local labels → global in GC runtime 2026-03-21 18:43:26 -03:00
spec Convert .md files to KOD format (.kd) 2026-03-21 21:02:13 -03:00
src feat: benchmarks multi-lang, playground interativo, backlog EN, YAML/interpreter melhorias 2026-03-19 20:28:10 -03:00
tests release: v6.2.0 — FULL SELF-HOSTING: All Rust code removed 2026-03-20 12:47:51 -03:00
website feat: Open Graph meta tags for WhatsApp/social sharing 2026-03-20 17:18:40 -03:00
.gitattributes ticket 027: Website updated — logo, stats, .kd syntax highlighting 2026-03-14 22:55:43 -03:00
.gitignore refactor: simplificar bootstrap_frontend e atualizar compiler/native_test 2026-03-16 22:45:43 -03:00
CHANGELOG.kd Convert .md files to KOD format (.kd) 2026-03-21 21:02:13 -03:00
CONTRIBUTING.kd Convert .md files to KOD format (.kd) 2026-03-21 21:02:13 -03:00
DEVELOPMENT_PLAN.kd Convert .md files to KOD format (.kd) 2026-03-21 21:02:13 -03:00
icon-256.png feat: inicializa koder-lang — linguagem de programação com sintaxe Ruby-like 2026-03-12 11:36:39 -03:00
icon-512.png feat: inicializa koder-lang — linguagem de programação com sintaxe Ruby-like 2026-03-12 11:36:39 -03:00
icon.svg chore: sync brand svg assets 2026-03-19 22:49:42 -03:00
koder-bootstrap release: v6.2.0 — FULL SELF-HOSTING: All Rust code removed 2026-03-20 12:47:51 -03:00
koder.toml feat: benchmarks multi-lang, playground interativo, backlog EN, YAML/interpreter melhorias 2026-03-19 20:28:10 -03:00
LICENSE feat: inicializa koder-lang — linguagem de programação com sintaxe Ruby-like 2026-03-12 11:36:39 -03:00
Makefile release: v6.2.0 — FULL SELF-HOSTING: All Rust code removed 2026-03-20 12:47:51 -03:00
README.kd Convert .md files to KOD format (.kd) 2026-03-21 21:02:13 -03:00

Koder

A 100% self-hosted programming language. Ruby-like syntax. Native x86_64 performance. Zero external dependencies.

Koder's compiler, interpreter, VM, native code generator, and every tool in the toolchain are written in Koder itself. The compiler compiles itself (Stage-2 to Stage-3 bootstrap proven), producing standalone Linux ELF binaries with no Rust, C, or LLVM in the loop.

Quick Start

git clone https://flow.koder.dev/koder/koder-lang.git
cd koder-lang
make bootstrap   # download the last Rust-era binary (one-time, v6.1.0)
make build       # build koder from its own source — self-hosted
./koder run examples/hello.kd

After make build, the koder binary on disk was produced entirely by Koder source code.

Features

  • 100% self-hosted — compiler, interpreter, VM, native codegen, and all tools written in Koder
  • Zero Rust dependencies — fully bootstrapped; the Rust implementation is history
  • Ruby-like syntax — expressive, familiar, productive
  • Native x86_64 ELF binaries — standalone ~36 KB executables, no runtime needed
  • 5 execution backends — interpreter, bytecode VM, native AOT, JavaScript transpiler, WebAssembly
  • Multi-paradigm — OOP, functional, metaprogramming
  • 50+ stdlib modules — Math, JSON, Regex, File, Net, Crypto, SQLite, Redis, JWT, gRPC, and more
  • Full toolchain built-in — REPL, debugger, formatter, linter, LSP, doc generator, package manager, test framework
  • VS Code extension — syntax highlighting, LSP integration, snippets

Architecture

The entire toolchain lives in self-hosted/, written in Koder (.kd):

self-hosted/
├── koder_cli.kd              # CLI entry point (15+ commands)
├── koder_compiler.kd         # Bytecode compiler
├── koder_compiler_pure.kd    # Pure Koder compiler (no FFI)
├── koder_native.kd           # x86_64 native AOT code generator
├── koder_interpreter.kd      # Tree-walking interpreter
├── koder_vm.kd               # Stack-based virtual machine
├── koder_js.kd               # JavaScript transpiler
├── koder_wasm.kd             # WebAssembly compiler
├── koder_fmt.kd              # Code formatter
├── koder_lint.kd             # Linter (30+ rules, auto-fix)
├── koder_lsp.kd              # Language Server Protocol
├── koder_debug.kd            # Interactive debugger
├── koder_doc.kd              # Documentation generator
├── koder_pkg.kd              # Package manager (workspaces, scripts)
├── koder_repl.kd             # Interactive REPL
├── koder_convert.kd          # Ruby/Python/Crystal source converter
├── koder_run.kd              # Script runner
├── koder_selfhosted.kd       # Self-host orchestration
└── lib/
    ├── lexer.kd              # Tokenizer
    ├── bootstrap_parser.kd   # Pratt parser
    ├── bootstrap_tokenizer.kd
    ├── bootstrap_compiler.kd # Bootstrap compiler
    ├── bootstrap_frontend.kd # Bootstrap frontend
    ├── bootstrap_vm.kd       # Bootstrap VM
    ├── compiler_backend.kd   # Compiler backend
    ├── elf_gen.kd            # ELF binary generator
    ├── interpreter_runtime.kd
    ├── js_transpiler.kd
    └── wasm_transpiler.kd

Bootstrap Chain

Stage 0:  Rust binary (v6.1.0) — the last Rust-era release
Stage 1:  koder-bootstrap compiles self-hosted/*.kd → Stage-1 koder binary
Stage 2:  Stage-1 koder compiles self-hosted/*.kd → Stage-2 koder binary
Stage 3:  Stage-2 koder compiles self-hosted/*.kd → Stage-3 koder binary  ✓ identical

Stage-2 and Stage-3 produce identical binaries, proving the compiler is correct and fully self-sustaining.

Build from Source

Prerequisites: nasm, ld (GNU binutils), wget — all standard on Linux.

# One-time bootstrap (downloads the last Rust-built binary)
make bootstrap

# Build koder from Koder source
make build

# Run tests
make test

# Install system-wide
sudo make install

# Verify
koder version   # koder v6.2.0

The build process: koder-bootstrap compiles self-hosted/koder_cli.kd to x86_64 assembly, nasm assembles it, and ld links the ELF binary. No Rust. No C compiler. No LLVM.

Usage

koder run app.kd                # interpret a script
koder build app.kd -o app       # compile to native ELF binary (~36 KB)
koder compile app.kd -o app.kdc # compile to bytecode
koder vm app.kdc                # run bytecode on the VM
koder js app.kd -o app.js       # transpile to JavaScript
koder wasm app.kd -o app.wat    # compile to WebAssembly
koder repl                      # interactive REPL
koder fmt app.kd                # format code
koder lint app.kd               # static analysis
koder doc src/ -o docs/         # generate HTML docs
koder debug app.kd              # interactive debugger
koder lsp                       # start Language Server
koder test tests/               # run tests
koder convert app.rb -o app.kd  # convert Ruby source to Koder

Examples

# Classes with inheritance
class Animal
  attr_accessor :name, :age

  def initialize(name, age)
    @name = name
    @age = age
  end

  def to_s
    "#{@name} (age #{@age})"
  end
end

class Dog < Animal
  def speak
    "#{@name} says Woof!"
  end
end

rex = Dog.new("Rex", 4)
puts rex.speak  # => Rex says Woof!
# Functional pipeline
result = (1..20).to_a
  .select { |n| n.even? }
  .map { |n| n ** 2 }
  .reject { |n| n > 100 }
  .sum
puts result  # => 220
# Pattern matching
def classify(val)
  case val
  when Integer then "integer"
  when String then "string"
  when 90..100 then "A grade"
  else "unknown"
  end
end
# Lambdas and currying
add = -> (a, b) { a + b }
add5 = add.curry.call(5)
puts add5.call(3)  # => 8
# Metaprogramming
class Ghost
  def method_missing(name, *args)
    "Ghost received: #{name}"
  end
end

See CODE0 for 50+ runnable programs covering HTTP servers, concurrency, pattern matching, database access, FFI, GUI, and more.

Language Features

CategoryFeatures
CoreVariables, constants, string interpolation, operators, ranges
Control flowifelsifelse, unless, while, until, for-in, casewhen, loop, breaknext
MethodsDefault params, splat *args, blocks, yield, &block, lambdas, procs, curry
OOPClasses, inheritance, modules, mixins, includeextendprepend, visibility
Metaprogrammingmethod_missing, define_method, class_eval, instance_eval, send, refinements
CollectionsArray, Hash, Set, Queue, Stack, LinkedList, SortedSet, Matrix, Struct
NumericInteger, Float, Complex, Rational, numeric tower
Exceptionsbeginrescueensure, exception hierarchy, retry, throw/catch
ConcurrencyThread, Mutex, Fiber, Channel, Atomic
Pattern matchingType matching, range matching, array/hash destructuring, guards
I/OFile, Dir, IO, Net (HTTP), Process, Env
EncodingBase64, Digest (MD5, SHA-256), JSON, CSV, Regex
StdlibMath, Time, Date, DateTime, GC, Signal, Benchmark, ObjectSpace

Documentation

License

MIT License — Copyright (c) 2026 Koder

  • Repository: https:/flow.koder.devkoder/koder-lang
  • Releases: https:/flow.koder.devkoderkoder-langreleases/latest