Module binary_manager

Module binary_manager 

Source
Expand description

Binary Manager service for downloading and caching node binaries from GitHub releases

This service implements the Node Binary Distribution architecture, providing:

  • Downloading pre-built node binaries from GitHub releases
  • Caching binaries to ~/.mecha10/bin/
  • Platform detection and target triple resolution
  • Fallback to cargo install for unsupported platforms

§Design

  • Binaries are downloaded from GitHub releases as tarballs
  • 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§

BinaryManager
Service for managing node binary downloads and caching