Projects / 2020
joosc
A Java 1.3 compiler targeting x86 assembly, written in Rust with a team of three: no lex, no yacc, from scratch.
joosc is a compiler for (a healthy subset of) Java 1.3, written in Rust as a team of three. It takes Java source and emits x86 assembly directly: no JVM, no bytecode, no shortcuts.
Everything is hand-built: the lexer and parser were written from scratch rather than generated by lex or yacc, followed by full name resolution, type checking, static analysis, and code generation. Building each stage yourself permanently changes how you read compiler errors: you start seeing the phase that produced them.
It’s also the project that sold me on Rust for serious work: a compiler is one giant tree-manipulation problem, and pattern matching plus a paranoid type system made an intimidating project feel almost guided.