Originally published on php2rust.dev — part of the PHP to Rust course. View this lesson on the original site.

We'll build a simple CLI calculator to practice Rust. First, create the project:

cargo new cli_calculator
cd cli_calculator

Open src/main.rs in your editor and you're ready to code.

What's next

Next: Step 2: Writing the calculator logic.

From PHP to Rust — Getting Started with Rust