2023-08-12 19:50:30 +02:00
|
|
|
use dagger_rust::build::{RustVersion, SlimImage};
|
|
|
|
|
|
|
|
#[tokio::main]
|
|
|
|
pub async fn main() -> eyre::Result<()> {
|
|
|
|
let client = dagger_sdk::connect().await?;
|
|
|
|
|
|
|
|
let rust_build = dagger_rust::build::RustBuild::new(client.clone());
|
|
|
|
|
|
|
|
let containers = rust_build
|
|
|
|
.build_release(
|
|
|
|
Some("testdata"),
|
|
|
|
RustVersion::Nightly,
|
|
|
|
&["crates/*"],
|
|
|
|
&["openssl"],
|
|
|
|
vec![SlimImage::Debian {
|
|
|
|
image: "debian:bookworm".into(),
|
|
|
|
deps: vec!["openssl".into()],
|
|
|
|
architecture: dagger_rust::build::BuildArchitecture::Amd64,
|
|
|
|
}],
|
|
|
|
"example_bin",
|
|
|
|
)
|
|
|
|
.await?;
|
|
|
|
|
|
|
|
for container in containers {
|
2023-10-21 12:45:33 +02:00
|
|
|
container.sync().await?;
|
2023-08-12 19:50:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
}
|