Split no_stdlib and no_std into two features.

This commit is contained in:
Stephen Chung
2020-03-18 12:04:26 +08:00
11 changed files with 49 additions and 30 deletions

13
examples/no_std.rs Normal file
View File

@@ -0,0 +1,13 @@
#![cfg_attr(feature = "no_std", no_std)]
use rhai::{Engine, EvalAltResult};
fn main() -> Result<(), EvalAltResult> {
let mut engine = Engine::new();
let result = engine.eval::<i64>("40 + 2")?;
assert_eq!(result, 42);
Ok(())
}