Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
dependencies ▾

Modern-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]
25name = "tile_build"
26version = "0.1.0"
27edition = "2021"
28publish = false
29license = "GPL-2.0-only"
30description = "MVT + PMTiles v3 reader/writer for the Maps basemap (replaces tippecanoe/tile-join)"
31[lib]
32name = "tile_build"
33path = "src/lib.rs"
34[[bin]]
35name = "mamaps_dump"
36path = "src/bin/mamaps_dump.rs"
37[[bin]]
38name = "mamaps_pack"
39path = "src/bin/mamaps_pack.rs"
40[[bin]]
41name = "transit_planet5"
42path = "src/bin/transit_planet5.rs"
43[[bin]]
44name = "mamaps_planet5"
45path = "src/bin/mamaps_planet5.rs"
46[[bin]]
47name = "mamaps_churn"
48path = "src/bin/mamaps_churn.rs"
49[[bin]]
50name = "mamaps_overlay"
51path = "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.
55tilecodec = { workspace = true, features = ["write"] }
56miniz_oxide.workspace = true
57rayon.workspace = true
58sha2.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.
61memmap2.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.
66zstd-rs.workspace = true
67zstd.workspace = true
68[profile.release]
69opt-level = 3