{"id":20673704,"url":"https://github.com/cpg314/cargo-depot","last_synced_at":"2025-10-08T01:02:31.538Z","repository":{"id":252632249,"uuid":"840973660","full_name":"cpg314/cargo-depot","owner":"cpg314","description":"Alternative cargo registry with improved support for git/path dependencies","archived":false,"fork":false,"pushed_at":"2025-02-26T22:17:37.000Z","size":125,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-27T02:42:24.630Z","etag":null,"topics":["cargo","registry","rust","vendoring"],"latest_commit_sha":null,"homepage":"https://c.pgdm.ch/code/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cpg314.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-11T09:06:55.000Z","updated_at":"2025-02-26T22:17:41.000Z","dependencies_parsed_at":"2025-01-13T12:23:53.099Z","dependency_job_id":"dd1ca5c9-bfc0-47e5-ac97-3f95b072c918","html_url":"https://github.com/cpg314/cargo-depot","commit_stats":null,"previous_names":["cpg314/cargo-depot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cpg314/cargo-depot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpg314%2Fcargo-depot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpg314%2Fcargo-depot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpg314%2Fcargo-depot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpg314%2Fcargo-depot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpg314","download_url":"https://codeload.github.com/cpg314/cargo-depot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpg314%2Fcargo-depot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278872148,"owners_count":26060524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cargo","registry","rust","vendoring"],"created_at":"2024-11-16T20:42:18.989Z","updated_at":"2025-10-08T01:02:31.491Z","avatar_url":"https://github.com/cpg314.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![cargo-depot](logo.jpg)\n\nThis [cargo subcommand](https://doc.rust-lang.org/book/ch14-05-extending-cargo.html) allows creating and maintaining a simple [cargo alternative registry](https://doc.rust-lang.org/cargo/reference/registries.html), which can be served using any webserver (nginx, caddy, miniserve, S3...).\n\nCrates are added to the registry by pointing to their source, as a local folder or remote tarball, via the `cargo depot` subcommand.\n\n### Handling of git and path dependencies\n\nA distinguishing feature compared to other tools (see [below](#see-also)) is that [git and path dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) in the added crates will refer to the registry rather than crates.io, with the understanding that these will be pushed to the registry as well. This removes the need for maintaining [forks to replace dependencies](https://www.reddit.com/r/rust/comments/15z3w34/parch_indirect_dependencies/) or complex `[patch]` or `[source]` cargo configurations.\n\nFor example, a crate with\n\n```toml\n[dependencies]\ngit_dep = { version = \"0.1.0\", git = \"https://github.com/cpg314/example.git\", tag = \"v0.1.0\" }\npath_dep = { version = \"0.1.0\", path = \"../example\" }\n```\n\nwill have these dependencies advertised in the index as being in the local registry. With `cargo publish`, they would refer to the `crates.io` registry unless a `registry` property is added.\n\n\u003e [!NOTE]  \n\u003e When creating a tarball, `cargo package` will try to [create a lockfile](https://github.com/rust-lang/cargo/blob/ec05ed9f9cf03f516f469611d3fde7573300d187/src/cargo/ops/cargo_package.rs#L967) for crates [containing binaries or examples](https://github.com/rust-lang/cargo/blob/ec05ed9f9cf03f516f469611d3fde7573300d187/src/cargo/core/package.rs#L187-L189). This is problematic, as the registry dependencies will not resolve, unless again a `registry` property is added and the dependencies are pushed in the right order. To avoid this, `cargo-depot` will automatically temporarily disable binary targets and examples.\n\n### Non-features\n\nOn the other hand, this is _not_ a fully-fledged registry; for example, the [web API](https://doc.rust-lang.org/cargo/reference/registry-web-api.html) is not implemented.\n\n## Usage\n\n### Installation\n\n```\n$ cargo install --git https://github.com/cpg314/cargo-depot\n```\n\n### Initializing and maintaining the registry\n\n```\nUsage: cargo depot [OPTIONS] --registry \u003cREGISTRY\u003e [CRATES]...\n\nArguments:\n  [CRATES]...  Paths to crates (local workspaces or HTTP links to tar.gz)\n\nOptions:\n      --registry \u003cREGISTRY\u003e  Local path to the registry\n      --url \u003cURL\u003e            URL of the registry, only needed for initialization\n  -h, --help                 Print help\n  -V, --version              Print version\n```\n\nVersions that have already been added are skipped.\n\nOn Github, tarballs can be downloaded at given commits or tags with the following links:\n\n```text\nhttps://github.com/{owner}/{repo}/archive/{commit}.tar.gz\nhttps://github.com/{owner}/{repo}/archive/refs/tags/{tag}.tar.gz\n```\n\n### Serving the files\n\nUse your favourite HTTP server to serve the contents of the registry folder (`crates` and `index` folders).\n\n### Using the registry\n\nIn your [`.cargo/config.toml`](https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure):\n\n```toml\n[registries]\nlocal = { index = \"sparse+http://127.0.0.1:3333/index/\" }\n```\n\n(replace the URL adequately).\n\nFinally, when declaring your dependencies in `Cargo.toml`:\n\n```toml\ncrate = {version = \"0.1.1\", registry = \"local\" }\n```\n\n### Deleting a crate\n\nDelete the line in the index file in the `index` directory (or the entire file to delete all versions), and the `.crate` file in the `.crate` directory. This might break things for users.\n\n## Test\n\nThe following will create a registry, add crates to it, and finally access them in a crate:\n\n```\n$ cargo make example\n```\n\nSee the files in the `example` directory.\n\n## See also\n\n- \u003chttps://github.com/integer32llc/margo\u003e\n- \u003chttps://github.com/ehuss/cargo-index/\u003e (an earlier implementation used the corresponding library [reg-index](https://github.com/ehuss/cargo-index/tree/master/reg-index), but this introduces a fairly heavy dependency on `git2` and therefore `openssl`).\n- https://github.com/rust-lang/cargo/wiki/Third-party-registries\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpg314%2Fcargo-depot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpg314%2Fcargo-depot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpg314%2Fcargo-depot/lists"}