Online Rust Editor and Compiler for Interviews
Write and run Rust programs right in the browser, with no rustup or cargo to install: the code compiles on the server, and compiler messages and output show up at once. For an interview, open a shared session and send the candidate a link. Free, no sign-up.
Free, no sign-upHow to run a live coding interview in RustCollaborative code editors comparedCode sample
fn max_profit(prices: &[i32]) -> i32 {
let mut best = 0;
let mut min_price = i32::MAX;
for &p in prices {
min_price = min_price.min(p);
best = best.max(p - min_price);
}
best
}
fn main() {
println!("{}", max_profit(&[7, 1, 5, 3, 6, 4]));
}
Output
5
What the editor does
- Rust 1.68: the program is compiled with rustc and runs on the server in an isolated sandbox, and every participant sees compiler messages and output.
- Detailed compiler errors: borrowing, lifetimes, and type mismatches come with line numbers, which makes them easy to discuss with the candidate.
- The standard library is at hand: Vec, HashMap, BTreeMap, VecDeque, iterators, Option, and Result.
- Real-time collaborative editing: up to 5 participants in one session, with edits and cursors visible instantly.
- The task bank is open without an account. After a free sign-in: your own tasks, an interview mode with timers, candidate scoring, and interview history.
How to run the interview
- Click "Run an interview" — the session is created with a sample program, which you can replace with your own task.
- Describe the problem in Markdown and send the link to the candidate: they need no sign-up.
- Have the candidate verify the solution with calls from main and output through println!. Put input data in the code or in the «Input (stdin)» field above the output — every participant sees it.
Typical interview tasks
- Explain a borrow checker error: why you cannot hold a reference to a Vec element while pushing new ones.
- Count word frequencies with a HashMap and the entry API.
- Parse a string into a number and return a Result with your own error instead of unwrap.
- Implement a singly linked list on Option<Box<Node>> and reverse it.
- Rewrite a loop as an iterator chain: filter, map, fold — and compare readability.
- Define a trait for shapes and sum their areas through Vec<Box<dyn Shape>>.
Limitations
- There are no autotests for Rust yet — verify the solution with calls from main and assert!.
- Only the standard library is available: crates from crates.io cannot be added, and cargo is not used.
- Compilation is limited to 10 seconds, and a run to 3 seconds and 64 KB of output.
FAQ
- Which Rust version is used?
- Rust 1.68. The program compiles and runs on the server, so the result is the same for every participant.
- Can I add a crate such as rand or serde?
- No, only the standard library is available. It is enough for interview tasks: collections, iterators, strings, and error handling.
- Are there autotests for Rust?
- Not yet. Verify the solution with assert! and assert_eq! in main — this also shows how the candidate thinks about edge cases.
- Do I need to sign up?
- No. The editor opens at once, and for an interview the candidate only needs the link and a name. The task bank is open without an account too. Signing in is needed for your own tasks, interview mode, and history.