diff --git a/Cargo.lock b/Cargo.lock index b084fa9e4b12cfd4b2fc6d40cf3350029df31ddd..db809a1eb9cd825a9105e14cf654d0e57275f172 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -502,11 +502,6 @@ dependencies = [ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rhai" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "ring" version = "0.11.0" @@ -646,7 +641,6 @@ dependencies = [ "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "interpolate_idents 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "rhai 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "rocket 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "rocket_codegen 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "rocket_contrib 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -900,7 +894,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum regex 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "aec3f58d903a7d2a9dc2bf0e41a746f4530e0cab6b615494e058f67a3ef947fb" "checksum regex-syntax 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bd90079345f4a4c3409214734ae220fd773c6f2e8a543d07370c6c1c369cfbfb" "checksum remove_dir_all 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24" -"checksum rhai 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7d8dd1945cb3f6c777074814bb2856a8fce36af4d6aa6f479c6a3029869e865b" "checksum ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2a6dc7fc06a05e6de183c5b97058582e9da2de0c136eafe49609769c507724" "checksum rocket 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c000cf7233aa997a19a43f77ddc80db11b58cdbbc12e2c1385bd62cbbace3964" "checksum rocket_codegen 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "645dd494d1340a4c16ba8decc4bb94d3e687a7e6b57552e2341dbf436b75ffaa" diff --git a/Cargo.toml b/Cargo.toml index f92735d5f80859c70b91584235cf589435caeec0..023b5c5210a540846253da2a5d26ec475f23d856 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,6 @@ docopt = "0.8" formdata = "0.12.2" hyper = "0.10" rand = "0.3" -rhai = "0.7" serde_yaml = "0.7.3" [dev-dependencies] diff --git a/src/lib.rs b/src/lib.rs index d384507b3f4e2159bf5c86a41948d4061d515628..124200ca7cc1a953eb2059ae4c1d87801ff4437c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,6 @@ extern crate serde; #[macro_use] extern crate serde_derive; extern crate serde_yaml; -extern crate rhai; extern crate rocket; extern crate rocket_contrib; extern crate formdata; diff --git a/src/main.rs b/src/main.rs index 832dc7725849cf292ae07853e1bc77283a2d9158..1a211465e60ab241ebbab2df0024337961a62798 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,6 @@ extern crate alloc_system; extern crate rocket; extern crate docopt; extern crate swerve; -extern crate rhai; use std::process; use docopt::Docopt; diff --git a/src/scripting/run_script.rs b/src/scripting/run_script.rs index 96d9f57184f7b733964a8d9ffdf6ae96984469cd..0470e4466ec4550e7feacfcd198977bda7ca2d7b 100644 --- a/src/scripting/run_script.rs +++ b/src/scripting/run_script.rs @@ -1,5 +1,3 @@ -//use dyon::{Runtime,Module,load_str,Variable,Dfn,Type}; -//use dyon::ast::convert; use std::convert::AsRef; use std::path::Path; use std::fs::File; @@ -7,40 +5,10 @@ use std::sync::Arc; use std::io::Read; use std::collections::HashMap; -const SCRIPT_FOOTER: &'static str = " -fn main() { - println(\"Don't directly execute the module, nimrod\") -}"; - - pub fn run_script<P: AsRef<Path>>(path: P) -> Option<String> { -// let mut resolution: Option<Variable> = None; -// dyon_fn!(fn resolve(val: Variable) { -// resolution = Some(val); // if let Ok(val) = runtime.pop() { Some(val) } else { None }; -// }); -// -// println!("{:?}", resolution); - let mut file = File::open(&path).unwrap(); let mut buf = String::new(); file.read_to_string(&mut buf); - buf.push_str(SCRIPT_FOOTER); -// let mut script_module = Module::new(); -// -// { -// load_str(path.as_ref().to_str().unwrap(), Arc::new(buf), &mut script_module); -// } Some(buf) -// script_module.add(Arc::new("resolve".into()), resolve, Dfn { -// lts: vec![], -// tys: vec![Type::Object], -// ret: Type::Void, -// }); -// -// let mut hashmap: HashMap<Arc<String>, Variable> = HashMap::new(); - -// runtime.call_str("handle", &[Variable::f64(123f64)], &Arc::new(script_module)); - -// None } \ No newline at end of file