From 1aad8a144fb5232a311fe69eae6f29ae834ca8f9 Mon Sep 17 00:00:00 2001 From: Matt Keeter Date: Mon, 18 Nov 2024 09:33:18 -0500 Subject: [PATCH] Fix feature = 'rhai' (#193) --- fidget/src/error.rs | 1 + fidget/src/lib.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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;