|
Vix.cpp is a modern C++ runtime for building HTTP, WebSocket, and P2P applications with predictable performance, offline-first design, and a Node/Deno-like developer experience. |
|
Vix.cpp is designed to remove overhead, unpredictability, and GC pauses.
| Framework | Requests/sec | Avg Latency |
|---|---|---|
| ⭐ Vix.cpp (pinned CPU) | ~99,000 | 7–10 ms |
| Vix.cpp (default) | ~81,400 | 9–11 ms |
| Go (Fiber) | ~81,300 | ~0.6 ms |
| Deno | ~48,800 | ~16 ms |
| Node.js (Fastify) | ~4,200 | ~16 ms |
| PHP (Slim) | ~2,800 | ~17 ms |
| FastAPI (Python) | ~750 | ~64 ms |
Install the Vix runtime on your system using one of the commands below. Note that there are multiple ways to install Vix.
Ubuntu / Debian deps (example):
sudo apt update
sudo apt install -y \
build-essential cmake ninja-build pkg-config \
libssl-dev libsqlite3-devbrew install cmake ninja pkg-config openssl@3curl -fsSL https://vixcpp.com/install.sh | bashirm https://vixcpp.com/install.ps1 | iexVerify installation:
vix --versiongit clone --recurse-submodules https://github.com/vixcpp/vix.git
cd vix
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
# Install for current user (recommended)
cmake --install build --prefix "$HOME/.local"
# Ensure PATH contains ~/.local/bin then restart your terminal
vix --version
vix doctorCreate a file called server.cpp:
#include <vix.hpp>
using namespace vix;
int main() {
App app;
app.get("/", [](Request&, Response& res) {
res.send("Hello, world!");
});
app.run(8080);
}Run it:
vix run server.cppOpen http://localhost:8080 That’s it.
Run C++ like a script:
vix run main.cpp
vix dev main.cppVix handles compilation, linking, and execution automatically.
- 📘 Docs: https://vixcpp.com/docs
- 🌍 Website: https://vixcpp.com
- 📦 Registry: https://vixcpp.com/registry
- 📦 Examples: https://vixcpp.com/docs/examples
Contributions are welcome. If you care about modern C++, performance, and real-world reliability, you’ll feel at home here. Please read the contributing guide before opening a PR.
⭐ If this project resonates with you, consider starring the repository. MIT License
