Skip to main content

mln_engine/
lib.rs

1//! The map engine: the renderer and its frames (`render`), sources
2//! (`source`), tiles and their workers (`tile_store`, `worker`), layers'
3//! layouts and buckets (`layer`), the symbol layer type (`symbol`),
4//! placement, queries, and what draws them (`draw`).
5
6#[cfg(feature = "bench")]
7#[doc(hidden)]
8pub mod bench;
9mod buckets;
10pub mod camera;
11#[cfg(feature = "gpu-conformance")]
12pub mod conformance;
13mod draw;
14pub mod exec;
15pub mod geo;
16pub mod gestures;
17mod gfx;
18pub mod image;
19pub mod layer;
20// Each layer type's programs and the engine's, public for the backends'
21// tests, which compile them. Not API.
22#[doc(hidden)]
23pub mod layers;
24mod layout;
25mod line_atlas;
26pub mod map;
27#[cfg(feature = "sqlite")]
28pub mod offline;
29mod pattern_atlas;
30pub mod placement;
31pub mod query;
32mod registry;
33pub mod render;
34// Each layer type's programs and the engine's, public for the backends'
35// tests, which compile them. Not API.
36#[doc(hidden)]
37pub mod shaders;
38pub mod source;
39pub mod storage;
40// The symbol layer type's render half, with its programs, public for the
41// backends' tests, which compile them. Not API.
42#[doc(hidden)]
43pub mod symbol;
44pub mod text;
45pub mod tile;
46pub mod tile_store;
47mod util;
48pub mod worker;
49
50pub(crate) use layer::paint_property_binder::paint_property_binders;
51pub use layers::custom::{
52    Custom, CustomHost, CustomLayerFrame, CustomLayerHost, CustomLayerPrerenderParameters, CustomLayerRenderParameters,
53};
54pub use registry::{Registry, RegistryBuilder, register_builtins};
55pub use render::events::{
56    FontStack, GlyphRange, RenderMode, RendererEvent, RendererEvents, RenderingStats, TileOperation,
57};
58pub use render::renderer::{DrawnFrame, RenderTimings, Renderer, UpdatedFrame};
59pub use render::update_parameters::UpdateParameters;
60pub use render::update_slot::{Update, UpdateReader, UpdateSlot};
61
62/// The `log` targets of this crate's records. Each names the event that
63/// `mln_c` reports the record under (`mln_c::logging`).
64mod log_target {
65    pub(crate) const GENERAL: &str = "mln_engine::general";
66    #[cfg_attr(not(feature = "sqlite"), expect(dead_code, reason = "only the database logs"))]
67    pub(crate) const DATABASE: &str = "mln_engine::database";
68    pub(crate) const HTTP_REQUEST: &str = "mln_engine::http_request";
69    pub(crate) const IMAGE: &str = "mln_engine::image";
70    pub(crate) const PARSE_TILE: &str = "mln_engine::parse_tile";
71    pub(crate) const SPRITE: &str = "mln_engine::sprite";
72    pub(crate) const SETUP: &str = "mln_engine::setup";
73    pub(crate) const PARSE_STYLE: &str = "mln_engine::parse_style";
74    pub(crate) const RENDER: &str = "mln_engine::render";
75    pub(crate) const STYLE: &str = "mln_engine::style";
76    pub(crate) const GLYPH: &str = "mln_engine::glyph";
77    pub(crate) const TIMING: &str = "mln_engine::timing";
78}
79
80#[cfg(test)]
81mod tests;