Skip to main content

mln_plugin/
lib.rs

1//! Safe, host-agnostic Rust Plugin SDK for MapLibre Native (`mln-rs`).
2//!
3//! This crate has zero dependencies on `mln_engine`, `mln_style`, `mln_gfx`,
4//! or `mln_c`. A plugin crate written against `mln_plugin` registers directly
5//! into `mln_engine::RegistryBuilder` (native and Wasm) or over the C Plugin
6//! ABI via `mln_plugin_c`.
7
8#![forbid(unsafe_code)]
9#![warn(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
10#![cfg_attr(not(test), warn(clippy::unreachable, clippy::print_stdout, clippy::print_stderr))]
11
12#[doc(hidden)]
13pub mod backend;
14pub mod error;
15pub mod layer;
16pub mod program;
17pub mod shaders;
18pub mod source;
19pub mod types;
20
21pub use error::{Error, Result, Status};
22pub use layer::{
23    AfterGpu, AfterGpuRef, Composite, DrawGroup, Draws, EvaluateCx, EvaluatedLayer, Evaluation, Frame, FrameQueryCx,
24    GroundHeights, Hit, HitCx, HitInfo, Host, IndexBuffer, LayerBlend, LayerDesc, LayerInstance, LayerPlugin,
25    LendParameters, LoadedFeatureInfo, Mesh, MeshDesc, PaintAttributes, PrepareCx, PropertyDefault, PropertyDesc,
26    PropertyScope, RasterTileInfo, Resources, Target, Texture, Tile, TileBuildCx, TileCx, TileGeometry,
27    TileGeometryBuilder, UpdateCx, VertexAttribute, VertexBinding, VertexBuffer, View,
28};
29pub use program::{
30    AttributeDesc, AttributeFormat, BlockDesc, BlockMember, BlockMemberType, BufferDesc, BufferKind,
31    GlslEsAttributePrecision, GlslEsMemberPrecision, GlslEsSource, GlslPrecision, GlslSource, MslSource, Program,
32    ProgramDesc, ProjectionMode, ShaderStages, TextureDesc, TextureRead, Variants, WgslSource,
33};
34pub use source::{
35    GeometrySourceOptions, RasterDemSourceOptions, SourceKindOptions, SourcePlugin, SourceTypeOptions, TileCancelInfo,
36    TileFetchInfo, TileRequest, TileResponse,
37};
38pub use types::{
39    Alignment, CanonicalTileId, CollisionShape, CollisionShapeKind, Color, ColorMode, CullFaceMode, CullFaceSide,
40    CullFaceWinding, D3d12Encoder, D3d12Pass, DepthMode, DrawMode, DrawOptions, DrawRange, FeatureType, FrameInfo,
41    GpuEnd, LatLng, LatLngBounds, LayerInput, LendAt, LendEncoder, LendFrame, LendPass, LendStage, MapMode,
42    MetalEncoder, MetalPass, OpenGlEncoder, OpenGlPass, PointI16, ProjectedPoint, ProjectionUbo, ProjectionVariant,
43    RasterEncoding, RenderBackend, RenderPasses, SamplerState, ScreenPoint, TerrainMode, TextureChannelType,
44    TextureFilter, TextureFormat, TextureWrap, TileChanges, TileId, TileNecessity, TileOrder, TileScheme, TileTimes,
45    TileTransform, Vec2, ViewInfo, VulkanContextDescriptor, VulkanEncoder, VulkanPass, WebGpuEncoder,
46};