From 1be156d911aca91a2061abd5b693c7e2368b459b Mon Sep 17 00:00:00 2001 From: kjuulh Date: Tue, 25 Oct 2022 19:07:37 +0200 Subject: [PATCH] with crate --- .gitignore | 1 + Cargo.lock | 11 +++++++++++ Cargo.toml | 13 +++++++++++++ crates/octopush_cli/.gitignore | 2 ++ crates/octopush_cli/Cargo.toml | 8 ++++++++ crates/octopush_cli/src/lib.rs | 14 ++++++++++++++ cuddle.yaml | 6 +----- src/main.rs | 3 +++ 8 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 crates/octopush_cli/.gitignore create mode 100644 crates/octopush_cli/Cargo.toml create mode 100644 crates/octopush_cli/src/lib.rs create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..07065b6 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,11 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "octopush" +version = "0.1.0" + +[[package]] +name = "octopush_cli" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..7a1c0a4 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "octopush" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[workspace] +members = [ + "crates/octopush_cli" +] + +[dependencies] diff --git a/crates/octopush_cli/.gitignore b/crates/octopush_cli/.gitignore new file mode 100644 index 0000000..4fffb2f --- /dev/null +++ b/crates/octopush_cli/.gitignore @@ -0,0 +1,2 @@ +/target +/Cargo.lock diff --git a/crates/octopush_cli/Cargo.toml b/crates/octopush_cli/Cargo.toml new file mode 100644 index 0000000..53d7f62 --- /dev/null +++ b/crates/octopush_cli/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "octopush_cli" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/crates/octopush_cli/src/lib.rs b/crates/octopush_cli/src/lib.rs new file mode 100644 index 0000000..7d12d9a --- /dev/null +++ b/crates/octopush_cli/src/lib.rs @@ -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); + } +} diff --git a/cuddle.yaml b/cuddle.yaml index 0bd3198..22191a0 100644 --- a/cuddle.yaml +++ b/cuddle.yaml @@ -1,6 +1,6 @@ # yaml-language-server: $schema=https://git.front.kjuulh.io/kjuulh/cuddle/raw/branch/main/schemas/base.json -base: "git@git.front.kjuulh.io:kjuulh/cuddle-go-plan.git" +base: "git@git.front.kjuulh.io:kjuulh/cuddle-rust-plan.git" vars: service: "octopush" @@ -9,9 +9,5 @@ vars: scripts: push_github: type: shell - run_server: - type: shell - run_client: - type: shell run: type: shell diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}