11 novembre 2019

What's new in Meuse 0.2.0

I released today the version 0.2.0 of Meuse, an alternative registry for the Rust programming language. A lot of improvements have been made, and new features (in beta :p) are availables in this release: S3 backend for crates binary files, and crates.io mirroring.

New things in this release

Refactoring and bugfixes

I did a lot of refactoring in the project internals. It’s not finished yet, but the code looks better now.

I also fixed a couple of bugs, and also made a few improvements (for example in error handling).

Monitoring

Meuse exposes a Prometheus endpoint since the release 0.1.0. This release adds more metrics: JVM metrics and the database connection pool metrics.

Multiple backends for the crates binary files

I refactored the project to be able to easily add more backends for crates binary files, and added a S3 backend. This will allow you to store your crates binary files on any S3-compatible storage (I made my tests with SOS, the S3-compatible storage provided by Exoscale).

crates.io mirroring

Meuse is now able to mirror crates.io, and will also cache crates binary files downloaded from crates.io on its own store (so on its filesystem or on S3).

Using Meuse alongside crates.io

It was already possible to use Meuse alongside crates.io. You could for example upload private crates on Meuse, and these crates could have dependencies on crates stored on crates.io.

To do that, you should configure the allowed-registries parameter of your private registry index (cf the alternative registry RFC).

But we can do better.

crates.io mirroring

Meuse can download crates files from crates.io, and then cache them on its own store. The next time you download this crate, crates.io will not be contacted at all, Meuse will serve the crate from its store directly.

If you store your crates files on the filesystem, Meuse will write the cached crates in a directory named .crates.io, which will be automatically created at the root of the store directory. If the crates are stored in a S3-compatible storage, the file path will be prefixed by .crates.io.

cargo mirror explanation

To find how to create a crates.io mirror, please check the Meuse documentation.

In the next Meuse release, I will add an endpoint to force the caching of a crate. Like that, you will be able to cache crates from crates.io in Meuse even if you don’t run cargo build for your project.

Auth issues

cargo does not pass the authentication token for the cargo search command, and when a crate is downloaded. This means that I cannot authenticate the user for these actions in Meuse (cf this issue)

Conclusion

The next steps for Meuse are:

  • More refactoring: there are several things that I don’t like in the codebase.

  • New features around crates.io mirroring.

  • More metrics (especially for the S3 client).

  • Better documentation (in the code and in the documentation website).

  • A CLI.

  • A read-only frontend.

Also, don’t hesitate to test the project, report issues, and give me feedbacks. It would be very helpful for me.

Tags: clojure rust meuse
Top of page