From f811271bafad19a6cd890d15aaa30914f19d64fb Mon Sep 17 00:00:00 2001 From: gered Date: Sat, 11 Nov 2023 14:33:54 -0500 Subject: [PATCH] initial commit --- .gitignore | 6 ++++++ Cargo.toml | 15 +++++++++++++++ build-windows.sh | 4 ++++ rust-toolchain.toml | 3 +++ src/main.rs | 3 +++ 5 files changed, 31 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100755 build-windows.sh create mode 100644 rust-toolchain.toml create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e890ec1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/target +Cargo.lock +.DS_Store +/.idea +*.exe +*.dll diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..29e30be --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "adventure-game" +version = "0.1.0" +edition = "2021" + +[dependencies] +ggdt = { git = "https://code.blarg.ca/gered/ggdt.git", rev = "9d02e23e9a9d6095cce729e466c1fc56534f147b" } +anyhow = "=1.0.75" +byteorder = "1.5.0" +serde = { version = "1.0.192", features = ["derive"] } +serde_json = "1.0.108" + +[package.metadata.cross.target.x86_64-pc-windows-gnu] +pre-build = ["curl -o /SDL2-devel-2.24.0-mingw.tar.gz http://www.libsdl.org/release/SDL2-devel-2.24.0-mingw.tar.gz && tar -C /usr/x86_64-w64-mingw32/include/ --strip-components=3 -xvf /SDL2-devel-2.24.0-mingw.tar.gz SDL2-2.24.0/x86_64-w64-mingw32/include/ && tar -C /usr/x86_64-w64-mingw32/lib/ --strip-components=3 -xvf /SDL2-devel-2.24.0-mingw.tar.gz SDL2-2.24.0/x86_64-w64-mingw32/lib/"] + diff --git a/build-windows.sh b/build-windows.sh new file mode 100755 index 0000000..8920bf6 --- /dev/null +++ b/build-windows.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cargo install -f cross +cross build --target x86_64-pc-windows-gnu --release diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..15808ad --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +# same as ggdt, for now +channel = "nightly-2023-11-10" diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..a30eb95 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}