Estuary

crates.io codecov

An alternate cargo registry suitable for small-scale crate publishing and distribution.


An estuary is a coastal semi-enclosed body of water where fresh and salt waters meet.

Apparently the blue crab calls this sort of environment home.

The high-level mission here is to provide a rust package registry in the same vein as [devpi] (for python packages).

Devpi offers a rich set of features including user-centric indexes, package search, passive upstream index mirroring and even a web UI.

Today, Estuary only supports the most fundamental registry functions:

These features allow us to cargo install or use crates from the registry as dependencies in other crates.

Estuary does not yet implement any sort of authentication handling and as such is only appropriate for internal use.

Installation

$ cargo install estuary

Support for loading environment variables from a .env file (off by default) can be added with:

$ cargo install estuary --features dotenv

Estuary depends on being able to run git on the command-line.

Usage

Estuary Server

For a full list of configuration options, run estuary --help.

Estuary allows for configuration to be specified by either flags on the command line, or from environment variables.

Required Configuration:

Note: Estuary relies on being able to run git on the command line, and expects to be able to find git in the PATH. If for some reason you're running Estuary in an environment where this is not the case, you should specify a path to the git binary with --git-bin or ESTUARY_GIT_BIN.

Configuring Cargo

Estuary exposes its package index git repository at the following URL:

<base-url>/git/index

To use Estuary for publishing or installing crates via cargo you need to add some configuration.

For example, if you defined your as http://estuary.example.com, you would add the following to your .cargo/config.toml:

toml [registries] estuary = { index = "http://estuary.example.com/git/index" }

With this entry added to your config, the next step is to "authenticate."

$ cargo login --registry estuary

Note that Estuary currently does nothing with the token to validate access. The token currently means nothing, yet cargo requires it.

From here, you can publish crates to Estuary with

$ cargo publish --registry estuary

Crates published to Estuary can be listed as dependencies in other crates by specifying the registry name like so:

toml [dependencies] my-cool-package = { version = "1.2.3", registry = "estuary" }

Binary crates can also be installed using the --registry flag:

$ cargo install --registry estuary my-cool-app

Environment variables can also be used to configure cargo. See the docs on [using an alternate registry] and [publishing to an alternate registry] for more on this.