docs: update getting-started and contributing docs for v2
Remove the capnp compiler requirement from prerequisites (protobuf-src vendors protoc automatically). Update building.md for 9 crates and the justfile commands. Rewrite running-the-server.md with accurate v2 flags (--allow-insecure-auth, --sealed-sender, --plugin-dir, --ws-listen, --webtransport-listen, --federation-enabled, QPQ_PRODUCTION). Update docker.md to remove capnproto install from builder stage description. Delete bot-sdk.md and generators.md (removed crates). Update testing.md with the accurate 301-test breakdown across 9 crates and the AUTH_LOCK note for E2E tests. Update coding-standards.md dependency table to list prost as primary serialisation, capnp as legacy-only, and add opaque-ke.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Prerequisites
|
||||
|
||||
Before building quicproquo you need a Rust toolchain and the Cap'n Proto schema compiler. Docker is optional but useful for reproducible builds and deployment.
|
||||
Before building quicproquo you need a Rust toolchain. No other system tools are required — Protobuf compilation is handled automatically at build time by the `protobuf-src` crate, which vendors the `protoc` compiler. Docker is optional and useful for reproducible builds and deployment.
|
||||
|
||||
---
|
||||
|
||||
@@ -23,52 +23,15 @@ rustc --version # should print 1.77.0 or later
|
||||
cargo --version
|
||||
```
|
||||
|
||||
The workspace depends on several crates that use procedural macros (`serde_derive`, `clap_derive`, `tls_codec_derive`, `thiserror`). These compile during the build step and require no additional system libraries beyond what `rustc` ships.
|
||||
The workspace depends on several crates that use procedural macros (`serde_derive`, `clap_derive`, `tls_codec_derive`, `thiserror`, `prost-derive`). These compile during the build step and require no additional system libraries beyond what `rustc` ships.
|
||||
|
||||
---
|
||||
|
||||
## Cap'n Proto compiler (`capnp`)
|
||||
## No external compiler dependencies
|
||||
|
||||
The `quicproquo-proto` crate runs a `build.rs` script that invokes the `capnp` binary at compile time to generate Rust types from the `.capnp` schema files in `schemas/`. The `capnp` binary must be on your `PATH`.
|
||||
In v2, all wire-format serialisation uses [Protobuf](https://protobuf.dev/) via the `prost` crate. The `quicproquo-proto` crate's `build.rs` script drives code generation through `prost-build`, which in turn uses the `protobuf-src` crate to compile and use a vendored copy of `protoc`. **You do not need to install `protoc` or any other system compiler.**
|
||||
|
||||
### Debian / Ubuntu
|
||||
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y capnproto
|
||||
```
|
||||
|
||||
### macOS (Homebrew)
|
||||
|
||||
```bash
|
||||
brew install capnp
|
||||
```
|
||||
|
||||
### Verify installation
|
||||
|
||||
```bash
|
||||
capnp --version
|
||||
# Expected output: Cap'n Proto version X.Y.Z
|
||||
```
|
||||
|
||||
If `capnp` is not found, the build will fail with an error from `capnpc::CompilerCommand`:
|
||||
|
||||
```
|
||||
Cap'n Proto schema compilation failed. Is `capnp` installed?
|
||||
(apt-get install capnproto / brew install capnp)
|
||||
```
|
||||
|
||||
See [Building from Source -- Troubleshooting](building.md#troubleshooting) for more details.
|
||||
|
||||
### Other platforms
|
||||
|
||||
| Platform | Install command |
|
||||
|---|---|
|
||||
| Fedora / RHEL | `dnf install capnproto` |
|
||||
| Arch Linux | `pacman -S capnproto` |
|
||||
| Nix | `nix-env -iA nixpkgs.capnproto` |
|
||||
| Windows (vcpkg) | `vcpkg install capnproto` |
|
||||
| From source | [capnproto.org/install.html](https://capnproto.org/install.html) |
|
||||
The legacy Cap'n Proto schemas (`schemas/`) are still present for reference, but the v2 runtime and RPC framework use Protobuf exclusively.
|
||||
|
||||
---
|
||||
|
||||
@@ -84,7 +47,7 @@ docker --version # 20.10+
|
||||
docker compose version # v2+
|
||||
```
|
||||
|
||||
The provided `docker/Dockerfile` is a multi-stage build that installs `capnproto` in the builder stage, so you do **not** need the `capnp` binary on your host when building via Docker.
|
||||
The `docker/Dockerfile` is a multi-stage build that does not install any extra system packages in the builder stage — `protobuf-src` takes care of the Protobuf compiler at compile time.
|
||||
|
||||
See [Docker Deployment](docker.md) for full instructions.
|
||||
|
||||
@@ -95,7 +58,7 @@ See [Docker Deployment](docker.md) for full instructions.
|
||||
| Dependency | Required? | How to check |
|
||||
|---|---|---|
|
||||
| Rust stable 1.77+ | Yes | `rustc --version` |
|
||||
| `capnp` CLI | Yes (host builds) | `capnp --version` |
|
||||
| `protoc` CLI | No (vendored automatically) | n/a |
|
||||
| Docker + Compose | No (container builds only) | `docker --version` / `docker compose version` |
|
||||
|
||||
Once all prerequisites are satisfied, proceed to [Building from Source](building.md).
|
||||
|
||||
Reference in New Issue
Block a user