DEV Community

Cover image for Vix: The 'Node.js' of C++, Without a Garbage Collector
Marcos Oliveira
Marcos Oliveira

Posted on

Vix: The 'Node.js' of C++, Without a Garbage Collector

๐ŸŒ A C++20 runtime focused on building modern web servers and APIs, combining asynchronous I/O, modular architecture, and an extreme focus on performance.


vix is a modern runtime/framework in C++20 for building high-performance and distributed backend applications (offline-first, peer-to-peer, etc.) โ€” a native alternative to Node/Deno, featuring async HTTP, routing, ORM, and modules.

It's used to create web servers, APIs, and distributed applications in C++ with contemporary ergonomics (no garbage collector, no overhead from "old" frameworks). It features:

  • Async HTTP server (Asio)
  • Routing, middleware, native JSON
  • CLI for scaffold/build/run
  • Optional modules (ORM, WebSockets, utilities) Everything is designed for performance and offline/P2P applications.

Installation

Clone the repository and compile with CMake:

git clone https://github.com/vixcpp/vix.git
cd vix
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
Enter fullscreen mode Exit fullscreen mode

Optional: install headers/artifacts system-wide (according to the project docs).

To use it as a dependency in your project, include the compiled headers/libs and configure CMake to link with "vix".


Basic Example (HTTP Hello world)

Create a main.cpp file:

#include <vix.hpp>
using namespace vix;

int main() {
    App app;

    app.get("/", [](Request&, Response& res) {
        res.send("Hello world from Vix!");
    });

    app.run(8080);
}
Enter fullscreen mode Exit fullscreen mode

Compile with your CMakeLists that links the Vix runtime. When running, access localhost:8080.


For more information, visit: https://github.com/vixcpp/vix

Top comments (1)

Collapse
 
martijn_assie_12a2d3b1833 profile image
Martijn Assie

Whoa!! This looks like C++ meets Node.js ๐Ÿ˜ Tip: showing a tiny benchmark comparing Vix async HTTP vs a simple Node server could really wow readers and make the performance angle clickโ€ฆ love seeing modern C++ used like this!!