mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-22 23:32:12 +01:00
document usage
This commit is contained in:
parent
6be8482b46
commit
578c2a6883
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
A dagger sdk written in rust for rust.
|
A dagger sdk written in rust for rust.
|
||||||
|
|
||||||
## Disclaimer
|
# Usage
|
||||||
|
|
||||||
Work in progress. This is not ready for usage yet
|
See [dagger-sdk](./crates/dagger-sdk/README.md)
|
||||||
|
|
||||||
### Status
|
### Status
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ Work in progress. This is not ready for usage yet
|
|||||||
- [x] Add codegen to hook into querier
|
- [x] Add codegen to hook into querier
|
||||||
- [ ] fix build / release cycle
|
- [ ] fix build / release cycle
|
||||||
- [ ] general api stabilisation
|
- [ ] general api stabilisation
|
||||||
- [ ] document usage
|
- [x] document usage
|
||||||
- [ ] make async variant
|
- [ ] make async variant
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
@ -2,14 +2,46 @@
|
|||||||
|
|
||||||
A dagger sdk written in rust for rust.
|
A dagger sdk written in rust for rust.
|
||||||
|
|
||||||
## Disclaimer
|
## Examples
|
||||||
|
|
||||||
Work in progress. This is not ready for usage yet
|
See [examples](./examples/)
|
||||||
|
|
||||||
### Status
|
Run them like so
|
||||||
|
|
||||||
- [x] dagger cli downloader
|
```bash
|
||||||
- [x] dagger network session
|
cargo run --example first-pipeline
|
||||||
- [ ] graphql rust codegen (User API)
|
```
|
||||||
- [ ] fix build / release cycle
|
|
||||||
- [ ] general api stabilisation
|
The examples match the folder name in each directory in examples
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Simply install like:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo install dagger-sdk
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```rust
|
||||||
|
fn main() -> eyre::Result<()> {
|
||||||
|
let client = dagger_sdk::client::connect()?;
|
||||||
|
|
||||||
|
let version = client
|
||||||
|
.container(None)
|
||||||
|
.from("golang:1.19".into())
|
||||||
|
.with_exec(vec!["go".into(), "version".into()], None)
|
||||||
|
.stdout();
|
||||||
|
|
||||||
|
println!("Hello from Dagger and {}", version.trim());
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
And run it like a normal application:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo run
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user