Expand description
Binary Manager service for downloading and caching node binaries via mecha10-api
This service implements the Node Binary Distribution architecture, providing:
- Downloading pre-built node binaries via the public
mecha10-apidownloads proxy (GET /api/downloads/node/{name}), never the private Minio instance directly - Caching binaries to
~/.mecha10/bin/ - Platform detection and target triple resolution
- Fallback to cargo install for unsupported platforms
§Design
- Binaries are downloaded from
{mecha10_api}/downloads/node/{node}?os=..&arch=..&version=.. - Binary naming:
{node}-{version}-{target}.tar.gz - Cached to:
~/.mecha10/bin/{node}-{version}-{target} - Symlink created:
~/.mecha10/bin/{node}-> latest version
§Usage
use mecha10_cli::services::BinaryManager;
let manager = BinaryManager::new()?;
// Resolve binary path (downloads if needed)
let path = manager.resolve("speaker").await?;
// Execute the binary
std::process::Command::new(&path).spawn()?;Structs§
- Binary
Manager - Service for managing node binary downloads and caching