1# Chapter 28: third-party, what came from elsewhere 2 3The last chapter is about everything this repository did not write: every 4crate from crates.io, and the Jev client it shares with the owner's other 5Jev projects. 6 7**crates.io, without vendoring.** [Cargo.toml](Cargo.toml) here is not a 8real package. It lists every crates.io dependency of the whole repository so 9that Cargo can resolve and lock their versions ([Cargo.lock](Cargo.lock)), 10and then reindeer, a tool from the buck world, turns that resolution into 11[BUCK](BUCK): one `http_archive` per crate (its URL and sha256) and one 12build rule per crate. No crate's source is committed. buck fetches each 13archive when it builds, and the nix package fetches the same archives by 14the same hashes, read out of the same file (chapter 16). 15 16```mermaid 17flowchart LR 18 C["Cargo.toml: what the repo depends on"] -->|"cargo resolves"| L["Cargo.lock"] 19 L -->|"reindeer buckify"| B["BUCK: an http_archive and a rule per crate"] 20 R["reindeer.toml, fixups/, pg_major.bzl"] --> B 21 B --> U["//third-party:pgrx, //third-party:hyper, …"] 22 J["jevcrates/ (git submodule)"] -->|"path dependencies"| C 23``` 24 25**jevcrates, as a submodule.** `jev-protocol` (the questions, the exact 26request bytes, the verified answers), `jev-client` (retries, timeouts, 27redials, behind two ports) and `jev-mock` (the fake Jev every test talks to) 28lived in this repository until 2026-10-01. They moved to jevcrates, where 29four projects share one copy, and come back in as the git submodule 30[jevcrates/](jevcrates/), pinned by its commit and buckified like any crate. 31`.gitmodules` names it by the relative URL `../jevcrates.git`, so a clone 32from the lmjtfy site finds it right beside this one. jevcrates has a guide of 33its own, starting at its README. 34 35> **Aside: pgrx and the moving major.** reindeer writes pgrx with the one 36> `pgNN` feature `Cargo.toml` selects (18). That would build the whole graph 37> for 18 only. [pg_major.bzl](pg_major.bzl) wraps reindeer's rules so that 38> any `pgNN` feature becomes a select over the `pg_major` constraint 39> (chapter 27), and gives pgrx-pg-sys's bindgen run that major's 40> `pg_config`. `reindeer.toml` loads it in place of the prelude's rules, so 41> it survives every re-buckify. 42 43> **Try it.** `git submodule status` shows the jevcrates commit this 44> checkout pins, and 45> `git clone https://lmjtfy.fun/jevcrates.git` is that 46> repository on its own. 47 48Not chapters, on purpose: 49 50- **`jevcrates/`** is another repository, with its own guide. 51- **`fixups/`** holds one `fixups.toml` per crate whose build needs help 52 under buck (mostly: run its build script, and pass on the native 53 libraries it asks to link): 34 folders of one file each, a mechanical 54 shard of reindeer's input with nothing to say beyond its own contents. 55- **`top/`** holds `lib.rs`, a one-line placeholder: reindeer needs this 56 manifest to have a library target, and it points here. 57 58## For the people who maintain it 59 60| Path | What | 61| --- | --- | 62| [Cargo.toml](Cargo.toml) | Every crates.io dependency, with the features it is built with, and the jev crates as path dependencies into the submodule. | 63| [Cargo.lock](Cargo.lock) | The resolved versions buck builds. | 64| [BUCK](BUCK) | Generated by reindeer: the archives and rules. Do not edit. | 65| [reindeer.toml](reindeer.toml) | reindeer's settings: fetch, do not vendor (`vendor = false`); the full Cargo environment for build scripts; `buckfile_imports`, which loads `pg_major.bzl` and exports `Cargo.toml` for `tools/cargo-gen`. | 66| [pg_major.bzl](pg_major.bzl) | reindeer's rules with pgrx's major made a configuration. | 67| [fixups/](fixups/) | Per-crate build fixes for reindeer. | 68| [top/](top/) | The placeholder crate root. | 69| [jevcrates/](jevcrates/) | The jevcrates submodule. | 70 71The guide ends here. If you came for the extension, the root 72[CLAUDE.md](../CLAUDE.md) is the whole design contract, every rule with its 73evidence; if you came for the client, jevcrates' guide picks up where this 74one leaves off. 75 76← Previous: [Chapter 27, platforms/](../platforms/) · Up: [postjevsql](../)