Online Rust Compiler
About this Rust compiler
This free online Rust compiler lets you write and run Rust programs in your browser. Use it to try ownership, borrowing, structs and enums on short programs without setting up Rust locally.
How to use the online Rust compiler
- Write or paste your Rust code in the editor. Sample code is already loaded.
- Click Run.
- Read the result in the black panel. Errors from your code appear there too.
Rust compiler FAQs
How do I print output in Rust?
Use the println! macro, for example println!("Hello, World!");
Do I need to install Rust?
No. Your code runs on a remote server and the output appears next to the editor.
What kind of programs does it run?
It is meant for single-file programs with a main function.
