Skip to content
A Macaroon implementation in Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Rusty Macaroon

A Rust implementation of Macaroons loosely based off of the C reference implementation with a focus on the v2 spec.


There are currently two fully working examples in the examples directory. To run them, simply execute:

# First party only caveats
$ cargo run --example first_party
# With third party caveats
$ cargo run --example third_party

Current Status

🚨 🚨 This is very alpha and NOT READY FOR PRODUCTION 🚨 🚨

With that said, here is what is done and not done.

  • Create a new macaroon
  • Add first-party caveats
  • Add third-party caveats
  • Validate macaroon with first-party caveats
  • Validate macaroon with third-party caveats
  • Serialize and deserialize macaroons from JSON
  • Serialize and deserialize macaroons using v2 binary format
  • Unit tests

Other future enhancements

As we continue to work on this, we may create a separate crate that also defines common caveat validators (such as checking for expiration of a time). But as of now, we are just trying to get to feature complete


We ❤️ any contributions. Most of us are fairly new to Rust, so any fixes to make things simpler or more idiomatic are also more than welcome. Please open a pull request if you have something you want to contribute

You can’t perform that action at this time.