RUSTPRINT

Search RustPrint by question, error, syntax, or task.

← Start with Rust

START 03 // TOUCH THE LANGUAGE

Try Rust online

You can make Rust less mysterious before installing a compiler, editor, build tools, or anything else. Open the Rust Playground, run one tiny program, then deliberately break it.

The goal here is not to “learn Rust online”. It is much smaller:see the edit → compile → result loop once with your own eyes.

Open the Rust Playground

The Rust Playground gives you an editor and a Run button in the browser. You can paste a small Rust program into it and see either the output or the compiler's response.

EXAMPLE: CI-CHECKEDCOMPILED · examples/getting-started/src/main.rs#start-try-online-hello
println!("Hello, Rust!");
WHAT YOU SHOULD SEE
Hello, Rust!

What just happened?

1. EDITYou changed Rust source code.
→
2. COMPILERust checked whether the code was valid.
→
3. RUNThe resulting program produced output.

Now break it on purpose

Remove the ! after println and run the program again. Then put it back. The exact diagnostic wording can change as the compiler evolves, but the important experience is stable: Rust points you back to the source location and explains why it cannot accept the program as written.

This is worth doing because Rust compiler messages are not side content. Reading them is part of normal Rust development. The official Rust Book explicitly treats learning to read compiler errors as part of learning the language.

WHAT THE PLAYGROUND IS GOOD FOR

Small experiments. A formatting question. A language feature. A short example somebody sent you. It lets you answer “does this compile?” without first creating a local project.

When should you stop using the Playground?

As soon as you want to understand what a real Rust project looks like. Local projects introduce Cargo,Cargo.toml, a source directory, dependencies, tests, and the normal development workflow. Those are not annoying extras; they are part of how Rust projects are organized.

If the browser experiment worked, you have already crossed the most abstract step.

Rust is no longer a logo or a list of promises. You edited source, Rust checked it, and a program ran. Next you can install the toolchain without wondering what all those tools are for.

PRIMARY SOURCES

Useful official references