For Hoomans Coming from Rust

You already know Rust. The cat respects this. This page exists to let you start writing lolrust without re-reading anything you have already memorized.

The headline: lolrust is a transpiler. Your .meow file becomes a .rs file before rustc ever sees it. The borrow checker, the type system, the macros, the lifetimes ~ all of it is unchanged. You are still writing Rust. You are just writing it in cat.

The Vocabulary You Will Need First

The keywords you will use in your first ten minutes of lolrust. The full reference, with edge cases, lives at The Keyword Reference.

RustLolRust (Classic)LolRust (Beginner)
fniz~
leti can hazmake
let muti can haz wigglymake wiggly
mutwiggly~
if / elseif ceiling cat sez / or basement cat sezwhen / otherwise
matchsniff or skritch dat~
loopzoomzoomdo this
for ... inchase ... around or furrever ... around~
whileprowlrepeat while
returncough up or yeet~
println!meow!say or bigsay
eprintln!hisss!yell
panic!ohno!~
structloaf~
implteech or pounce~
enumflavurz~
traitskillz~
StringYarn~
VecPile~
OptionMaybeCheezburgr~
ResultTryz~
Some / NoneHas / EmptyBowl~
Ok / ErrPurrfect / Hairball~
true / falseyus / nope~
self / Selfdis / Dis~
superchonk~
cratebigchonk~
usegimme~
modbox~
unsafeyolo~
async / awaitlazee / waitforit~
moveyoink~
aspretend iz~
wherebut only if~
#[derive(...)purrive(...)~
.clone().copycat()~

A Side-by-Side

The same trivial program in both languages.

Rust:

fn main() {
    let mut counter = 0;
    for i in 1..=10 {
        if i % 2 == 0 {
            counter += 1;
            println!("even: {}", i);
        }
    }
    println!("found {} evens", counter);
}

LolRust (classic):

iz main() {
    i can haz wiggly counter = 0;
    chase i around 1..=10 {
        if ceiling cat sez i % 2 == 0 {
            counter += 1;
            meow!("even: {}", i);
        }
    }
    meow!("found {} evens", counter);
}

Same behavior. Same emitted code. The .rs file produced by lolrust counter.meow --emit-rs is byte-equivalent to the Rust above, modulo whitespace.

What Does Not Change

What Does Change

Build Your First LolRust Crate

In Rust you would cargo new and edit src/main.rs. In lolrust:

lolrust kibble init my_kitteh
cd my_kitteh
lolrust kibble run

kibble is lolrust’s cargo. Build artifacts go in litter_box/ instead of target/. The manifest is Kibble.toml with a [kitteh] section instead of [package]. The mapping is one-to-one and shallow on purpose. For interop with full cargo (workspaces, real dependencies, cargo build directly), see Cargo Wat?.

When You Hit a Wall

The most common stumbling block for Rust devs writing lolrust is reflexive habit. You will type fn and get a “WHERE IZ IT?? not found” because lolrust does not know fn. The fix is to either rewrite to the cat keyword (iz), or pass the --explain flag so rustc’s error messages come back through the cat translator.

The second most common stumbling block is autocomplete. Your editor does not know lolrust. The VS Code extension handles syntax highlighting and snippets. Other editors are on you.

Final Note

Lolrust is a real language only insofar as it transpiles to real Rust. Anything Rust can do, lolrust can do, just spelled differently. Anything Rust cannot do, lolrust also cannot do.

The cat is in charge of spelling. Be patient with the cat.