Split no_stdlib
and no_std
into two features.
This commit is contained in:
13
examples/no_std.rs
Normal file
13
examples/no_std.rs
Normal 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(())
|
||||
}
|
Reference in New Issue
Block a user