Print Mbak Ika's repair slips with real Cargo: println!, if else, a small release build, generics. 16 levels, right in the browser.
Ms. Ika is back from three years at a bicycle factory in Bekasi and has opened her father's shop again at the mouth of Nyamplung Lane. Its prices used to live in Mr. Harjo's head. Now Ms. Ika writes them into a Rust program, because that program must never be wrong. Rust is a compiled language: rustc checks all the code first, then translates it into one file of machine code. If something is wrong, not a single line runs. On every level the program is built and run by the real Cargo and rustc 1.99, so its messages and printed lines are Rust's own.
A program keeps its data in memory, and data no longer used has to be thrown away. JavaScript, Python and Go use a garbage collector, a helper that now and then sweeps unused data while the program runs. C leaves it to the programmer, and one slip can read memory that was already thrown away. Rust takes a third road: every piece of data has one owner, and when the owner is done, the compiler itself puts in the code that throws it away. A borrow that would live longer than its data is refused at compile time.
cargo build makes a debug version in target/debug: quick to build and easy to inspect. cargo build --release makes a release version in target/release: optimised for real use. The result is machine code for the processor and operating system it was built on. The computer that runs it does not need Rust installed. [profile.release] in Cargo.toml sets how the release version is built.
if picks a path by a condition. The condition is written without brackets, and the curly braces { } are required even for one line. An if, else if, else chain is checked from the top. The first true branch runs, the rest are skipped, and else catches everything that did not match.
In Rust if also gives a value: let x = if condition { a } else { b }; fills x with a or b. Rust has no ? : operator as JavaScript does, because if can already do it. The value inside a branch is written without a semicolon. The semicolon goes at the end of the let line.
Generics make one function work for many types. The type is written as a blank, usually T, in a type list after the function name. The compiler fills T from the argument the caller sends. The Vec<T> and Option<T> you already use are generic too.