Skip to content

Commit 3b2bacb

Browse files
v1.34.24: fix Windows vcpkg logs + document installation (#283)
1 parent b936fca commit 3b2bacb

File tree

3 files changed

+212
-93
lines changed

3 files changed

+212
-93
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ jobs:
265265
$openssl = (Get-ChildItem "C:\Program Files" -Directory -ErrorAction SilentlyContinue |
266266
Where-Object { $_.Name -like "OpenSSL-*" } | Select-Object -First 1).FullName
267267
if (-not $openssl) { $openssl = "C:\Program Files\OpenSSL-Win64" }
268+
268269
Write-Host "OPENSSL_ROOT_DIR=$openssl"
269270
Write-Host "VCPKG_ROOT=$env:VCPKG_ROOT"
270271
@@ -276,12 +277,48 @@ jobs:
276277
-DOPENSSL_ROOT_DIR="$openssl" `
277278
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake" 2>&1 | Tee-Object -FilePath cmake_output.log -Append
278279
279-
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
280+
"CMAKE_CONFIGURE_EXIT=$LASTEXITCODE" | Out-File -FilePath $env:GITHUB_ENV -Append
281+
exit 0
282+
283+
- name: Dump vcpkg manifest log (Windows)
284+
if: runner.os == 'Windows'
285+
shell: pwsh
286+
run: |
287+
if ($env:CMAKE_CONFIGURE_EXIT -eq "0") {
288+
Write-Host "Configure succeeded. No vcpkg dump needed."
289+
exit 0
290+
}
291+
292+
Write-Host "=== vcpkg-manifest-install.log ==="
293+
if (Test-Path "build\vcpkg-manifest-install.log") {
294+
Get-Content "build\vcpkg-manifest-install.log" -Raw
295+
} else {
296+
Write-Host "missing build\vcpkg-manifest-install.log"
297+
}
298+
299+
Write-Host "=== vcpkg logs (last 200 lines each) ==="
300+
$logRoot = "$env:VCPKG_ROOT\buildtrees"
301+
if (Test-Path $logRoot) {
302+
Get-ChildItem -Recurse $logRoot -Filter "*.log" -ErrorAction SilentlyContinue |
303+
Sort-Object LastWriteTime -Descending |
304+
Select-Object -First 8 |
305+
ForEach-Object {
306+
Write-Host "`n--- $($_.FullName) ---"
307+
Get-Content $_.FullName -Tail 200
308+
}
309+
} else {
310+
Write-Host "missing vcpkg buildtrees folder"
311+
}
280312
281313
- name: Build (Windows)
282314
if: runner.os == 'Windows'
283315
shell: pwsh
284316
run: |
317+
if ($env:CMAKE_CONFIGURE_EXIT -ne "0") {
318+
Write-Host "Configure failed (exit=$env:CMAKE_CONFIGURE_EXIT). Skipping build."
319+
exit 1
320+
}
321+
285322
"" | Out-File -FilePath build_output.log -Encoding utf8
286323
cmake --build build --config Release 2>&1 | Tee-Object -FilePath build_output.log -Append
287324
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

README.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,114 @@ but engineered **from day one** for:
4646
Vix is not just a backend framework.
4747
It is a **runtime layer** for real-world distributed systems.
4848

