diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3248746 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Generated by Cargo +# will have compiled files and executables +debug +target + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +# Generated by cargo mutants +# Contains mutation testing data +**/mutants.out*/ + +# rustc will dump stack traces when hitting an internal compiler error to PWD +rustc-ice-*.txt + +# RustRover +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..3811fb7 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,19 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "client" +version = "0.1.0" + +[[package]] +name = "renderer" +version = "0.1.0" + +[[package]] +name = "server" +version = "0.1.0" + +[[package]] +name = "shared" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..a32b8d7 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,3 @@ +[workspace] +resolver = "3" +members = ["crates/*"] \ No newline at end of file diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml new file mode 100644 index 0000000..09c50c3 --- /dev/null +++ b/crates/client/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "client" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/crates/client/src/main.rs b/crates/client/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/client/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/renderer/Cargo.toml b/crates/renderer/Cargo.toml new file mode 100644 index 0000000..c29f61c --- /dev/null +++ b/crates/renderer/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "renderer" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/crates/renderer/src/lib.rs b/crates/renderer/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/renderer/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/server/Cargo.toml b/crates/server/Cargo.toml new file mode 100644 index 0000000..ff06670 --- /dev/null +++ b/crates/server/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "server" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/crates/server/src/main.rs b/crates/server/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/server/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/shared/Cargo.toml b/crates/shared/Cargo.toml new file mode 100644 index 0000000..5e22169 --- /dev/null +++ b/crates/shared/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "shared" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/crates/shared/src/lib.rs b/crates/shared/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/shared/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +}