mirror of
https://github.com/vhaudiquet/ecrou.git
synced 2026-11-12 22:22:44 +00:00
73eaeb57acba6a8b1e060ffa2ab17644ee165011
Ubuntu tarballs came from the daily/current directories - moving targets, no published checksums guarantee, gone when a release EOLs. resolve_ubuntu_url now builds the cdimage release URL: ubuntu-base/releases/<YY.MM>/release/ubuntu-base-<YY.MM>-base-<arch>.tar.gz, whose SHA256SUMS the existing checksum verification consumes. Resolution returns the YY.MM number (the cache key follows), and accepts the codename interchangeably: a static table maps the known codenames offline - ubuntu:resolute and ubuntu:26.04 are the same image and the same entry - with meta-release as a fallback for codenames newer than the table. Floating aliases (latest/lts) still consult meta-release; explicit numbers never touch the network, which also removes the per-cache-path network lookup generate_cache_filename used to trigger for codename inputs. URLs verified live: tarball and SHA256SUMS both 200.
ecrou
a small microVM runtime based on libkrun
Try ecrou in the terminal
Installation
ecrou is available as a strictly confined snap:
sudo snap install ecrou
sudo snap connect ecrou:kvm
Usage
$ ecrou run -it ubuntu
root@ecrou-vm-m2glhl:/#
Embed ecrou into your project
ecrou is both a library and a tiny CLI frontend around it. The library is embeddable into any project, allowing to use microVMs easily.
Rust
ecrou is a Rust library, which can just be called:
use ecrou::vm::RunOptions;
use ecrou::NoProgress;
fn main() -> ecrou::Result<std::process::ExitCode> {
let code = ecrou::vm::run(
&RunOptions {
image: "ubuntu:resolute".into(),
command: vec!["uname".into(), "-a".into()],
..RunOptions::default()
},
&NoProgress,
)?;
Ok(std::process::ExitCode::from(code.clamp(0, 255) as u8))
}
Languages
Rust
99.4%
Ruby
0.6%