Skip to main content
The Mesa Rust SDK (mesa-dev) provides a type-safe client for interacting with the Depot API from Rust. For full API documentation, see docs.rs/mesa-dev.

Installation

cargo add mesa-dev

Quick Start

use mesa_dev::{Mesa, MesaError, models::CreateRepoRequest};

#[tokio::main]
async fn main() -> Result<(), MesaError> {
    let client = Mesa::new("my-api-key");

    // Create a repository
    let repo = client
        .repos("my-org")
        .create(&CreateRepoRequest {
            name: "my-repo".to_owned(),
            default_branch: None,
        })
        .await?;
    println!("Created repo: {}", repo.name);

    // List all branches (automatically paginates)
    let branches = client
        .branches("my-org", "my-repo")
        .list_all()
        .collect()
        .await?;
    println!("Found {} branches", branches.len());

    Ok(())
}

Resources

ResourceAccessorOperations
Reposclient.repos(org)create, list, get, rename, delete
Branchesclient.branches(org, repo)create, list, delete
Commitsclient.commits(org, repo)create, list, get
Contentclient.content(org, repo)get (files and directories)
Diffsclient.diffs(org, repo)get
Adminclient.admin(org)API key management
For detailed usage of each resource, pagination, error handling, retry configuration, and custom HTTP backends, see the full API documentation on docs.rs.

Minimum Supported Rust Version

Rust 1.85+ (edition 2024).