From 1e610991bee9fb13d0905549d67ea4062f03e51d Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Fri, 8 Mar 2024 11:58:13 +0000 Subject: [PATCH] Move api to scripting module --- src/main.rs | 4 ++-- src/{ => scripting}/api.rs | 0 src/scripting/mod.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) rename src/{ => scripting}/api.rs (100%) create mode 100644 src/scripting/mod.rs diff --git a/src/main.rs b/src/main.rs index 0e35905..0eaa5bf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ -mod api; mod gfx; mod input; +mod scripting; use std::sync::Arc; @@ -35,7 +35,7 @@ pub fn run(event_loop: EventLoop<()>, mut context: Context) -> Result<()> { // !HACK: Temporrary scripting engine setup let source_dir = format!("{}/scripts", env!("CARGO_MANIFEST_DIR")); let mut rune_context = rune::Context::with_default_modules()?; - rune_context.install(api::log::module()?)?; + rune_context.install(scripting::api::log::module()?)?; let runtime = Arc::new(rune_context.runtime()?); let mut sources = Sources::new(); diff --git a/src/api.rs b/src/scripting/api.rs similarity index 100% rename from src/api.rs rename to src/scripting/api.rs diff --git a/src/scripting/mod.rs b/src/scripting/mod.rs new file mode 100644 index 0000000..e5fdf85 --- /dev/null +++ b/src/scripting/mod.rs @@ -0,0 +1 @@ +pub mod api;