mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-10 03:41:42 +01:00
kjuulh
94336d0637
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
14 lines
301 B
Rust
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(())
|
|
}
|