49+
## Installation
50+
51+
### Prerequisites
52+
53+
Vix.cpp is a **native C++ runtime** and requires a modern toolchain.
54+
55+
#### All platforms
56+
- **CMake ≥ 3.20**
57+
- **C++20 compiler**
58+
- GCC ≥ 11
59+
- Clang ≥ 14
60+
- MSVC ≥ 19.34 (Visual Studio 2022)
61+
- **Git** (with submodules)
62+
63+
#### Linux
64+
- `pkg-config`
65+
- `ninja` (recommended)
66+
- system development packages:
67+
- Boost
68+
- OpenSSL
69+
- SQLite
70+
- zlib / brotli (optional)
71+
72+
**Example (Ubuntu):**
73+
```bash
74+
sudo apt update
75+
sudo apt install -y \
76+
build-essential cmake ninja-build pkg-config \
77+
libboost-all-dev libssl-dev libsqlite3-dev
78+
```
79+
80+
#### macOS
81+
- Xcode Command Line Tools
82+
- Homebrew
83+
84+
```bash
85+
brew install cmake ninja pkg-config boost openssl@3
86+
```
87+
88+
#### Windows
89+
- **Visual Studio 2022** (Desktop development with C++)
90+
- **Git**
91+
- **PowerShell**
92+
- **vcpkg** (handled automatically by the install script)
93+
94+
---
95+
96+
### Install Vix.cpp (recommended)
97+
98+
Vix provides platform-specific install scripts that:
99+
- fetch dependencies
100+
- configure the build
101+
- produce the `vix` binary
102+
103+
#### Linux / macOS
104+
```bash
105+
curl -fsSL https://vixcpp.com/install.sh | bash
106+
```
107+
108+
You may need:
109+
```bash
110+
chmod +x install.sh
111+
```
112+
113+
#### Windows (PowerShell)
114+
```powershell
115+
irm https://vixcpp.com/install.ps1 | iex
116+
```
117+
118+
> On Windows, dependencies such as **Boost** and **SQLite** are installed automatically via **vcpkg**.
119+
120+
---
121+
122+
### Verify installation
123+
124+
After installation, verify that `vix` is available:
125+
126+
```bash
127+
vix --version
128+
```
129+
130+
or on Windows:
131+
```powershell
132+
vix.exe --version
133+
```
134+
135+
You should see the current release version printed.
136+
137+
---
138+
139+
### Script mode (no project setup)
140+
141+
Once installed, you can run C++ files directly:
142+
143+
```bash
144+
vix run main.cpp
145+
vix dev main.cpp
146+
```
147+
148+
This compiles, links, and runs your code with the Vix runtime automatically.
149+
150+
---
151+
152+
### Manual build (advanced)
153+
154+
If you prefer full control, see:
155+
- **Build & Installation**
156+
49157
---
50158

51159
## Who is Vix.cpp for?

docs/installation.md

Lines changed: 66 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,108 @@
1-
# Installation — Vix.cpp
2-
3-
## 🚀 Getting Started
4-
5-
## 🧩 Overview
6-
7-
Vix.cpp is a high-performance C++20 web framework inspired by FastAPI, Vue.js, and React.
8-
It’s modular by design — each component (core, utils, json, orm, cli) can be built independently or together under the umbrella project.pdlog
9-
10-
## 🧩 Build & Developer Setup
11-
12-
### 🧱 Prerequisites
13-
14-
You’ll need the following tools and libraries depending on your platform:
15-
16-
| **Component** | **Minimum Version** | **Purpose** |
17-
| ------------------- | -------------------------------- | ------------------------ |
18-
| C++ Compiler | GCC 12+ / Clang 16+ / MSVC 2022+ | C++20 support |
19-
| CMake | ≥ 3.20 | Build system |
20-
| Boost | asio, beast | Networking (core module) |
21-
| nlohmann/json | ≥ 3.11 | JSON serialization |
22-
| spdlog | ≥ 1.10 | Logging |
23-
| MySQL Connector/C++ | _optional_ | ORM (database driver) |
24-
25-
This guide explains how to build and install Vix.cpp on Linux, macOS, and Windows.
26-
27-
---
28-
29-
## 🐧 Linux / Ubuntu
1+
## Installation
302

313
### Prerequisites
324

5+
Vix.cpp is a **native C++ runtime** and requires a modern toolchain.
6+
7+
#### All platforms
8+
- **CMake ≥ 3.20**
9+
- **C++20 compiler**
10+
- GCC ≥ 11
11+
- Clang ≥ 14
12+
- MSVC ≥ 19.34 (Visual Studio 2022)
13+
- **Git** (with submodules)
14+
15+
#### Linux
16+
- `pkg-config`
17+
- `ninja` (recommended)
18+
- system development packages:
19+
- Boost
20+
- OpenSSL
21+
- SQLite
22+
- zlib / brotli (optional)
23+
24+
**Example (Ubuntu):**
3325
```bash
3426
sudo apt update
35-
sudo apt install -y \ g++-12 cmake make git \ # Build tools
36-
libboost-all-dev \ # Boost (includes asio, beast)
37-
nlohmann-json3-dev \ # JSON (nlohmann/json)
38-
libspdlog-dev \ # Logging (spdlog)
39-
libmysqlcppconn-dev # Optional: MySQL Connector/C++ for ORM
27+
sudo apt install -y \
28+
build-essential cmake ninja-build pkg-config \
29+
libboost-all-dev libssl-dev libsqlite3-dev
4030
```
4131

