dagger-rs/crates/dagger-sdk/examples/first-pipeline/main.rs
kjuulh c14cd64453
feat(sdk): move to &str instead of String and introduce builder.
This will make the api much easier to use, as we can now rely on ""
instead of "".into() for normal string values.

Introduced builder as well, which makes it much easier to use *Opts, as
it can handle the building of that, and get the benefits from String ->
&str, as that is currently not allowed for optional values
2023-02-19 17:21:40 +01:00

14 lines
301 B
Rust

fn main() -> eyre::Result<()> {
let client = dagger_sdk::connect()?;
let version = client
.container(None)
.from("golang:1.19")
.with_exec(vec!["go", "version".into()], None)
.stdout()?;
println!("Hello from Dagger and {}", version.trim());
Ok(())
}