We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

Online Rust Compiler – IDE, Editor and Playground

Edit, run, and debug Rust code online for free! Powered by Rust and WebAssembly.

Edit the Rust modules above or write your own program, then press Run. Boot.dev compiles the project to WebAssembly and executes it in your browser.

Use the playground for ownership experiments, pattern matching, functions, structs, and small modules without installing the Rust toolchain.

How to use the online Rust compiler

  1. Edit main.rs, or add another .rs module and declare it from your code.
  2. Press Run to compile the project to WebAssembly and execute it.
  3. Read compiler diagnostics or program output, revise the code, and run it again.

What this Rust playground supports

  • Compiled Rust code. Compile a small Rust project to WebAssembly.
  • Local modules. Organize a project across up to five .rs files.
  • Compiler diagnostics. Use Rust's error messages to fix the program.
  • Local autosave. Keep your Rust files in this browser between visits.

Online Rust compiler FAQ

Yes. You can edit, compile, and run Rust without installing a toolchain or creating an account. An account is only needed to create a share link.