Skip to content
Download

Creating a Project

Once Mach is installed, you can create a new project using the Mach CLI.

Open a terminal in the directory where you want to create your project and run:

Terminal window
mach new hello-world

Mach creates a new hello-world directory containing a ready-to-build application.

Move into the project directory:

Terminal window
cd hello-world

A newly created Mach project has the following structure:

hello-world/
├── src/
│ └── main.cpp
├── .gitignore
└── CMakeLists.txt

The CMakeLists.txt file contains the CMake configuration used to build your application and link it with Mach.

The src directory contains your application’s source code.

main.cpp is the entry point of your application. This is where the Mach application is created and configured.

Specifies files and directories that Git should ignore, including build artifacts generated by Mach.


Next, you’ll take a closer look at the endpoint included in your new application.