A modern C++ web framework.
Mach is a fast, lightweight web framework for building HTTP APIs in modern C++. It provides routing, controllers, request binding, validation, middleware, security utilities, configuration, logging, and more through a clean, type-safe API.
Download and run the latest Mach .msi installer.
Mach v1.0 supports Windows with MSVC.
To build Mach applications, you will need:
- CMake
- MSVC C++ Build Tools
- Windows SDK
The Mach CLI also requires the Microsoft Visual C++ Redistributable.
Install the latest Mach .deb package:
sudo apt install ./mach-1.0.0-amd64.debMach v1.0 supports Ubuntu with GCC.
To build Mach applications, install the required development tools:
sudo apt update
sudo apt install build-essential cmakeSee the Installation Guide for detailed installation instructions.
Create a new Mach project:
mach new hello-mach
cd hello-machBuild and run it:
mach runA minimal Mach application looks like this:
#include <mach/mach.hpp>
int main() {
mach::AppBuilder builder;
auto app = builder.build();
app.mapGet("/", [] {
return mach::ok("Hello from Mach!");
});
return app.run();
}- Fast HTTP server built for modern C++
- Minimal APIs and controllers
- Route parameters and query parameters
- JSON request binding and serialization
- Declarative request validation
- Middleware
- CORS and CSRF protection
- Centralized error handling
- Application configuration
- Built-in logging
- CMake integration
- Command-line tooling for creating, building, and running projects
| Platform | Toolchain | Support |
|---|---|---|
| Windows | MSVC | Supported |
| Ubuntu | GCC | Supported |
Additional platforms and toolchains may be supported in future releases.
Full documentation, guides, tutorials, and the API reference are available at:
Mach is designed to provide high HTTP throughput while keeping its API simple and expressive.
See the benchmarks for results and methodology.
Mach is licensed under the MIT License.