fn main() { let count: i32 = 42; // Specified type let name = "Rust"; // Type inferred as &str }
Write, Run & Share Rust code online using OneCompiler's Rust online compiler for free. It's one of the robust, feature-rich online compilers for Rust language. Getting started with the OneCompiler's Rust editor is easy and fast. The editor shows sample boilerplate code when you choose language as Rust and start coding.