mesa-dev
Rust SDK for the mesa.dev API — manage repositories, branches, commits, content, diffs, and API keys programmatically.
Installation
Quick Start
use ;
async
Resources
| Resource | Accessor | Operations |
|---|---|---|
| Repos | client.repos(org) |
create, list, get, rename, delete |
| Branches | client.branches(org, repo) |
create, list, delete |
| Commits | client.commits(org, repo) |
create, list, get, create_with_lfs |
| Content | client.content(org, repo) |
get (files and directories) |
| Diffs | client.diffs(org, repo) |
get |
| LFS | client.lfs(org, repo) |
upload |
| Admin | client.admin(org) |
API key management |
Paginated endpoints expose a list_all() method that returns a PageStream with lazy cursor-based iteration.
Uploading Large Files (LFS)
Use the upload_large_files helper to upload large files to a repository without cloning:
use ;
use ;
use Author;
async
This helper automatically:
- Computes SHA-256 hashes for each file
- Uploads content to LFS storage via pre-signed URLs
- Creates a commit with LFS pointer files
HTTP Backends
The SDK is generic over its HTTP transport via the HttpClient trait.
| Feature | Backend | Async | Default |
|---|---|---|---|
reqwest-client |
reqwest | yes | yes |
ureq-client |
ureq | no | no |
You can also bring your own backend by implementing HttpClient. See the trait documentation for a full guide.
Retry
All requests are retried with exponential backoff and jitter (up to 3 attempts by default). Retryable conditions: HTTP 429, 5xx responses, timeouts, and connection errors. Retry parameters are configurable via ClientBuilder.
Minimum Supported Rust Version
Rust 1.85+ (edition 2024).
Note: A large part of this documentation was generated with the assistance of an LLM. If you spot inaccuracies, please open an issue.