Originally published on php2rust.dev — part of the PHP to Rust course. View this lesson on the original site.
With Rust and Cargo installed, you can create a new project using cargo new. Open a terminal, go to the directory where you want the project, and run:
cargo new my_project
Replace my_project with your project name. Cargo creates a directory with:
Cargo.toml, project metadata and dependenciessrc/, your source code- A basic
main.rsto get you started
What's next
Next: Managing dependencies with Cargo.toml.
From PHP to Rust — Getting Started with Rust