add dagger-sdk

This commit is contained in:
Kasper Juul Hermansen 2023-01-29 11:38:13 +01:00
parent 7433453c6d
commit 9dccb83d94
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
6 changed files with 54 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "dagger-rs"
version = "0.1.1"
version = "0.1.2"
edition = "2021"
readme = "README.md"
license-file = "LICENSE.MIT"
@ -14,7 +14,10 @@ dirs = "4.0.0"
eyre = "0.6.8"
flate2 = { version = "1.0.25", features = ["zlib"] }
graphql-introspection-query = "0.2.0"
graphql_client = { version = "0.12.0", features = ["reqwest", "reqwest-blocking"] }
graphql_client = { version = "0.12.0", features = [
"reqwest",
"reqwest-blocking",
] }
hex = "0.4.3"
hex-literal = "0.3.4"
platform-info = "1.0.2"

2
crates/dagger-sdk/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/target
/Cargo.lock

View File

@ -0,0 +1,11 @@
[package]
name = "dagger-sdk"
version = "0.1.0"
edition = "2021"
readme = "README.md"
license-file = "LICENSE.MIT"
description = "A dagger sdk for rust, written in rust"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@ -0,0 +1,7 @@
Copyright 2023 Kasper J. Hermansen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,15 @@
# dagger-rs
A dagger sdk written in rust for rust.
## Disclaimer
Work in progress. This is not ready for usage yet
### Status
- [x] dagger cli downloader
- [x] dagger network session
- [ ] graphql rust codegen (User API)
- [ ] fix build / release cycle
- [ ] general api stabilisation

View File

@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}