Running Rust in Zerethon IDE
What Run compiles, the time limit, input, tests, and what a run cannot do.
Runs in Zerethon IDE · Rust 1.87
Official Rust documentation ↗
- Run (Ctrl/⌘+Enter) compiles the entry file —
main.rsby default — withrustc1.87, edition 2024, and runs the program. Make another file the entry with the ▶ button next to it in the explorer. - Compiler errors appear in the Output tab with their code (
error[E0382]), file and line; the program is not run. Warnings are shown too but do not stop the run. - Output and errors appear in the Output tab; what you type in the Input tab is the program's standard input.
- Compiling and running together are stopped after 20 seconds. Memory is limited, there is no network, and the project files are read-only (write to
/tmp). - Run tests (Ctrl/⌘+Shift+Enter) compiles and runs every file named
test_*.rsas its own program. A test passes when it exits normally; a failingassert!orassert_eq!fails it.cargo testand#[test]functions are not used.
test_geometry.rs
mod geometry;
fn main() {
assert_eq!(geometry::area(2, 3), 6);
assert_eq!(geometry::area(0, 5), 0);
println!("geometry ok");
}
geometry.rs module from “Modules and several files”.
Tip: The editor highlights Rust and completes keywords and common types. There is no formatter or live error checking yet: Run shows the compiler's messages, which usually say how to fix the problem.