We will have to install the following system dependencies before we can go ahead and create a Rust unit for the C project. Follow the given steps to download and install the build-essential package for your project:
- We will require the Rust compiler and any text editor to develop the Rust code snippet.
- Create a Rust library project using the Cargo tool:
cargo new c-to-rust
- Enter the newly created Rust library project:
cd c_to_rust
- Open the Cargo.toml file in your favorite text editor and make the modification shown in the following screenshot:
- Install the build-essential tool on your machine, which is usually present by default:
sudo apt-get update && apt-get install build-essential