diff --git a/Cargo.lock b/Cargo.lock index 6410120..e4a8cf8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,3 +5,10 @@ version = 3 [[package]] name = "inputhook" version = "0.1.0" + +[[package]] +name = "inputhook-test" +version = "0.1.0" +dependencies = [ + "inputhook", +] diff --git a/Cargo.toml b/Cargo.toml index 005bba2..2d04412 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,2 @@ -[package] -name = "inputhook" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] +[workspace] +members = ["inputhook", "inputhook-test"] diff --git a/inputhook-test/Cargo.toml b/inputhook-test/Cargo.toml new file mode 100644 index 0000000..ed1f63a --- /dev/null +++ b/inputhook-test/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "inputhook-test" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +inputhook = { path = "../inputhook" } diff --git a/inputhook-test/src/main.rs b/inputhook-test/src/main.rs new file mode 100644 index 0000000..4356d7d --- /dev/null +++ b/inputhook-test/src/main.rs @@ -0,0 +1,5 @@ +extern crate inputhook; + +fn main() { + println!("{}", inputhook::test()); +} diff --git a/inputhook/Cargo.toml b/inputhook/Cargo.toml new file mode 100644 index 0000000..005bba2 --- /dev/null +++ b/inputhook/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "inputhook" +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/inputhook/src/lib.rs b/inputhook/src/lib.rs new file mode 100644 index 0000000..74fab6d --- /dev/null +++ b/inputhook/src/lib.rs @@ -0,0 +1,3 @@ +pub fn test() -> &'static str { + "Hello, world!" +} diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -}