diff --git a/no_std/no_std_test/Cargo.toml b/no_std/no_std_test/Cargo.toml index f22daed0..4b151047 100644 --- a/no_std/no_std_test/Cargo.toml +++ b/no_std/no_std_test/Cargo.toml @@ -8,7 +8,7 @@ homepage = "https://github.com/jonathandturner/rhai/tree/master/no_std/no_std_te repository = "https://github.com/jonathandturner/rhai" [dependencies] -rhai = { path = "../../", features = [ "no_std" ], default_features = false } +rhai = { path = "../../", features = [ "no_std", "unchecked", "only_i32", "no_module" ], default_features = false } wee_alloc = { version = "0.4.5", default_features = false } [profile.dev] diff --git a/no_std/no_std_test/src/main.rs b/no_std/no_std_test/src/main.rs index 88ba8b02..829802f8 100644 --- a/no_std/no_std_test/src/main.rs +++ b/no_std/no_std_test/src/main.rs @@ -1,4 +1,4 @@ -//! This is a `no-std` application for the that evaluates +//! This is a bare-bones `no-std` application that evaluates //! a simple expression and uses the result as the return value. #![no_std] @@ -14,10 +14,12 @@ use rhai::{Engine, INT}; #[start] fn main(_argc: isize, _argv: *const *const u8) -> isize { - let engine = Engine::new(); + // Notice that this is a _raw_ engine. + // To do anything useful, load a few packages from `rhai::packages`. + let engine = Engine::new_raw(); // Evaluate a simple expression: 40 + 2 - engine.eval::("40 + 2").unwrap() as isize + engine.eval_expression::("40 + 2").unwrap() as isize } #[alloc_error_handler]