This project serves as a template to kickstart your Rust application development.
- Ensure Rust is installed on your machine. If not, you can install it using
rustup
.
To create a new Rust project, run:
cargo new my_project
cd my_project
Here's a brief overview of the project's structure:
.
├── src
│ ├── main.rs
├── Cargo.toml
├── .gitignore
└── README.md
src/main.rs
: The main source file where the execution starts.Cargo.toml
: The configuration file for Rust's package manager, Cargo.
Add the following code to src/main.rs
:
fn main() {
println!("Hello, Rust!");
}
To build and run the project:
cargo build
cargo run
Contributions are welcome! Please follow the standard code of conduct and submit pull requests or open issues as needed.
This project is licensed under the Mozilla Public License Version 2.0. See the LICENSE file for more details.
This README.md
focuses on the essential steps to initiate a Rust project, omitting detailed explanations about Rust itself.