Skip to content

Latest commit

 

History

History
50 lines (41 loc) · 1.84 KB

File metadata and controls

50 lines (41 loc) · 1.84 KB

Project Overview

Martin is a high-performance tile server serving vector/raster tiles from PostGIS, PMTiles, and MBTiles. Also serves fonts, sprites, and styles. Includes martin cp (bulk tile copier subcommand) and the mbtiles (MBTiles CLI) binary.

Commands

Uses just as command runner. just --list for all targets

# build
just check
# run server on :3000
just run
# start test DB (docker)
just start
# all tests
just test
# all unit tests
cargo nextest run --workspace
# PG tests (needs `just start`)
just test-pg
# end-to-end tests driving the built binaries
just test-e2e
# end-to-end tests that need the PostgreSQL database (needs docker, needs `just start`)
just test-e2e-pg
# lint the PR (run before committing)
just lint
# update all snapshot/expected output
just bless

Workspace Structure

4-crate workspace:

  • martin - HTTP server, CLI (including martin cp), configuration, routing. Binary: martin
    • martin-ui/ - React frontend, embedded at build time
  • martin-core - Core source logic src/tiles/{postgres,mbtiles,pmtiles,cog}/ and src/resources/{fonts,sprites,styles}/ All code that is likely useful for others is here.
  • martin-tile-utils - Tile format detection, compression/decompression
  • mbtiles - MBTiles library + CLI

Key Rules

  • CI warnings = errors: set env var CARGO_BUILD_WARNINGS=deny. ALL warnings must be fixed.
  • Clippy pedantic enabled workspace-wide. Avoid unwrap/panic in non-test code; prefer expect with a clear message or proper error handling. unwrap/panic may be acceptable in tests/examples when appropriate.
  • End-to-end tests: e2e-tests/ runs the built martin/mbtiles binaries and snapshots what they answer. just bless-e2e to update.
  • Frontend-only changes martin-ui/ use npm run dev to view changes