Rust is a systems programming language that is designed to be safe, concurrent, and fast. It is similar to C++ in terms of its low-level capabilities, but with a number of features that make it more memory-safe and easier to use. Here is a simple example of a "Hello, World!" program in Rust:
fn main() {
println!("Hello, World!");
}
This code defines a function called main
, which is the entry point of every Rust program. The println!
macro is used to print a string to the console. The exclamation mark indicates that this is a macro, as opposed to a function.