mln-rs-engine 0.0.23

Part of mln-rs, a MapLibre map renderer written in Rust. Depend on mln-rs instead.
Documentation
//! Direct in-process host adapter for [`mln_plugin`] plugins.
//!
//! Registers [`mln_plugin::LayerPlugin`] and [`mln_plugin::ExpressionPlugin`]
//! directly on [`crate::RegistryBuilder`] without crossing the C Plugin ABI,
//! enabling the same plugin crate to run natively, on Wasm, and over the C ABI
//! (`mln_plugin_c`).

mod expression;
mod layer;
mod program;

pub(crate) use expression::register_expression_plugin;
pub use layer::build_layer_type;

/// Borrows an engine [`View`](crate::camera::View) as an [`mln_plugin::View`]
/// for the duration of `f` (useful in plugin unit tests).
pub fn with_view<R>(view: &crate::camera::View, f: impl FnOnce(mln_plugin::View<'_>) -> R) -> R {
    layer::with_view(view, f)
}