Online GDB Logo
Online GDB

Online Rust Compiler (rustc 1.82)

Write, compile, and execute Rust code online directly in your browser. Powered by official Rust runtimes with memory safety guarantees, real-time diagnostics, standard input (stdin) support, and instant output.

Getting Started with Rust Online

Rust is a systems programming language that empowers everyone to build reliable and efficient software. Rust offers memory safety without garbage collection, zero-cost abstractions, and fearless concurrency.

Basic Structure of a Rust Program

Every Rust binary program starts execution in the main() function.

fn main() {
    println!("Hello from FreeOnlineGDB Rust!");
}

Handling User Input in Rust

Use std::io::stdin() to read lines into a String buffer. In our compiler, switch to the Input (stdin) tab and enter your inputs before executing.

Runtime Specifications

Compiler
rustc 1.82 / 1.40
Edition
2021 Edition
Execution Engine
Wandbox / Judge0
Time Limit
5.0 seconds
Memory Limit
256 MB

Full IDE Experience

Need multi-file projects, keyboard shortcuts, or project saving? Open the full-screen IDE.

Launch Fullscreen Rust IDE