Move api to scripting module

This commit is contained in:
Jarrod Doyle 2024-03-08 11:58:13 +00:00
parent 58064c4fc1
commit 1e610991be
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
3 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
mod api;
mod gfx; mod gfx;
mod input; mod input;
mod scripting;
use std::sync::Arc; use std::sync::Arc;
@ -35,7 +35,7 @@ pub fn run(event_loop: EventLoop<()>, mut context: Context) -> Result<()> {
// !HACK: Temporrary scripting engine setup // !HACK: Temporrary scripting engine setup
let source_dir = format!("{}/scripts", env!("CARGO_MANIFEST_DIR")); let source_dir = format!("{}/scripts", env!("CARGO_MANIFEST_DIR"));
let mut rune_context = rune::Context::with_default_modules()?; 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 runtime = Arc::new(rune_context.runtime()?);
let mut sources = Sources::new(); let mut sources = Sources::new();

1
src/scripting/mod.rs Normal file
View File

@ -0,0 +1 @@
pub mod api;