# The Bevy-free half of the map pipeline: MVT decode and rasterisation, road # classification, tree scattering, and the routing graph. # # It is a separate crate for a measured reason, not tidiness. These ~6,900 lines # carry ~70 of the client's tests and import no Bevy at all, but as part of the # `cartopolis` binary they were recompiled and relinked behind it — and every # profile switch or feature flip that discarded the incremental cache paid the # client's full 52 s codegen to run them. See docs/notes/client-build-cost.md. # # The rule that keeps it that way: nothing here may depend on `bevy`. If a type # needs an ECS `Component`, it belongs in `cartopolis`, and the pure part it wraps # belongs here — that is exactly how `scatter` and `vegetation` were split. [package] name = "cartopolis_geo" version.workspace = true edition.workspace = true # The workspace declares `MIT OR Apache-2.0`; a crate only inherits it by asking. license.workspace = true [lib] name = "cartopolis_geo" path = "src/lib.rs" # Same reason as cartopolis's: rustdoc does not receive .cargo/config.toml's # `rustflags`, so a doc-test would build without target-cpu=x86-64-v3. doctest = false [features] # Expose `perf` — the counting allocator and the `Cost` region measurement — # outside this crate's own test binary. Enabled by `cartopolis/perf`, which # installs the allocator as the client binary's `#[global_allocator]`. Off by # default: armed or not, a counting allocator is a read and a branch on every # allocation in the process, and a shipped build must not pay it. perf = [] [dependencies] earcutr.workspace = true geo-types.workspace = true i_overlay.workspace = true image.workspace = true # For AHN's float GeoTIFF (`ahn`), which is the same decoder the client used when # this lived there. tiff.workspace = true mvt-reader.workspace = true # The per-cell file formats atlas writes and the client reads (`formats`). Both # are already in the build through `cartopolis_core`. serde.workspace = true serde_json.workspace = true tiny-skia.workspace = true tracing.workspace = true cartopolis_core = { path = "../core" } [dev-dependencies] # Candidate replacement rasteriser (linebender's sparse-strips CPU renderer), # here only for the ignored `bench_vello_cpu` A/B against tiny-skia — see # docs/notes/tile-raster-cost.md. Test-only: nothing shipped links it. vello_cpu = "0.2" [lints] workspace = true