aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar David <david003@gmx.net>2022-07-15 17:33:27 +0200
committerLibravatar David <david003@gmx.net>2022-07-15 17:33:27 +0200
commita46a91e183a272e012354a6f0263299448205acb (patch)
treeb0700f933db7149c1b95afed2e04d53772f7e2dc /rust/src/lib.rs
download2022-a46a91e183a272e012354a6f0263299448205acb.tar.gz
2022-a46a91e183a272e012354a6f0263299448205acb.tar.bz2
2022-a46a91e183a272e012354a6f0263299448205acb.zip
initial commit: template
Diffstat (limited to 'rust/src/lib.rs')
-rw-r--r--rust/src/lib.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
new file mode 100644
index 0000000..1cc766a
--- /dev/null
+++ b/rust/src/lib.rs
@@ -0,0 +1,13 @@
+mod game;
+mod spinning_cube;
+
+use gdnative::prelude::{godot_init, InitHandle};
+
+// Function that registers all exposed classes to Godot
+fn init(handle: InitHandle) {
+ handle.add_class::<game::Game>();
+ handle.add_class::<spinning_cube::SpinningCube>();
+}
+
+// macros that create the entry-points of the dynamic library.
+godot_init!(init);