Upload your Rust source file and get a shareable download link
// Simple Rust Hello World
fn main() {
println!("Hello, World!");
}
// Function with parameters
fn greet(name: &str) {
println!("Hello, {}!", name);
}
// Struct example
struct Point {
x: i32,
y: i32,
}
impl Point {
fn new(x: i32, y: i32) -> Point {
Point { x, y }
}
}