#cpp #cargo #cli #cargo-subcommand

bin+lib cargo-newcpp

A cargo plugin for creating new C++ projects

12 unstable releases (3 breaking)

0.5.2 Sep 30, 2023
0.5.1 Sep 30, 2023
0.4.27 Sep 30, 2023
0.4.26 Aug 10, 2023
0.2.17 Aug 3, 2023

#334 in Cargo plugins

26 downloads per month

Apache-2.0 OR MIT

39KB
346 lines

cargo newcpp

This tool extends Cargo to allow for the creation of new C++ projects in the spirit of cargo new <project>

Ensure that you have a fairly recent version of rust/cargo installed. On Ubuntu you might also want to install cmake and gcc or g++ so that you can actually build project.

cargo install cargo-newcpp

Create a new project

Create a new CPP project with the following command.

cargo newcpp <your_project_name>

This will output to the following default project scaffolding.

scaffolding

Building the CPP project with cargo

Once you've create the project, you can use the following example to build the project.

cd <your_project_name> 
cargo buildcpp

Dependencies

~3–4MB
~83K SLoC