Skip to content

Commit 09d3930

Browse files
committed
Merge branch 'dev'
2 parents 4a1dd4c + 660eae1 commit 09d3930

12 files changed

Lines changed: 135 additions & 51 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ build-*/
3838
compile_commands.json
3939
CMakeCache.txt
4040
CMakeFiles/
41-
Makefile
4241
cmake_install.cmake
4342

4443
# ======================================================

.gitmodules

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
11
[submodule "modules/core"]
22
path = modules/core
33
url = https://github.com/vixcpp/core.git
4-
branch = dev
4+
branch = dev
55

66
[submodule "modules/utils"]
77
path = modules/utils
88
url = https://github.com/vixcpp/utils.git
9-
branch = dev
9+
branch = dev
1010

1111
[submodule "modules/cli"]
1212
path = modules/cli
1313
url = https://github.com/vixcpp/cli.git
14-
branch = dev
14+
branch = dev
1515

1616
[submodule "modules/json"]
1717
path = modules/json
1818
url = https://github.com/vixcpp/json.git
19-
branch = dev
19+
branch = dev
2020

2121
[submodule "modules/orm"]
2222
path = modules/orm
2323
url = https://github.com/vixcpp/orm.git
24+
branch = dev
25+
26+
[submodule "modules/websocket"]
27+
path = modules/websocket
28+
url = https://github.com/vixcpp/websocket.git
29+
branch = dev
30+
[submodule "modules/middleware"]
31+
path = modules/middleware
32+
url = https://github.com/vixcpp/middleware.git
2433
branch = dev

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
---
99

1010
## [Unreleased]
11+
## [1.10.2] - 2025-12-06
12+
13+
### Added
14+
-
15+
16+
### Changed
17+
-
18+
19+
### Removed
20+
-
21+
1122
## [0.10.2] - 2025-11-07
1223

1324
### Added

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.20)
2323
# - The JSON module may export different target names across environments:
2424
# vix::json / vix::json / vix_json — we resolve them dynamically.
2525
# ====================================================================
26-
project(vix VERSION 1.10.2 LANGUAGES CXX)
26+
project(vix VERSION 1.10.3 LANGUAGES CXX)
2727

2828
# Make find_package honor *_ROOT hints (e.g. MYSQLCPPCONN_ROOT)
2929
if (POLICY CMP0144)

README.md

Lines changed: 96 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Vix.cpp
2+
13
<p align="center" style="margin:0;">
24
<img
35
src="https://res.cloudinary.com/dwjbed2xb/image/upload/v1762524350/vixcpp_etndhz.png"
@@ -20,31 +22,41 @@
2022
<img src="https://img.shields.io/badge/License-MIT-green">
2123
</p>
2224

23-
**Vix.cpp** is a next-generation **modular C++ backend framework** — inspired by **FastAPI**, **Vue.js**, and **React.js**.
24-
It brings modern developer ergonomics, productivity, and extreme performance to native C++ — with a fully modular design.
25+
---
26+
27+
# 🌍 What is Vix?
28+
29+
**Vix** is a next-generation **offline-first, peer-to-peer, ultra-fast runtime for modern C++**.
30+
31+
Its goal is clear:
32+
33+
> **A runtime capable of running apps like Node / Deno / Bun —
34+
> but engineered for unstable, low-quality, real-world networks.**
35+
36+
Vix is more than a backend framework:
37+
it is a **modular runtime**, designed for distributed applications, edge systems, offline devices, and environments where traditional cloud frameworks fail.
38+
39+
Inspired by **FastAPI**, **Vue.js**, **React**, and modern runtimes — but rebuilt from scratch in C++20 for raw speed and full control.
2540

2641
---
2742

28-
## ⚡ Benchmarks
43+
# ⚡ Benchmarks
2944

3045
All benchmarks were executed using **wrk**
3146
`8 threads`, `200 connections`, for `30 seconds`, on the same machine (Ubuntu 24.04, Intel Xeon, C++20 build).
3247

3348
| Framework | Requests/sec | Avg Latency | Transfer/sec |
3449
| --------------------- | ------------ | ----------- | -------------- |
35-
| **Vix.cpp (v1.10.1)** | **88,973** | **2.21 ms** | **18.25 MB/s** |
50+
| **Vix.cpp (v1.10.3)** | **88,973** | **2.21 ms** | **18.25 MB/s** |
3651
| Go (Fiber) | 81,336 | 0.67 ms | 10.16 MB/s |
3752
| Node.js (Fastify) | 4,220 | 16.00 ms | 0.97 MB/s |
3853
| PHP (Slim) | 2,804 | 16.87 ms | 0.49 MB/s |
3954
| Crow (C++) | 1,149 | 41.60 ms | 0.35 MB/s |
4055
| FastAPI (Python) | 752 | 63.71 ms | 0.11 MB/s |
4156

42-
⚙️ Tested with: `wrk -t8 -c200 -d30s http://localhost:8080/`
43-
🧩 Environment: Ubuntu 24.04, GCC 13, Asio standalone (no Boost).
44-
4557
---
4658

47-
## 🧭 Quick Example
59+
# 🧭 Quick Example
4860

