From 6a027c0a242c0ec68d13caec421979599e87b391 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Fri, 19 May 2023 12:16:47 -0700 Subject: [PATCH] Configure as library, add demo --- .gitignore | 1 + Cargo.toml | 3 ++- demo/.gitignore | 1 + demo/Cargo.toml | 9 +++++++++ demo/src/main.rs | 5 +++++ src/{main.rs => lib.rs} | 2 +- 6 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 demo/.gitignore create mode 100644 demo/Cargo.toml create mode 100644 demo/src/main.rs rename src/{main.rs => lib.rs} (66%) diff --git a/.gitignore b/.gitignore index ea8c4bf..96ef6c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +Cargo.lock diff --git a/Cargo.toml b/Cargo.toml index d31d346..1bcc56a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [package] -name = "" +name = "renrs" +description = "A Rust-based visual novel backend compatible with Ren'Py .rpy script files." version = "0.1.0" edition = "2021" diff --git a/demo/.gitignore b/demo/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/demo/.gitignore @@ -0,0 +1 @@ +/target diff --git a/demo/Cargo.toml b/demo/Cargo.toml new file mode 100644 index 0000000..d2265c7 --- /dev/null +++ b/demo/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "renrs-demo" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +renrs = { path = ".." } diff --git a/demo/src/main.rs b/demo/src/main.rs new file mode 100644 index 0000000..265c3f7 --- /dev/null +++ b/demo/src/main.rs @@ -0,0 +1,5 @@ +use renrs; + +fn main() { + renrs::hello(); +} diff --git a/src/main.rs b/src/lib.rs similarity index 66% rename from src/main.rs rename to src/lib.rs index e7a11a9..fda8464 100644 --- a/src/main.rs +++ b/src/lib.rs @@ -1,3 +1,3 @@ -fn main() { +pub fn hello() { println!("Hello, world!"); }