GET STARTED
Quick start
Build and explore the Velocity transport core in under an hour.
Last updated November 5, 2025View on GitHub
Quick start
Spin up a Velocity development environment, build the transport core, and understand the moving pieces without wading through the entire repository.
1. Prepare your environment
- Install the Rust toolchain via https://rustup.rs/ (the workspace pins versions in
rust-toolchain.toml). - Ensure Git and a modern PowerShell environment are present.
- Optional: keep CMake handy for future PQ crypto backends.
Verify the toolchain:
rustup show
cargo --version
2. Clone the workspace
# Replace the URL with your fork if needed
git clone https://github.com/AndrewCTF/ProjectVelocity.git
cd ProjectVelocity
git status
3. Build and test the transport core
cargo fmt
cargo clippy -p velocity-core --all-targets -- -D warnings
cargo test -p velocity-core
These commands keep formatting consistent, enforce warnings-as-errors, and run unit tests covering packet parsing, ALPN negotiation, and connection ID bounds.
4. Watch the UDP handshake loop
velocity_core::run_udp_handshake_loop shows how Initial packets can be parsed live from a UDP socket using Tokio:
use std::net::SocketAddr;
use velocity_core::{parse_packet, run_udp_handshake_loop, ParsedPacket};
#[tokio::main]
async fn main() -> std::io::Result<()> {
run_udp_handshake_loop("127.0.0.1:44330", |peer: SocketAddr, packet: ParsedPacket<'_>| {
println!("received {:?} from {}", packet.header.packet_type, peer);
}).await
}
The handler executes synchronously today so higher-level crates can dictate scheduling strategies later.
5. Read the living spec
Refer to spec/protocol-draft.md for:
- Packet framing and message vocabulary.
- Hybrid cryptography profiles (
light,balanced,fortress). - ALPN negotiation and fallback semantics.
- Resumption, anti-downgrade strategies, and SSH transport mapping.
6. Next experiments
| Goal | Where to look |
|---|---|
| Benchmark handshake paths | benchmarks/handshake-bench (run cargo bench -p handshake-bench) |
| Extend parsing logic | crates/velocity-core/src/lib.rs unit tests at the bottom of the file |
| Track roadmap items | spec/protocol-draft.md and ROADMAP.md |
| Contribute back | Follow the checklist in CONTRIBUTING.md |