Skip to content

Latest commit

 

History

History
279 lines (192 loc) · 4.96 KB

File metadata and controls

279 lines (192 loc) · 4.96 KB

Vix.cpp

Remove the friction from C++.

A modern runtime for building C++ applications.

Website · Docs · Install · Download

Vix.cpp is a modern C++ runtime for building and running real-world applications with predictable performance and minimal friction.

Learn more about the Vix runtime in the documentation.

Production Proof

Vix is not a concept. It runs real systems.

Softadastra PulseGrid

A real-time monitoring system built and running in production with Vix.cpp.

  • HTTP monitoring
  • uptime tracking
  • real-time WebSocket streaming
  • production deployment

🔗 https://pulsegrid.softadastra.com 🔗 https://github.com/GaspardKirira/PulseGrid

Used to build production systems like PulseGrid.

Installation

Install Vix using the official installer:

curl -fsSL https://vixcpp.com/install.sh | bash
irm https://vixcpp.com/install.ps1 | iex

⚠️ To use #include <vix.hpp>, make sure you install the full SDK (default). See the full installation guide: https://vixcpp.com/install

Run C++ instantly

#include <iostream>

int main(){
  std::cout << "Hello, world!" << std::endl;
}
vix run main.cpp

Done.

Build a server

#include <vix.hpp>

using namespace vix;

int main(){
  App app;

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

  app.run(8080);
}
vix run server.cpp

http://localhost:8080

Install a framework in 1 command

vix install -g cnerium/app
#include <cnerium/app/app.hpp>
using namespace cnerium::app;

int main(){
  App app;

  app.get("/", [](AppContext &ctx){
    ctx.text("Hello from Cnerium");
  });

  app.listen("127.0.0.1", 8080);
}
vix run main.cpp

WebSocket

#include <memory>
#include <vix/executor/RuntimeExecutor.hpp>
#include <vix/websocket.hpp>

int main(){
  auto exec = std::make_shared<vix::executor::RuntimeExecutor>();

  vix::websocket::App app{".env", exec};
  auto &ws = app.server();

  ws.on_typed_message([](auto &,
                         const std::string &type,
                         const vix::json::kvs &payload)
  {
    if (type == "chat.message") {
      // echo / broadcast
    }
  });

  app.run_blocking();
}

API Documentation (HTTP + WebSocket)

Vix automatically exposes a full API documentation.

Start your app, then open:

http://localhost:8080/docs

You get:

  • HTTP API documentation
  • WebSocket endpoints
  • Interactive testing UI
  • No external dependencies (offline Swagger UI)

The OpenAPI spec is available at:

http://localhost:8080/openapi.json

Control docs with vix run

Documentation can be enabled or disabled at runtime:

# Enable docs
vix run app.cpp --docs

# Disable docs
vix run app.cpp --no-docs

Why this matters

Most systems treat documentation as an afterthought. Vix does not.

  • Docs are generated from the runtime
  • Always reflect the real system
  • Work offline
  • Include HTTP and WebSocket

What Vix.cpp gives you

  • Run a single .cpp file instantly
  • No CMake required for simple apps
  • Native C++ performance
  • HTTP, WebSocket, P2P ready
  • Offline-first architecture support
  • Deterministic execution

Why Vix exists

C++ is powerful.

But:

  • too much setup
  • too much friction
  • too slow to start

Vix removes that.

Performance

Stable under sustained load. Vix v2.5.0 delivers a major performance improvement over v2.4.0 on the /bench route.

v2.4.0

Metric Value
Requests/sec ~66k to 68k
Avg Latency ~13 to 20 ms
P99 Latency ~17 to 50 ms

v2.5.0

Metric Value
Requests/sec ~98k
Avg Latency ~8.47 ms
P99 Latency ~14.01 ms

Learn more

Contributing

Contributions are welcome.

Focus areas

  • performance
  • reliability
  • networking
  • offline-first systems

MIT License