4961
```cpp
5062
#include <vix.hpp>
@@ -53,36 +65,54 @@ using namespace Vix;
5365
int main() {
5466
App app;
5567

56-
// GET /
5768
app.get("/", [](auto&, auto& res) {
58-
res.json({
59-
"message", "Hello world"
60-
});
69+
res.json({ "message", "Hello world" });
6170
});
6271

6372
app.run(8080);
6473
}
6574
```
6675

67-
Run benchmark locally:
76+
---
6877

69-
```bash
70-
wrk -t8 -c200 -d30s --latency http://localhost:8080/
71-
```
78+
# 🧱 Why Vix Exists
79+
80+
Cloud-first frameworks assume:
81+
82+
- stable networks
83+
- predictable latency
84+
- always-online connectivity
85+
86+
**But in most of the world, this is not reality.**
87+
88+
Vix is built for:
89+
90+
### ✔ Offline-first
91+
92+
Applications continue functioning even without internet.
93+
94+
### ✔ Peer-to-Peer
95+
96+
Nodes sync and communicate locally without a central server.
97+
98+
### ✔ Ultra-Fast Native Execution
99+
100+
C++20 + Asio + zero-overhead abstractions.
72101

73102
---
74103

75-
## 🧩 Key Features
104+
# 🧩 Key Features
76105

77-
-**Modern C++20** — clean syntax, type safety, RAII
78-
- ⚙️ **Async HTTP server** — powered by standalone Asio
79-
- 🧭 **Routing system** — expressive path parameters (`/users/{id}`)
80-
- 💾 **ORM for MySQL/SQLite** — repository & query builder patterns
81-
- 🧠 **Middleware support** — logging, validation, sessions
82-
- 💡 **JSON-first design** — integrates `nlohmann::json` with helpers
83-
- 🧰 **Modular architecture** — core, cli, utils, orm, middleware, websocket
84-
-**High performance** — 80k+ requests/sec on commodity hardware
85-
- 🪶 **Header-only modules** — easy to embed in any C++ project
106+
- 🌍 Offline-first runtime
107+
- 🔗 P2P-ready communication model
108+
- ⚙️ Async HTTP server
109+
- 🧭 Expressive routing
110+
- 💾 ORM for MySQL/SQLite
111+
- 🧠 Middleware system
112+
- 📡 WebSocket engine
113+
- 🧰 Modular design
114+
- 🚀 Developer experience similar to Node/Deno/Bun
115+
- ⚡ 80k+ requests/sec performance
86116

87117
---
88118

@@ -98,12 +128,6 @@ cmake --build build -j
98128
./build/hello_routes
99129
```
100130

101-
> For full installation steps (Windows, Linux, macOS):
102-
> 📘 [docs/installation.md](./docs/installation.md)
103-
104-
> For build flags, packaging, and sanitizers:
105-
> ⚙️ [docs/build.md](./docs/build.md)
106-
107131
---
108132

109133
## 🧰 Example (CLI Project)
@@ -125,25 +149,56 @@ Expected output:
125149

126150
---
127151

152+
# 🎯 Script Mode — Run `.cpp` Files Directly
153+
154+
Vix can execute a single `.cpp` file **like a script**, without creating a full project.
155+
156+
```bash
157+
vix run file.cpp
158+
```
159+
160+
### ✔ How it works
161+
162+
- Generates a temporary CMake project under:
163+
`./.vix-scripts/<filename>/`
164+
- Compiles the `.cpp` file as a standalone executable
165+
- Runs it immediately
166+
- Stops cleanly on Ctrl+C (no gmake noise)
167+
168+
### Example:
169+
170+
```bash
171+
~/myapp/test$ vix run server.cpp
172+
Script mode: compiling server.cpp
173+
Using script build directory:
174+
• .vix-scripts/server
175+
176+
✔ Build succeeded
177+
[I] Server running on port 8080
178+
^C
179+
ℹ Server interrupted by user (SIGINT)
180+
```
181+
182+
---
183+
128184
## 📚 Documentation
129185

130-
- 🧭 [Introduction](./docs/introduction.md)
131-
-[Quick Start](./docs/quick-start.md)
132-
- 🧱 [Architecture & Modules](./docs/architecture.md)
133-
- 💾 [ORM Overview](./docs/orm/overview.md)
134-
- 📈 [Benchmarks](./docs/benchmarks.md)
135-
- 🧰 [Examples](./docs/examples/overview.md)
186+
- 🧭 Introduction
187+
- ⚡ Quick Start
188+
- 🧱 Architecture & Modules
189+
- 💾 ORM Overview
190+
- 📈 Benchmarks
191+
- 🧰 Examples
136192

137193
---
138194

139195
## 🤝 Contributing
140196

141197
Contributions are welcome!
142-
See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
198+
Please read the contributing guidelines.
143199

144200
---
145201

146202
## 🪪 License
147203

148-
Licensed under the **MIT License**.
149-
See [LICENSE](./LICENSE) for more information.
204+
Licensed under the **MIT License**.

config/config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@
99
"PORT": 3306
1010
}
1111
},
12+
1213
"server": {
1314
"port": 8080,
1415
"request_timeout": 5000
16+
},
17+
18+
"websocket": {
19+
"port": 9090,
20+
"max_message_size": 65536,
21+
"idle_timeout": 60,
22+
"ping_interval": 30
1523
}
1624
}

modules/json

modules/middleware

Submodule middleware added at ebe48b9

0 commit comments

Comments
 (0)