From f6dfd7e4dece3c111aff2fe341676e12d26f8878 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Mon, 20 Sep 2021 10:57:26 -0400 Subject: [PATCH] structure --- Cargo.toml | 2 ++ game/Cargo.toml | 10 ++++++++++ game/src/lib.rs | 5 +++++ wrapper/Cargo.toml | 10 ++++++++++ wrapper/README.md | 3 +++ wrapper/src/main.rs | 5 +++++ 6 files changed, 35 insertions(+) create mode 100644 Cargo.toml create mode 100644 game/Cargo.toml create mode 100644 game/src/lib.rs create mode 100644 wrapper/Cargo.toml create mode 100644 wrapper/README.md create mode 100644 wrapper/src/main.rs diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..8dde388 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["./game", "./wrapper"] diff --git a/game/Cargo.toml b/game/Cargo.toml new file mode 100644 index 0000000..cfcc6a6 --- /dev/null +++ b/game/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "game" +publish = false +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +cgmath = "0.18" \ No newline at end of file diff --git a/game/src/lib.rs b/game/src/lib.rs new file mode 100644 index 0000000..e8bf6f8 --- /dev/null +++ b/game/src/lib.rs @@ -0,0 +1,5 @@ + +/// The game entrypoint +pub fn game_begin() { + +} \ No newline at end of file diff --git a/wrapper/Cargo.toml b/wrapper/Cargo.toml new file mode 100644 index 0000000..7669340 --- /dev/null +++ b/wrapper/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "wrapper" +publish = false +version = "0.1.0" +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +game = { version = "0.1", path = "../game"} \ No newline at end of file diff --git a/wrapper/README.md b/wrapper/README.md new file mode 100644 index 0000000..79e0ab1 --- /dev/null +++ b/wrapper/README.md @@ -0,0 +1,3 @@ +# Ignore this + +This crate exists to wrap the `game` lib crate. This is just a little workaround to make the Rust compiler better cache files when developing the game. \ No newline at end of file diff --git a/wrapper/src/main.rs b/wrapper/src/main.rs new file mode 100644 index 0000000..8460f9b --- /dev/null +++ b/wrapper/src/main.rs @@ -0,0 +1,5 @@ +use game::game_begin; + +fn main() { + game_begin(); +}