Added no_std support

This commit is contained in:
Trangar
2020-03-17 19:26:11 +01:00
parent bffa3ed636
commit c8a9df0a0a
16 changed files with 140 additions and 24 deletions

View File

@@ -16,7 +16,7 @@
//!
//! And the Rust part:
//!
//! ```rust,no_run
//! ```rust,ignore
//! use rhai::{Engine, EvalAltResult, RegisterFn};
//!
//! fn main() -> Result<(), EvalAltResult>
@@ -37,8 +37,12 @@
//!
//! [Check out the README on GitHub for more information!](https://github.com/jonathandturner/rhai)
#![cfg_attr(feature = "no_stdlib", no_std)]
#![allow(non_snake_case)]
#[cfg(feature = "no_stdlib")]
extern crate alloc;
// needs to be here, because order matters for macros
macro_rules! debug_println {
() => (
@@ -61,6 +65,8 @@ macro_rules! debug_println {
);
}
#[macro_use]
mod stdlib;
mod any;
mod api;
mod builtin;