mln-rs-engine 0.0.22

Part of mln-rs, a MapLibre map renderer written in Rust. Depend on mln-rs instead.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Direct in-process host adapter for [`mln_plugin`] layer plugins.
//!
//! Registers any [`mln_plugin::LayerPlugin`] directly on
//! [`crate::RegistryBuilder::add_layer_plugin`] 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 layer;
mod program;

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)
}