Compare commits

..
5 Commits
Author SHA1 Message Date
meiseayoung a57ce2e77a chore: update v.mod version 2026-01-06 12:01:45 +08:00
meiseayoung 7a08c3142a build(usockets): add pre-compiled library for MacOS-x86 platform 2026-01-06 12:01:20 +08:00
meiseayoung 362015c1cf docs: update build instructions for uSockets backend
- Clarify that Windows requires gcc (tcc does not support .a static library format)
- Add separate build commands for macOS/Linux and Windows
- Document pre-compiled library locations by platform
- Add w64devkit as recommended MinGW download option
2026-01-05 12:25:06 +08:00
meiseayoung 0969901481 chore: update v.mod version 2026-01-05 11:50:46 +08:00
meiseayoung 6bddfc3731 build(usockets): add pre-compiled library for Linux platform 2026-01-05 11:49:47 +08:00
4 changed files with 27 additions and 10 deletions
+26 -9
View File
@@ -50,8 +50,13 @@ cd v-hono
### Standard Build (picoev backend) ### Standard Build (picoev backend)
```bash ```bash
v your_app.v -o app.exe # macOS / Linux
./app.exe v -prod -o app your_app.v
./app
# Windows
v -o app.exe your_app.v
.\app.exe
``` ```
### High-Performance Build (uSockets backend) ### High-Performance Build (uSockets backend)
@@ -59,25 +64,33 @@ v your_app.v -o app.exe
For maximum performance with uSockets backend: For maximum performance with uSockets backend:
```bash ```bash
v -enable-globals -cc gcc -ldflags "-ldbghelp" your_app.v -o app.exe # macOS / Linux
./app.exe v -enable-globals -prod -o app your_app.v
./app
# Windows (must use gcc, tcc does not support .a static library format)
v -enable-globals -cc gcc -ldflags "-ldbghelp" -o app.exe your_app.v
.\app.exe
``` ```
**Note**: The `-enable-globals` flag is required for uSockets backend. The `-ldflags "-ldbghelp"` fixes Windows linking issues. **Important Notes:**
- The `-enable-globals` flag is required for uSockets backend
- On Windows, you **must** use `-cc gcc` because V's default compiler (tcc) does not support MinGW `.a` static library format
- The `-ldflags "-ldbghelp"` is required on Windows for libuv linking
#### Windows Prerequisites #### Windows Prerequisites
To use uSockets backend on Windows, you need: To use uSockets backend on Windows, you need:
1. **GCC (MinGW-w64)** - C compiler 1. **GCC (MinGW-w64)** - C compiler (required, tcc is not supported)
```powershell ```powershell
# Install via Scoop # Install via Scoop (recommended)
scoop install mingw scoop install mingw
# Or via Chocolatey # Or via Chocolatey
choco install mingw choco install mingw
# Or download from: https://www.mingw-w64.org/downloads/ # Or download w64devkit from: https://github.com/skeeto/w64devkit/releases
``` ```
2. **V Compiler** - Version 0.4.x or later 2. **V Compiler** - Version 0.4.x or later
@@ -94,7 +107,11 @@ To use uSockets backend on Windows, you need:
v version # Should show V 0.4.x v version # Should show V 0.4.x
``` ```
The uSockets library and libuv are pre-compiled and included in the `usockets/lib/` directory. The uSockets library and libuv are pre-compiled and included in the `usockets/lib/{platform}/` directory:
- `usockets/lib/windows/` - Windows x64
- `usockets/lib/linux/` - Linux x64
- `usockets/lib/macos-arm64/` - macOS Apple Silicon
- `usockets/lib/macos-x64/` - macOS Intel
### Using uSockets Backend ### Using uSockets Backend
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1,7 +1,7 @@
Module { Module {
name: 'hono' name: 'hono'
description: 'A high-performance V language web framework inspired by Hono.js, featuring hybrid routing, LRU cache, middleware support, and more.' description: 'A high-performance V language web framework inspired by Hono.js, featuring hybrid routing, LRU cache, middleware support, and more.'
version: '0.7.3' version: '0.7.5'
license: 'MIT' license: 'MIT'
dependencies: [] dependencies: []
} }