From 4e60b5d767701a6a0003463ba41e033ceadb9283 Mon Sep 17 00:00:00 2001 From: Nadja Reitzenstein Date: Wed, 27 Oct 2021 23:42:44 +0200 Subject: [PATCH] Move API into it's own crate --- .gitmodules | 2 +- Cargo.toml | 2 +- api/Cargo.toml | 8 ++++++++ build.rs => api/build.rs | 0 schema => api/schema | 0 api/src/lib.rs | 8 ++++++++ 6 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 api/Cargo.toml rename build.rs => api/build.rs (100%) rename schema => api/schema (100%) create mode 100644 api/src/lib.rs diff --git a/.gitmodules b/.gitmodules index 975daa5..453aedb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "schema"] - path = schema + path = api/schema url = https://gitlab.com/fabinfra/fabaccess/fabaccess-api branch = main diff --git a/Cargo.toml b/Cargo.toml index 6ba4f66..f4be257 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,4 +87,4 @@ tempfile = "3.2" bincode = "1.3" [workspace] -members = ["modules/*"] +members = ["modules/*", "api"] diff --git a/api/Cargo.toml b/api/Cargo.toml new file mode 100644 index 0000000..d968b7b --- /dev/null +++ b/api/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "api" +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/build.rs b/api/build.rs similarity index 100% rename from build.rs rename to api/build.rs diff --git a/schema b/api/schema similarity index 100% rename from schema rename to api/schema diff --git a/api/src/lib.rs b/api/src/lib.rs new file mode 100644 index 0000000..1b4a90c --- /dev/null +++ b/api/src/lib.rs @@ -0,0 +1,8 @@ +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + let result = 2 + 2; + assert_eq!(result, 4); + } +}