42-
Optional dependencies:
32+
#### macOS
33+
- Xcode Command Line Tools
34+
- Homebrew
4335

4436
```bash
45-
sudo apt install -y libmysqlcppconn-dev libsqlite3-dev
37+
brew install cmake ninja pkg-config boost openssl@3
4638
```
4739

48-
### Build
49-
50-
```bash
51-
git clone https://github.com/vixcpp/vix.git
52-
cd vix
53-
git submodule update --init --recursive
54-
cmake -S . -B build-rel -DCMAKE_BUILD_TYPE=Release
55-
cmake --build build-rel -j
56-
sudo cmake --install build-rel --prefix /usr/local
57-
```
40+
#### Windows
41+
- **Visual Studio 2022** (Desktop development with C++)
42+
- **Git**
43+
- **PowerShell**
44+
- **vcpkg** (handled automatically by the install script)
5845

5946
---
6047

61-
## 🍎 macOS
62-
63-
### Prerequisites
48+
### Install Vix.cpp (recommended)
6449

65-
Install Homebrew first, then:
50+
Vix provides platform-specific install scripts that:
51+
- fetch dependencies
52+
- configure the build
53+
- produce the `vix` binary
6654

55+
#### Linux / macOS
6756
```bash
68-
brew install cmake ninja llvm boost nlohmann-json spdlog fmt mysql sqlite3
57+
./install.sh
6958
```
7059

71-
### Build
72-
60+
You may need:
7361
```bash
74-
cmake -S . -B build-rel -G Ninja -DCMAKE_BUILD_TYPE=Release
75-
cmake --build build-rel -j
76-
sudo cmake --install build-rel
62+
chmod +x install.sh
7763
```
7864

79-
---
65+
#### Windows (PowerShell)
66+
```powershell
67+
.\install.ps1
68+
```
8069

81-
## 🪟 Windows
70+
> On Windows, dependencies such as **Boost** and **SQLite** are installed automatically via **vcpkg**.
8271
83-
### Requirements
72+
---
8473

85-
- Visual Studio 2022 (with C++ Desktop workload)
86-
- [vcpkg](https://github.com/microsoft/vcpkg)
87-
- Git Bash or PowerShell
74+
### Verify installation
8875

89-
### Build
76+
After installation, verify that `vix` is available:
9077

9178
```bash
92-
git clone https://github.com/vixcpp/vix.git
93-
cd vix
94-
git submodule update --init --recursive
95-
96-
cmake -S . -B build-rel -G "Ninja" ^
97-
-DCMAKE_BUILD_TYPE=Release ^
98-
-DCMAKE_TOOLCHAIN_FILE=C:/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
79+
vix --version
80+
```
9981

100-
cmake --build build-rel -j
82+
or on Windows:
83+
```powershell
84+
vix.exe --version
10185
```
10286

103-
---
87+
You should see the current release version printed.
10488

105-
## ⚙️ Verify Installation
89+
---
10690

107-
```bash
108-
vix --version
109-
```
91+
### Script mode (no project setup)
11092

111-
Output example:
93+
Once installed, you can run C++ files directly:
11294

113-
```
114-
Vix.cpp v1.9.0 (C++20, GCC 13, Ubuntu 24.04)
95+
```bash
96+
vix run main.cpp
97+
vix dev main.cpp
11598
```
11699

117-
If `vix` is not found, ensure `/usr/local/bin` (or your custom prefix) is in your PATH.
100+
This compiles, links, and runs your code with the Vix runtime automatically.
118101

119102
---
120103

121-
## 🧩 Troubleshooting
122-
123-
- **Missing headers** — Ensure all dependencies are installed (Boost, fmt, spdlog).
124-
- **CMake errors** — Check `CMAKE_CXX_STANDARD` (must be ≥ 20).
125-
- **Link errors on Linux** — Use `lld` (`-fuse-ld=lld`) for faster and cleaner linking.
126-
- **Permission denied on install** — Add `sudo` to the `cmake --install` command.
127-
128-
---
104+
### Manual build (advanced)
129105

130-
## ✅ Next Steps
106+
If you prefer full control, see:
107+
- **Build & Installation**
131108

132-
- [Quick Start](./quick-start.md)
133-
- [Build & Packaging](./build.md) _(optional)_
134-
- [Benchmarks](./benchmarks.md)

0 commit comments

Comments
 (0)