mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-22 07:12:12 +01:00
fix(sdk): readme dagger-rs -> dagger-sdk
This commit is contained in:
parent
92350306b3
commit
7d04ab1240
@ -1,4 +1,4 @@
|
|||||||
# dagger-rs
|
# dagger-sdk
|
||||||
|
|
||||||
A dagger sdk written in rust for rust.
|
A dagger sdk written in rust for rust.
|
||||||
|
|
||||||
@ -19,20 +19,20 @@ The examples match the folder name in each directory in examples
|
|||||||
Simply install like:
|
Simply install like:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cargo install dagger-sdk
|
cargo add dagger-sdk
|
||||||
```
|
```
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
fn main() -> eyre::Result<()> {
|
fn main() -> eyre::Result<()> {
|
||||||
let client = dagger_sdk::client::connect()?;
|
let client = dagger_sdk::connect()?;
|
||||||
|
|
||||||
let version = client
|
let version = client
|
||||||
.container(None)
|
.container(None)
|
||||||
.from("golang:1.19".into())
|
.from("golang:1.19".into())
|
||||||
.with_exec(vec!["go".into(), "version".into()], None)
|
.with_exec(vec!["go".into(), "version".into()], None)
|
||||||
.stdout();
|
.stdout()?;
|
||||||
|
|
||||||
println!("Hello from Dagger and {}", version.trim());
|
println!("Hello from Dagger and {}", version.trim());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user