From 158288a7a9924b7abfadb5ba66aa164011f72067 Mon Sep 17 00:00:00 2001 From: Zicklag Date: Fri, 30 Oct 2020 09:58:04 -0500 Subject: [PATCH] Move Scripting Binary Target to the Runtime --- Cargo.lock | 3 +++ arsenal_runtime/Cargo.toml | 1 + .../examples/asteroids/python.yaml | 0 arsenal_runtime/src/main.rs | 12 +++++++++++- arsenal_scripting/src/bindings/bevy.rs | 2 +- arsenal_scripting/src/main.rs | 13 ------------- lib/bevy | 2 +- 7 files changed, 17 insertions(+), 16 deletions(-) rename {arsenal_scripting => arsenal_runtime}/examples/asteroids/python.yaml (100%) delete mode 100644 arsenal_scripting/src/main.rs diff --git a/Cargo.lock b/Cargo.lock index e675625..41aab72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,6 +130,7 @@ dependencies = [ name = "arsenal_runtime" version = "0.1.0" dependencies = [ + "arsenal_scripting", "bevy", ] @@ -252,6 +253,7 @@ dependencies = [ "bevy_derive", "bevy_ecs", "bevy_math", + "bevy_utils", "instant", "log", "serde", @@ -274,6 +276,7 @@ dependencies = [ "downcast-rs", "js-sys", "log", + "ndk-glue", "notify", "parking_lot 0.11.0", "rand", diff --git a/arsenal_runtime/Cargo.toml b/arsenal_runtime/Cargo.toml index d0ea163..aa293b4 100644 --- a/arsenal_runtime/Cargo.toml +++ b/arsenal_runtime/Cargo.toml @@ -7,3 +7,4 @@ edition = "2018" [dependencies] bevy = { path = "../lib/bevy" } +arsenal_scripting = { path = "../arsenal_scripting" } \ No newline at end of file diff --git a/arsenal_scripting/examples/asteroids/python.yaml b/arsenal_runtime/examples/asteroids/python.yaml similarity index 100% rename from arsenal_scripting/examples/asteroids/python.yaml rename to arsenal_runtime/examples/asteroids/python.yaml diff --git a/arsenal_runtime/src/main.rs b/arsenal_runtime/src/main.rs index b6236af..890a28c 100644 --- a/arsenal_runtime/src/main.rs +++ b/arsenal_runtime/src/main.rs @@ -1,3 +1,13 @@ +use bevy::prelude::*; + fn main() { - todo!("Migrate for Bevy"); + App::build() + .add_default_plugins() + .add_plugin(arsenal_scripting::ScriptingPlugin::new( + &std::env::args() + .skip(1) + .next() + .unwrap_or(".".to_string()), + )) + .run(); } diff --git a/arsenal_scripting/src/bindings/bevy.rs b/arsenal_scripting/src/bindings/bevy.rs index 246fc16..942ef4b 100644 --- a/arsenal_scripting/src/bindings/bevy.rs +++ b/arsenal_scripting/src/bindings/bevy.rs @@ -1,3 +1,3 @@ //! Bindings to Bevy's core systems and components -pub mod transform; +// pub mod transform; diff --git a/arsenal_scripting/src/main.rs b/arsenal_scripting/src/main.rs deleted file mode 100644 index 890a28c..0000000 --- a/arsenal_scripting/src/main.rs +++ /dev/null @@ -1,13 +0,0 @@ -use bevy::prelude::*; - -fn main() { - App::build() - .add_default_plugins() - .add_plugin(arsenal_scripting::ScriptingPlugin::new( - &std::env::args() - .skip(1) - .next() - .unwrap_or(".".to_string()), - )) - .run(); -} diff --git a/lib/bevy b/lib/bevy index 7890648..85b6631 160000 --- a/lib/bevy +++ b/lib/bevy @@ -1 +1 @@ -Subproject commit 7890648628490391557603e19099587712d5b684 +Subproject commit 85b6631951c7a8b95098465d5c2bc6dd0c365492