An easy-to-host PDS on the ATProtocol, MacOS. Grandma-approved.

feat(MM-63): Cargo workspace setup #1

merged opened by malpercio.dev targeting main from malpercio/mm-63-cargo-workspace-setup

Summary#

  • Root Cargo.toml defines workspace with resolver = "2", Rust 2021 edition, and [workspace.dependencies] pre-declaring shared crate versions (tokio, axum, serde, anyhow, thiserror, tracing)
  • Four crates scaffolded: relay (binary), repo-engine, crypto, common (all libraries)
  • cargo build and cargo test pass from workspace root

Notes#

  • atrium-repo and rsky-crypto are commented out in [workspace.dependencies] — they'll be uncommented when Wave 3/4 work begins
  • crates/app-desktop/ (Tauri shell) intentionally excluded — v0.2 scope per MM-63
  • Rust toolchain not yet pinned — that's MM-64 (devenv)

Closes#

MM-63

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:web:malpercio.dev/sh.tangled.repo.pull/3mgj6hblg6z22
+104
Diff #0
+19
Cargo.lock
··· 1 + # This file is automatically @generated by Cargo. 2 + # It is not intended for manual editing. 3 + version = 4 4 + 5 + [[package]] 6 + name = "common" 7 + version = "0.1.0" 8 + 9 + [[package]] 10 + name = "crypto" 11 + version = "0.1.0" 12 + 13 + [[package]] 14 + name = "relay" 15 + version = "0.1.0" 16 + 17 + [[package]] 18 + name = "repo-engine" 19 + version = "0.1.0"
+44
Cargo.toml
··· 1 + [workspace] 2 + members = [ 3 + "crates/relay", 4 + "crates/repo-engine", 5 + "crates/crypto", 6 + "crates/common", 7 + ] 8 + resolver = "2" 9 + 10 + [workspace.package] 11 + edition = "2021" 12 + 13 + # Declare shared dependency versions here. 14 + # Individual crates opt in with `{ workspace = true }`. 15 + [workspace.dependencies] 16 + # Async runtime 17 + tokio = { version = "1", features = ["full"] } 18 + 19 + # Web framework (relay) 20 + axum = "0.7" 21 + 22 + # Serialization 23 + serde = { version = "1", features = ["derive"] } 24 + serde_json = "1" 25 + 26 + # Error handling 27 + anyhow = "1" 28 + thiserror = "2" 29 + 30 + # Observability 31 + tracing = "0.1" 32 + tracing-subscriber = { version = "0.3", features = ["env-filter"] } 33 + 34 + # ATProto (repo-engine) 35 + # atrium-api = "0.22" 36 + # atrium-repo = "0.1" 37 + 38 + # Crypto (crypto) 39 + # rsky-crypto = "0.2" 40 + 41 + # Intra-workspace 42 + common = { path = "crates/common" } 43 + crypto = { path = "crates/crypto" } 44 + repo-engine = { path = "crates/repo-engine" }
+7
crates/common/Cargo.toml
··· 1 + [package] 2 + name = "common" 3 + version = "0.1.0" 4 + edition.workspace = true 5 + 6 + # common: shared types, error envelope, config parsing. 7 + [dependencies]
+1
crates/common/src/lib.rs
··· 1 + // common: shared types, error envelope, config parsing.
+8
crates/crypto/Cargo.toml
··· 1 + [package] 2 + name = "crypto" 3 + version = "0.1.0" 4 + edition.workspace = true 5 + 6 + # crypto: signing, Shamir secret sharing, DID operations. 7 + # Depends on rsky-crypto (added when Wave 3 DID/key work begins). 8 + [dependencies]
+2
crates/crypto/src/lib.rs
··· 1 + // crypto: signing, Shamir secret sharing, DID operations. 2 + // Integrates with rsky-crypto.
+10
crates/relay/Cargo.toml
··· 1 + [package] 2 + name = "relay" 3 + version = "0.1.0" 4 + edition.workspace = true 5 + 6 + # relay is the network-facing binary: Axum HTTP server, XRPC handlers, 7 + # OAuth, provisioning API, blob storage. 8 + [[bin]] 9 + name = "relay" 10 + path = "src/main.rs"
+3
crates/relay/src/main.rs
··· 1 + fn main() { 2 + println!("relay starting"); 3 + }
+8
crates/repo-engine/Cargo.toml
··· 1 + [package] 2 + name = "repo-engine" 3 + version = "0.1.0" 4 + edition.workspace = true 5 + 6 + # repo-engine: MST construction, CAR file storage, commit construction. 7 + # Depends on atrium-repo (added when Wave 4 repo work begins). 8 + [dependencies]
+2
crates/repo-engine/src/lib.rs
··· 1 + // repo-engine: MST construction, CAR file storage, commit construction. 2 + // Integrates with atrium-repo.

History

2 rounds 0 comments
sign up or login to add to the discussion
3 commits
expand
feat(MM-63): set up Cargo workspace with relay, repo-engine, crypto, common crates
fix(MM-63): address PR review — publish = false, workspace version, clean Cargo.tomls
chore: add a gitignore
expand 0 comments
pull request successfully merged
malpercio.dev submitted #0
1 commit
expand
feat(MM-63): set up Cargo workspace with relay, repo-engine, crypto, common crates
expand 0 comments