A lightweight Crate package registry.
I'm building a package registry Just for fun mostly with the effect of learning and have some fun project to play with Rust.
The end goal is to have an easily hostable, lightweight https://crates.io clone that can be used as custom registry for when you simply want to self host or have a internal registry for private crates.
This project is currently pretty much work in progress and most parts of it are either incomplete or return dummy data.
Make sure you have rustup
and cargo
installed and configured, then run cargo build
.
No special configuration, just execute cargo run
.
To use this package registry with cargo, do the following steps:
-
Create a new git repo somewhere and create a
config.json
in it. -
Fill the file with the following information and make the initial commit:
{ "dl": "http://localhost:8000/api/v1/crates", "api": "http://localhost:8000" }
-
Add your repo to Cargo's configuration in the
~/.cargo/config
file:[registries] asgard = { index = "<path to your repo>" }
Now you can use this registry with cargo by simply adding --registry asgard
to the relevant
commands. For example:
cargo search --registry asgard rand
Most API endpoints are still stubs and return dummy data, so don't expect anything actually happening.
Prebuilt images are available at Docker Hub.
This project is licensed under the AGPL-3.0 License (or https://www.gnu.org/licenses/agpl-3.0.html).