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

Modern-Apps.git / scripts / networklocation / geodb_build / Cargo.toml

Cargo.toml50 lines · 2.0 KiBRaw
1# Host-side builder for `geocoder.db`, the offline reverse/forward geocoder database
2# that `:networklocation` reads.
3#
4# Replaces the `osmium tags-filter | osmium export | geocoder_gen.cpp` chain. That pipeline
5# needed osmium, g++, OpenMP, simdjson and POSIX mmap (so: WSL only), produced a **101 GB**
6# GeoJSONSeq intermediate on the way, and indexed address points and nothing else. This reads
7# the `.osm.pbf` natively through `osm_ingest`, holds no intermediate, and carries streets,
8# POIs and places as well as addresses.
9#
10# Deliberately DETACHED from the Android Rust workspace and from the other host tools'
11# workspaces (the empty [workspace] table at the bottom), exactly like `scripts/maps/osm_ingest`
12# and `scripts/maps/wikidesc`.
13[package]
14name = "geodb_build"
15version = "0.1.0"
16edition = "2021"
17publish = false
18license = "GPL-2.0-only"
19description = "OSM .osm.pbf -> geocoder.db for :networklocation"
20
21[lib]
22name = "geodb_build"
23path = "src/lib.rs"
24
25[[bin]]
26name = "geodb_build"
27path = "src/bin/geodb_build.rs"
28
29[dependencies]
30# Native .osm.pbf reading, the three-pass relation->way->node ordering, the node coordinate
31# store, the ring assembler and the deterministic thread pool. Everything this crate does to a
32# PBF is done through it.
33osm_ingest = { path = "../../maps/osm_ingest" }
34
35# Block compression for the column store. The device reader decompresses with the pure-Rust
36# `ruzstd`, which has no encoder, so the writer needs a real zstd. This is a host tool that
37# never cross-compiles, so the C dependency stops here and does not reach the app.
38zstd.workspace = true
39
40# Sorting and materialisation run on every core. Every parallel step here collects in input
41# order, so the output stays byte-identical whatever the thread count.
42rayon.workspace = true
43
44# The Windows process heap serialises 64 threads that each allocate a few small `String`s per
45# OSM feature: on North America the node-features pass sat at 1.4 of 64 cores. Same reason and
46# same crate as `scripts/maps/mamaps_build`.
47mimalloc.workspace = true
48
49[profile.release]
50opt-level = 3