DEV Community

Cover image for Mach 1.0: A modern C++20 web framework
Asaf Dahan
Asaf Dahan

Posted on AI-assisted

Mach 1.0: A modern C++20 web framework

I've been working on Mach for a couple months. It's a modern, type-safe, C++20 web framework, designed for the best developer experience. Yesterday, I released Mach v1.0.0.

A simple 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();
}
Enter fullscreen mode Exit fullscreen mode

Mach includes routing, controllers, middleware, dependency injection, model binding, CORS/CSRF support, logging, and more.

It’s built with C++20 on top of Boost.Asio/Beast, with CMake integration and support for Windows and Linux.

GitHub: https://github.com/machframework/mach

Documentation: https://machframework.dev/

I’d be glad to hear from the C++ community about Mach, whether regarding its API design, implementation, documentation, or any other aspect of the project.

Top comments (0)