Aquila Client

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.
Example: Publishing a Manifest
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()));
let hash = client.upload_file(Path::new("test.png")).await?;
let mut assets = HashMap::new();
assets.insert("textures/image.png".into(), AssetInfo {
hash,
size: 1024,
mime_type: Some("image/png".into()),
});
let manifest = AssetManifest {
version: "v1.0".into(),
assets,
..Default::default()
};
client.publish_manifest(&manifest).await?;
Ok(())
}
License: MIT OR Apache-2.0