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;
9pub mod camera;
10pub mod draw;
11pub mod exec;
12pub mod geo;
13pub mod gestures;
14pub mod image;
15pub mod layer;
16// Each layer type's programs and the engine's, public for the backends'
17// tests, which compile them. Not API.
18#[doc(hidden)]
19pub mod map;
20mod map_mode;
21#[cfg(feature = "sqlite")]
22pub mod offline;
23pub mod placement;
24pub mod query;
25mod registry;
26pub(crate) mod render;
27// Each layer type's programs and the engine's, public for the backends'
28// tests, which compile them. Not API.
29#[doc(hidden)]
30pub mod shaders;
31pub mod source;
32pub mod storage;
33pub mod text;
34pub mod tile;
35pub mod tile_store;
36pub mod worker;
37
38pub use map_mode::MapMode;
39pub use registry::{Registry, RegistryBuilder, register_builtin_projections};
40pub use render::events::{
41    FontStack, GlyphRange, RenderMode, RendererEvent, RendererEvents, RenderingStats, TileOperation,
42};
43pub use render::renderer::{DrawnFrame, RenderTimings, Renderer, UpdatedFrame};
44pub use render::update_parameters::UpdateParameters;
45pub use render::update_slot::{Update, UpdateReader, UpdateSlot};
46
47/// The `tracing` targets of this crate's events. Each names the event that
48/// `mln_c` reports it under (`mln_c::logging`).
49/// What the expansions of the crate's macros and of `#[derive(Wire)]` name,
50/// so that a crate that invokes them needn't depend on it.
51#[doc(hidden)]
52pub mod __private {
53    pub use mln_gfx;
54    pub use mln_style;
55    pub use mln_wire;
56}
57
58mod log_target {
59    pub(crate) const GENERAL: &str = "mln_engine::general";
60    #[cfg_attr(not(feature = "sqlite"), expect(dead_code, reason = "only the database logs"))]
61    pub(crate) const DATABASE: &str = "mln_engine::database";
62    pub(crate) const HTTP_REQUEST: &str = "mln_engine::http_request";
63    pub(crate) const PARSE_TILE: &str = "mln_engine::parse_tile";
64    pub(crate) const SPRITE: &str = "mln_engine::sprite";
65    pub(crate) const SETUP: &str = "mln_engine::setup";
66    pub(crate) const PARSE_STYLE: &str = "mln_engine::parse_style";
67    pub(crate) const RENDER: &str = "mln_engine::render";
68    pub(crate) const STYLE: &str = "mln_engine::style";
69    pub(crate) const GLYPH: &str = "mln_engine::glyph";
70    pub(crate) const TIMING: &str = "mln_engine::timing";
71}
72
73// The tests' copy of mln_builtins' source types names this crate as its
74// dependents do.
75#[cfg(test)]
76extern crate self as mln_engine;
77
78#[cfg(test)]
79mod tests;