This is a third-party implementation of an atproto PDS. It is a Rust port of dnproto. My main account (threddyrex.org) is hosted on rustproto.
For info on how to implement a PDS from scratch, check out Ten Steps to a PDS.
(Note: rustproto is an independent, community-driven project and is not affiliated with, sponsored by, or endorsed by Bluesky Social, PBC.)
CAR repo encoding and decoding:
- repo/mod.rs - repo module - explains repo structure ⭐
- dag_cbor.rs - decoding/encoding dag cbor ⭐
- cid.rs - decoding/encoding cid
- varint.rs - decoding/encoding varint
MST data structure:
- mst.rs - MST
- mst_node.rs - represents one node in the MST
- mst_entry.rs - represents one entry in a MST node
PDS implementation:
- /xrpc/ - the XRPC endpoints
- installer.rs - installing the PDS
- server.rs - PDS entry point
- db/ - the database interface, where the repo is stored
- repo_mst.rs - converting MST into dag-cbor for use in repos
- user_repo.rs - operations on the user's repo
Listening to a firehose:
General Bluesky WS calls:
- bluesky_client.rs - calling the Bluesky API.