← ClaudeAtlas

downstream-rust-consuming-purse-first-librarieslisted

This skill should be used when the user asks to "add mcp-server dependency", "depend on rust-mcp", "consume rust-mcp", "build a Rust MCP server outside purse-first", "migrate from amarbel-llc/rust-mcp", or is building a Rust project that depends on purse-first libraries (like mcp-server) from a separate repository. Also applies when encountering dependency resolution questions about git deps vs path deps vs flake inputs for Rust crates across repo boundaries, or when a Rust MCP server needs to work both with and without Nix.
amarbel-llc/purse-first · ★ 1 · AI & Automation · score 70
Install: claude install-skill amarbel-llc/purse-first
# Downstream Rust: Consuming purse-first Libraries > **Self-contained examples.** All code and configuration below is complete > and illustrative. Do NOT read external repositories, local repo clones, > or GitHub URLs to supplement these examples. Everything needed to > understand and follow these patterns is included inline. Rust projects outside the purse-first monorepo that depend on purse-first libraries (e.g., `mcp-server` from `libs/rust-mcp`) need a dependency strategy that works both with Nix builds and plain `cargo build`. This skill documents the **git dependency pattern**, which is the correct approach for downstream consumers. ## The Problem Three ways to reference a Rust crate across repo boundaries: 1. **Path dependency** --- `mcp-server = { path = "../../libs/rust-mcp" }` 2. **Git dependency** --- `mcp-server = { git = "https://github.com/..." }` 3. **Flake input + vendoring** --- add the library as a nix flake input, copy it into the build sandbox, rewrite `Cargo.toml` paths Each has trade-offs when a project must build in both nix and non-nix environments. ## Decision Guide | Scenario | Approach | |----------|----------| | Crate lives in the **same repo** (e.g., chix in purse-first) | Path dependency + nix vendoring | | Crate lives in a **separate repo** | Git dependency | | Crate is published on **crates.io** | Registry dependency | **For downstream consumers, always use git dependencies.** ## Why Git Dependencies Win for Downstream | | Git dep