Initial commit: Project structure, Coordinator Server v1.0.0, and Documentation
This commit is contained in:
commit
0ead98d0c4
18 files changed
+2073
No files matched your search
@@ -0,0 +1,38 @@
|
||||
# Windows Deployment Guide (.exe)
|
||||
|
||||
To ensure the client is a lightweight `.exe` that consumes less than 256MB of RAM, follow these build instructions.
|
||||
|
||||
## 🛠 Build Process
|
||||
|
||||
1. **Environment Setup**:
|
||||
- Install [Rust](https://rustup.rs/).
|
||||
- Install [LLVM](https://llvm.org/build/) (required for some networking crates).
|
||||
|
||||
2. **Optimization Flags**:
|
||||
To keep the binary small and memory usage low, use the following `Cargo.toml` profile:
|
||||
```toml
|
||||
[profile.release]
|
||||
opt-level = 'z' # Optimize for size
|
||||
lto = true # Link Time Optimization
|
||||
codegen-units = 1 # Maximize optimization
|
||||
panic = 'abort' # Remove stack unwinding (saves space/RAM)
|
||||
strip = true # Remove symbols from the binary
|
||||
```
|
||||
|
||||
3. **Building the .exe**:
|
||||
```bash
|
||||
cargo build --release
|
||||
```
|
||||
The resulting executable will be in `target/release/meshvpn-client.exe`.
|
||||
|
||||
## 📦 Resource Constraints (< 256MB RAM)
|
||||
To guarantee low memory usage:
|
||||
- **Asynchronous Runtime**: Using `tokio` with the `current_thread` scheduler instead of `multi_thread` to reduce thread overhead.
|
||||
- **Zero-Copy**: Using `bytes` crate for packet handling to avoid unnecessary memory allocations.
|
||||
- **No GUI**: By keeping it a CLI tool, we avoid the massive overhead of Electron or similar frameworks.
|
||||
|
||||
## 🚦 Administrator Requirements
|
||||
The `.exe` must be run as **Administrator** to:
|
||||
1. Load the `wintun.dll`.
|
||||
2. Create the virtual network adapter.
|
||||
3. Set routing table entries.
|
||||
Reference in new issue
Block a user