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