diff --git a/fidget/src/error.rs b/fidget/src/error.rs index 7bb5c00a..d09492d6 100644 --- a/fidget/src/error.rs +++ b/fidget/src/error.rs @@ -97,6 +97,7 @@ pub enum Error { DynasmError(#[from] dynasmrt::DynasmError), } +#[cfg(feature = "rhai")] impl From> for Error { fn from(e: Box) -> Self { Error::RhaiEvalError(*e) diff --git a/fidget/src/lib.rs b/fidget/src/lib.rs index 3a273513..841a1ca9 100644 --- a/fidget/src/lib.rs +++ b/fidget/src/lib.rs @@ -273,8 +273,10 @@ mod error; pub use error::Error; pub mod mesh; pub mod render; -pub mod rhai; pub mod solver; +#[cfg(feature = "rhai")] +pub mod rhai; + #[cfg(all(feature = "jit", not(target_arch = "wasm32")))] pub mod jit;