diff --git a/src/lib.rs b/src/lib.rs index a8a783d1..4939e119 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -70,10 +70,7 @@ mod module; mod optimize; pub mod packages; mod parser; -#[cfg(not(feature = "no_module"))] pub mod plugin; -#[cfg(feature = "no_module")] -mod plugin; mod result; mod scope; #[cfg(feature = "serde")] diff --git a/src/plugin.rs b/src/plugin.rs index c9716ea3..23e7f03e 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -14,6 +14,9 @@ pub use crate::{ RegisterResultFn, }; +#[cfg(features = "no_module")] +pub use rhai_codegen::{export_fn, register_exported_fn}; +#[cfg(not(features = "no_module"))] pub use rhai_codegen::*; #[cfg(features = "sync")]