Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / scripts / maps / tile_build / Cargo.toml
Cargo.toml69 lines · 2.8 KiBRaw
| 1 | # Host-side vector-tile build tools for the Maps basemap. |
| 2 | # |
| 3 | # Replaces `tippecanoe` and `tile-join`, which have no Windows path, so the whole |
| 4 | # tile chain is cargo-only and `build_graph.ps1` can drive it from one command. |
| 5 | # |
| 6 | # Deliberately DETACHED from the Android Rust workspace (the empty [workspace] |
| 7 | # table below), exactly like `scripts/maps/gtfs_ingest` and |
| 8 | # `scripts/maps/osm_ingest`: it is a host binary, so `cargo build` here never |
| 9 | # pulls the aarch64-android toolchain or the app crates' lints. |
| 10 | # |
| 11 | # Both dependencies are pure Rust and no C toolchain is involved: |
| 12 | # |
| 13 | # miniz_oxide inflate AND deflate. Unlike osm_ingest, this crate needs the |
| 14 | # DEFLATE side too -- PMTiles gzips both its directories and its |
| 15 | # tiles, so we compress as well as decompress. |
| 16 | # rayon the tilers' work-stealing pool. Level-9 DEFLATE inside |
| 17 | # `pyramid::fit_tile` is where a layer build spends ~90% of its |
| 18 | # wall clock, and it is per-tile pure, so it threads. |
| 19 | # |
| 20 | # `cargo build --offline` resolves both from the local registry cache, along with |
| 21 | # rayon's own tree (rayon-core, crossbeam-deque, crossbeam-utils, crossbeam-epoch, |
| 22 | # either). That is a statement about THIS box's cache, not a guarantee: a clean |
| 23 | # machine needs one online `cargo fetch` before it can build offline. |
| 24 | [package] |
| 25 | name = "tile_build" |
| 26 | version = "0.1.0" |
| 27 | edition = "2021" |
| 28 | publish = false |
| 29 | license = "GPL-2.0-only" |
| 30 | description = "MVT + PMTiles v3 reader/writer for the Maps basemap (replaces tippecanoe/tile-join)" |
| 31 | [lib] |
| 32 | name = "tile_build" |
| 33 | path = "src/lib.rs" |
| 34 | [[bin]] |
| 35 | name = "mamaps_dump" |
| 36 | path = "src/bin/mamaps_dump.rs" |
| 37 | [[bin]] |
| 38 | name = "mamaps_pack" |
| 39 | path = "src/bin/mamaps_pack.rs" |
| 40 | [[bin]] |
| 41 | name = "transit_planet5" |
| 42 | path = "src/bin/transit_planet5.rs" |
| 43 | [[bin]] |
| 44 | name = "mamaps_planet5" |
| 45 | path = "src/bin/mamaps_planet5.rs" |
| 46 | [[bin]] |
| 47 | name = "mamaps_churn" |
| 48 | path = "src/bin/mamaps_churn.rs" |
| 49 | [[bin]] |
| 50 | name = "mamaps_overlay" |
| 51 | path = "src/bin/mamaps_overlay.rs" |
| 52 | [dependencies] |
| 53 | # The PMTiles + MVT codec, shared with the Android renderer in `:library:map`. |
| 54 | # Member of the repo-root workspace; path + `write` feature select the writer. |
| 55 | tilecodec = { workspace = true, features = ["write"] } |
| 56 | miniz_oxide.workspace = true |
| 57 | rayon.workspace = true |
| 58 | sha2.workspace = true |
| 59 | # Anonymous pagefile-backed mappings for the spill backends (see `anon`): already |
| 60 | # in the tree via osm_ingest, so this adds a name to link, not a crate to fetch. |
| 61 | memmap2.workspace = true |
| 62 | # Planet5 transcoder (`mamaps_planet5`): the pure-Rust zstd encoder with dictionaries (what the |
| 63 | # reader's `ruzstd` decodes), and the C zstd dictionary trainer -- host-only, never in the |
| 64 | # Android cdylib (tilecodec's reader keeps its single pure-Rust decoder). Both were already in |
| 65 | # the workspace's lockfile. |
| 66 | zstd-rs.workspace = true |
| 67 | zstd.workspace = true |
| 68 | [profile.release] |
| 69 | opt-level = 3 |