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
+124
Diff #1
+17
.gitignore
··· 1 + # Rust build artifacts 2 + /target/ 3 + 4 + # IDE and editor files 5 + .idea/ 6 + .vscode/ 7 + *.swp 8 + *.swo 9 + *~ 10 + 11 + # macOS 12 + .DS_Store 13 + 14 + # Environment files 15 + .env 16 + .env.local 17 + .env.*.local
+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"
+46
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 + version = "0.1.0" 12 + edition = "2021" 13 + publish = false 14 + 15 + # Declare shared dependency versions here. 16 + # Individual crates opt in with `{ workspace = true }`. 17 + [workspace.dependencies] 18 + # Async runtime 19 + tokio = { version = "1", features = ["full"] } 20 + 21 + # Web framework (relay) 22 + axum = "0.7" 23 + 24 + # Serialization 25 + serde = { version = "1", features = ["derive"] } 26 + serde_json = "1" 27 + 28 + # Error handling 29 + anyhow = "1" 30 + thiserror = "2" 31 + 32 + # Observability 33 + tracing = "0.1" 34 + tracing-subscriber = { version = "0.3", features = ["env-filter"] } 35 + 36 + # ATProto (repo-engine) 37 + # atrium-api = "0.22" 38 + # atrium-repo = "0.1" 39 + 40 + # Crypto (crypto) 41 + # rsky-crypto = "0.2" 42 + 43 + # Intra-workspace 44 + common = { path = "crates/common" } 45 + crypto = { path = "crates/crypto" } 46 + repo-engine = { path = "crates/repo-engine" }
+7
crates/common/Cargo.toml
··· 1 + [package] 2 + name = "common" 3 + version.workspace = true 4 + edition.workspace = true 5 + publish.workspace = true 6 + 7 + # common: shared types, error envelope, config parsing.
+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.workspace = true 4 + edition.workspace = true 5 + publish.workspace = true 6 + 7 + # crypto: signing, Shamir secret sharing, DID operations. 8 + # Depends on rsky-crypto (added when Wave 3 DID/key work begins).
+2
crates/crypto/src/lib.rs
··· 1 + // crypto: signing, Shamir secret sharing, DID operations. 2 + // Integrates with rsky-crypto.
+11
crates/relay/Cargo.toml
··· 1 + [package] 2 + name = "relay" 3 + version.workspace = true 4 + edition.workspace = true 5 + publish.workspace = true 6 + 7 + # relay is the network-facing binary: Axum HTTP server, XRPC handlers, 8 + # OAuth, provisioning API, blob storage. 9 + [[bin]] 10 + name = "relay" 11 + 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.workspace = true 4 + edition.workspace = true 5 + publish.workspace = true 6 + 7 + # repo-engine: MST construction, CAR file storage, commit construction. 8 + # Depends on atrium-repo (added when Wave 4 repo work begins).
+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
1 commit
expand
feat(MM-63): set up Cargo workspace with relay, repo-engine, crypto, common crates
expand 0 comments