diff --git a/doc/src/start/examples/rust.md b/doc/src/start/examples/rust.md index b7b6a5a5..3784778d 100644 --- a/doc/src/start/examples/rust.md +++ b/doc/src/start/examples/rust.md @@ -10,7 +10,6 @@ A number of examples can be found in the `examples` folder: | [`arrays_and_structs`](https://github.com/jonathandturner/rhai/tree/master/examples/arrays_and_structs.rs) | Shows how to register a custom Rust type and using [arrays] on it. | | [`custom_types_and_methods`](https://github.com/jonathandturner/rhai/tree/master/examples/custom_types_and_methods.rs) | Shows how to register a custom Rust type and methods for it. | | [`hello`](https://github.com/jonathandturner/rhai/tree/master/examples/hello.rs) | Simple example that evaluates an expression and prints the result. | -| [`no_std`](https://github.com/jonathandturner/rhai/tree/master/examples/no_std.rs) | Example to test out `no-std` builds.
The [`no_std`] feature is required to build in `no-std`. | | [`reuse_scope`](https://github.com/jonathandturner/rhai/tree/master/examples/reuse_scope.rs) | Evaluates two pieces of code in separate runs, but using a common [`Scope`]. | | [`rhai_runner`](https://github.com/jonathandturner/rhai/tree/master/examples/rhai_runner.rs) | Runs each filename passed to it as a Rhai script. | | [`serde`](https://github.com/jonathandturner/rhai/tree/master/examples/serde.rs) | Example to serialize and deserialize Rust types with [`serde`](https://crates.io/crates/serde).
The [`serde`] feature is required to run. | diff --git a/examples/no_std.rs b/examples/no_std.rs deleted file mode 100644 index a6902f72..00000000 --- a/examples/no_std.rs +++ /dev/null @@ -1,23 +0,0 @@ -#![cfg_attr(feature = "no_std", no_std)] - -use rhai::{Engine, EvalAltResult, INT}; - -#[cfg(feature = "no_std")] -extern crate alloc; - -#[cfg(feature = "no_std")] -use alloc::boxed::Box; - -fn main() -> Result<(), Box> { - let engine = Engine::new(); - - let result = engine.eval::("40 + 2")?; - - #[cfg(not(feature = "no_std"))] - println!("Answer: {}", result); - - #[cfg(feature = "no_std")] - assert_eq!(result, 42); - - Ok(()) -}