| Crates.io | aquila_client |
| lib.rs | aquila_client |
| version | 0.5.0 |
| created_at | 2026-01-06 01:15:29.222562+00 |
| updated_at | 2026-01-07 07:16:02.275803+00 |
| description | Aquila asset server client |
| homepage | |
| repository | https://github.com/NicoZweifel/aquila |
| max_upload_size | |
| id | 2024894 |
| size | 66,579 |
An async HTTP client for interacting with an Aquila Server.
Primarily used by tooling (CLIs, CI/CD scripts, plugins) to upload assets, publish manifests, and mint authentication tokens, as well as to fetch manifests for specific versions.
use aquila_client::AquilaClient;
use aquila_core::manifest::{AssetManifest, AssetInfo};
use std::path::Path;
use std::collections::HashMap;
async fn run() -> anyhow::Result<()> {
let client = AquilaClient::new("http://localhost:3000", Some("my-token".into()));
// Upload a file
let hash = client.upload_file(Path::new("test.png")).await?;
// Create a manifest entry
let mut assets = HashMap::new();
assets.insert("textures/image.png".into(), AssetInfo {
hash,
size: 1024,
mime_type: Some("image/png".into()),
});
// Publish
let manifest = AssetManifest {
version: "v1.0".into(),
assets,
..Default::default()
};
client.publish_manifest(&manifest).await?;
Ok(())
}
License: MIT OR Apache-2.0