1#![warn(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
29#![cfg_attr(not(test), warn(clippy::unreachable, clippy::print_stdout, clippy::print_stderr))]
30
31#[cfg(not(any(feature = "webgpu", has_metal, has_vulkan, has_d3d12, feature = "gl")))]
32compile_error!(
33 "mln_runtime renders with at least one backend: enable `webgpu`, `metal`, `vulkan`, `gl` or, on Windows, `d3d12`"
34);
35
36#[cfg(all(feature = "bench", not(target_family = "wasm")))]
37#[doc(hidden)]
38pub mod bench;
39mod camera;
40mod completion;
41mod event;
42mod feature_state;
43pub mod frame_pacer;
44mod gestures;
45mod map;
46#[cfg(has_cache_database)]
47mod offline;
48#[cfg(not(has_cache_database))]
49#[path = "offline_none.rs"]
50mod offline;
51pub mod registry;
52mod render;
53mod resources;
54mod runtime;
55mod style;
56#[cfg(all(feature = "testing", not(target_family = "wasm")))]
57#[doc(hidden)]
58pub mod testing;
59#[cfg(target_family = "wasm")]
60pub mod web;
61
62mod log_target {
65 pub(crate) const GENERAL: &str = "mln_runtime::general";
66 pub(crate) const CRASH: &str = "mln_runtime::crash";
67 pub(crate) const RENDER: &str = "mln_runtime::render";
68 pub(crate) const HTTP_REQUEST: &str = "mln_runtime::http_request";
69 #[cfg(target_family = "wasm")]
70 pub(crate) const GLYPH: &str = "mln_runtime::glyph";
71}
72
73pub use camera::{CameraFitArea, CameraFitUpdate, TileOptions, ViewportOptions};
74pub use completion::Completion;
75pub use event::{EventHandler, EventMask, EventSource, EventType, RuntimeEvent, RuntimeEventKind};
76pub use feature_state::{FeatureState, FeatureStateSelector};
77pub use map::{Applied, CameraQuery, CommandGroup, Map, MapId, MapOptions};
78pub use mln_engine::camera::{CameraFitOptions, ClipDepthRange, FrameProjection, LogicalExtent};
79pub use mln_engine::map::MapSnapshot;
80pub use mln_engine::query::{RenderedQueryOptions, SourceQueryOptions};
81pub use mln_style::error::{Error, ErrorKind};
82pub use offline::Offline;
83pub use render::{
84 AcquiredFrame, Adapter, AttachOptions, BackendRef, BackendType, BorrowedRing, CanvasFormat, ConsumerSync,
85 DemandMode, DepthStencilFormat, DepthStencilFormats, Device, DeviceOptions, DmaBufFormat, DmaBufPlane, Driver,
86 DriverWork, ExportKind, ExportKinds, ExportedImage, ExportedRing, FrameDemand, FrameDepth, FrameDisposition,
87 FrameResult, FrameTexture, FrameTextureKind, FrameView, GlApi, GpuSync, LocalTarget, NativeTexture, RenderSession,
88 RenderSessionCapabilities, RenderSessionSnapshot, RenderSessionState, RenderTarget, RenderedQueryGeometry, Surface,
89 SurfaceOverlay, SurfaceType, SyncKind, SyncKinds, Wake,
90};
91pub use resources::{CacheDatabaseOperation, ResourceProvider, ResourceRequest, is_managed_http_header};
92pub use runtime::{Runtime, RuntimeOptions};
93pub use style::{GeoJsonSourceOptions, LayerInfo, SourceInfo, SourceTiles};