Fix no-std build.
This commit is contained in:
parent
6369fa5c65
commit
42b6796200
@ -242,11 +242,6 @@ impl Engine {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#[cfg(any(feature = "no_std", target_family = "wasm"))]
|
|
||||||
{
|
|
||||||
engine.print = None;
|
|
||||||
engine.debug = None;
|
|
||||||
}
|
|
||||||
|
|
||||||
engine.register_global_module(StandardPackage::new().as_shared_module());
|
engine.register_global_module(StandardPackage::new().as_shared_module());
|
||||||
|
|
||||||
|
@ -5,9 +5,6 @@ use crate::{Dynamic, RhaiResultOf, ERR, INT};
|
|||||||
#[cfg(feature = "no_std")]
|
#[cfg(feature = "no_std")]
|
||||||
use std::prelude::v1::*;
|
use std::prelude::v1::*;
|
||||||
|
|
||||||
#[cfg(not(feature = "no_float"))]
|
|
||||||
use crate::FLOAT;
|
|
||||||
|
|
||||||
def_package! {
|
def_package! {
|
||||||
/// Package of core language features.
|
/// Package of core language features.
|
||||||
pub LanguageCorePackage(lib) {
|
pub LanguageCorePackage(lib) {
|
||||||
@ -84,7 +81,7 @@ mod core_functions {
|
|||||||
#[cfg(not(feature = "no_float"))]
|
#[cfg(not(feature = "no_float"))]
|
||||||
#[cfg(not(feature = "no_std"))]
|
#[cfg(not(feature = "no_std"))]
|
||||||
#[rhai_fn(name = "sleep")]
|
#[rhai_fn(name = "sleep")]
|
||||||
pub fn sleep_float(seconds: FLOAT) {
|
pub fn sleep_float(seconds: crate::FLOAT) {
|
||||||
if seconds <= 0.0 {
|
if seconds <= 0.0 {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user