Skip to content

feat: drop rendering from default features; ship it in a -full variant#2945

Draft
CommanderStorm wants to merge 6 commits into
maplibre:mainfrom
CommanderStorm:feat/rendering-not-default-full-variant
Draft

feat: drop rendering from default features; ship it in a -full variant#2945
CommanderStorm wants to merge 6 commits into
maplibre:mainfrom
CommanderStorm:feat/rendering-not-default-full-variant

Conversation

@CommanderStorm

@CommanderStorm CommanderStorm commented Jul 2, 2026

Copy link
Copy Markdown
Member

Warning

Not yet reviewed or tested by a human. This was drafted by an AI agent (Claude Code) and pushed as-is at the author's request. CI has not run yet; treat every change as unverified until reviewed.

rendering relies on maplibre_native, which links pre-compiled native libraries with strict glibc/version requirements. That's fine inside our Docker image (we control the runtime) but fragile on uncontrolled hosts. Today rendering is a default feature, so it silently ships in the crates.io publish, cargo install, and the x86_64/aarch64-unknown-linux-gnu release tarballs. Only musl and Debian already strip it.

After this change:

Artifact rendering?
ghcr.io/maplibre/martin:latest / :<version>
ghcr.io/maplibre/martin:latest-full / :<version>-full
martin-<gnu>.tar.gz, musl, deb, cargo install
martin-<gnu>-full.tar.gz

CommanderStorm and others added 4 commits July 2, 2026 19:57
maplibre_native links pre-compiled native libraries with strict runtime
requirements, which is fragile on uncontrolled hosts. Remove `rendering` from
martin's default features so default builds, `cargo install`, and the default
binaries/Docker image are lean. Rendering now ships in a batteries-included
`-full` variant: a `-full` Docker image and `-full` Linux-gnu tarballs.

- martin/Cargo.toml: remove `rendering` from `default`
- justfile: `full_features`, `build-release-full`, dedicated `test-rendering`
  recipe (--no-default-features)
- build-binary.yml: `full` input; ci.yml: `-full` gnu build jobs, matrixed
  base/full docker build+push, `-full` release tarballs, dedicated
  `unit-test-svc-rendering` job
- single multi-platform.Dockerfile parametrized by EXTRA_PACKAGES build-arg
- tests: gate rendering checks in test.sh on MARTIN_RENDERING; regenerate
  catalog goldens (base build omits the rendering setting)
- docs: installation, run-with-docker, sources-styles, martin-as-a-library

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Performance Comparison mainfeat/rendering-not-default-full-variant

Total Elapsed Time: 119.43s → 117.45s (-1.7%)
CPU Baseline: 81.12µs → 81.19µs (+0.1%)
Benchmark ID: timing

timing - Function execution time metrics.

+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| Function                   | Calls                        | Avg                            | P95                            | Total                          | % Total                      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| martin::main               | 1 → 1 (+0.0%)                | 119.42s → 117.47s (-1.6%)      | 119.45s → 117.51s (-1.6%)      | 119.43s → 117.45s (-1.7%)      | 100.00% → 100.00% (+0.0%)    |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| martin::start              | 1 → 1 (+0.0%)                | 119.42s → 117.47s (-1.6%)      | 119.45s → 117.51s (-1.6%)      | 119.42s → 117.44s (-1.7%)      | 99.99% → 100.00% (+0.0%)     |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| content::get_tile          | 3200800 → 3200800 (+0.0%)    | 18.13µs → 18.02µs (-0.6%)      | 29.92µs → 29.41µs (-1.7%)      | 58.03s → 57.66s (-0.6%)        | 48.59% → 49.10% (+1.0%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| content::get_http_response | 2200600 → 2200600 (+0.0%)    | 18.35µs → 18.48µs (+0.7%)      | 27.81µs → 27.07µs (-2.7%)      | 40.38s → 40.67s (+0.7%)        | 33.81% → 34.63% (+2.4%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| content::get_tile_content  | 2200600 → 2200600 (+0.0%)    | 15.71µs → 15.92µs (+1.3%)      | 25.39µs → 24.80µs (-2.3%)      | 34.56s → 35.03s (+1.4%)        | 28.94% → 29.82% (+3.0%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| content::new               | 3200800 → 3200800 (+0.0%)    | 1.76µs → 1.76µs (+0.0%)        | 2.00µs → 1.97µs (-1.5%)        | 5.65s → 5.64s (-0.2%)          | 4.73% → 4.80% (+1.5%)        |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| source::get_sources        | 3200800 → 3200800 (+0.0%)    | 1.40µs → 1.39µs (-0.7%)        | 1.69µs → 1.64µs (-3.0%)        | 4.48s → 4.44s (-0.9%)          | 3.75% → 3.78% (+0.8%)        |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| content::recompress        | 2200600 → 2200600 (+0.0%)    | 1.64µs → 1.45µs (-11.6%)       | 100.00ns → 90.00ns (-10.0%)    | 3.60s → 3.20s (-11.1%)         | 3.01% → 2.72% (-9.6%)        |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| content::encode            | 100100 → 100100 (+0.0%)      | 34.58µs → 30.64µs (-11.4%)     | 48.22µs → 43.65µs (-9.5%)      | 3.46s → 3.07s (-11.3%)         | 2.90% → 2.61% (-10.0%)       |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| server::new_server         | 1 → 1 (+0.0%)                | 200.51µs → 200.51µs (+0.0%)    | 200.57µs → 200.57µs (+0.0%)    | 200.49µs → 200.52µs (+0.0%)    | 0.00% → 0.00% (+0.0%)        |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+
| content::decode            | 1 → 1 (+0.0%)                | 29.00ns → 40.00ns (+37.9%) ⚠️  | 29.00ns → 40.00ns (+37.9%) ⚠️  | 29.00ns → 40.00ns (+37.9%) ⚠️  | 0.00% → 0.00% (+0.0%)        |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+------------------------------+

alloc-bytes - Exclusive allocation bytes by each function (excluding nested calls).

+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| Function                   | Calls                        | Avg                            | P95                            | Total                          | % Total                    |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| content::get_tile_content  | 2200600 → 2200600 (+0.0%)    | 93.0 KB → 93.0 KB (+0.0%)      | 181.9 KB → 181.9 KB (+0.0%)    | 195.2 GB → 195.2 GB (+0.0%)    | 83.91% → 83.91% (+0.0%)    |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| content::encode            | 100100 → 100100 (+0.0%)      | 344.5 KB → 344.5 KB (+0.0%)    | 347.2 KB → 347.2 KB (+0.0%)    | 32.9 GB → 32.9 GB (+0.0%)      | 14.14% → 14.13% (-0.1%)    |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| source::get_sources        | 3200800 → 3200800 (+0.0%)    | 1.1 KB → 1.1 KB (+0.0%)        | 2.4 KB → 2.4 KB (+0.0%)        | 3.3 GB → 3.3 GB (+0.0%)        | 1.43% → 1.43% (+0.0%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| content::get_tile          | 3200800 → 3200800 (+0.0%)    | 287 B → 287 B (+0.0%)          | 296 B → 296 B (+0.0%)          | 876.6 MB → 876.6 MB (+0.0%)    | 0.37% → 0.37% (+0.0%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| content::get_http_response | 2200600 → 2200600 (+0.0%)    | 182 B → 182 B (+0.0%)          | 200 B → 200 B (+0.0%)          | 383.6 MB → 383.6 MB (+0.0%)    | 0.16% → 0.16% (+0.0%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| martin::start              | 1 → 1 (+0.0%)                | 3.0 MB → 3.0 MB (+0.0%)        | 3.0 MB → 3.0 MB (+0.0%)        | 3.0 MB → 3.0 MB (+0.0%)        | 0.00% → 0.00% (+0.0%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| martin::main               | 1 → 1 (+0.0%)                | 139.9 KB → 141.9 KB (+1.4%)    | 139.9 KB → 142.0 KB (+1.5%)    | 139.9 KB → 141.9 KB (+1.4%)    | 0.00% → 0.00% (+0.0%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| server::new_server         | 1 → 1 (+0.0%)                | 31.1 KB → 31.1 KB (+0.0%)      | 31.2 KB → 31.1 KB (-0.3%)      | 31.1 KB → 31.1 KB (+0.0%)      | 0.00% → 0.00% (+0.0%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| content::decode            | 1 → 1 (+0.0%)                | 0 B → 0 B (+0.0%)              | 0 B → 0 B (+0.0%)              | 0 B → 0 B (+0.0%)              | 0.00% → 0.00% (+0.0%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| content::new               | 3200800 → 3200800 (+0.0%)    | 0 B → 0 B (+0.0%)              | 0 B → 0 B (+0.0%)              | 0 B → 0 B (+0.0%)              | 0.00% → 0.00% (+0.0%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+
| content::recompress        | 2200600 → 2200600 (+0.0%)    | 0 B → 0 B (+0.0%)              | 0 B → 0 B (+0.0%)              | 0 B → 0 B (+0.0%)              | 0.00% → 0.00% (+0.0%)      |
+----------------------------+------------------------------+--------------------------------+--------------------------------+--------------------------------+----------------------------+

Threads

Total Alloc: 4.1 MB → 4.1 MB (+0.0%)
Total Dealloc: 302.6 MB → 302.6 MB (+0.0%)
Mem Diff: -298.5 MB → -298.5 MB (+0.0%)

+-------------+-----------------------------+-----------------------------+--------------------------------+------------------------------+---------------------------------+
| Thread      | CPU % Avg                   | CPU % Max                   | Alloc                          | Dealloc                      | Mem Diff                        |
+-------------+-----------------------------+-----------------------------+--------------------------------+------------------------------+---------------------------------+
| martin      | 0.00% → 0.00% (+0.0%)       | 15.90% → 8.00% (-49.7%) 🚀  | 2.8 MB → 2.8 MB (+0.0%)        | 1.8 MB → 1.9 MB (+5.6%)      | 1013.6 KB → 934.1 KB (-7.8%)    |
+-------------+-----------------------------+-----------------------------+--------------------------------+------------------------------+---------------------------------+
| hp-mcp      | 0.00% → 0.00% (+0.0%)       | 0.00% → 0.00% (+0.0%)       | 42.0 KB → 54.1 KB (+28.8%) ⚠️  | 3.0 KB → 3.0 KB (+0.0%)      | 39.0 KB → 51.1 KB (+31.0%) ⚠️   |
+-------------+-----------------------------+-----------------------------+--------------------------------+------------------------------+---------------------------------+
| 🗑️ hp-debug | 1.60% → 0.00% (-100.0%) 🚀  | 8.00% → 0.00% (-100.0%) 🚀  | 10.3 KB → 0 B (-100.0%) 🚀     | 299.7 MB → 0 B (-100.0%) 🚀  | -299.6 MB → 0 B (+100.0%) ⚠️    |
+-------------+-----------------------------+-----------------------------+--------------------------------+------------------------------+---------------------------------+

Generated with hotpath-rs

CommanderStorm and others added 2 commits July 3, 2026 09:12
- installation.md: fix malformed code span and realign the release
  table widened by the new -full variants (markdownlint MD038/MD060)
- geojson catalog snapshots were blessed with a rendering-enabled
  build (`"rendering": false`); integration tests run the default
  (non-rendering) binary, so restore `"settings": {}`

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CommanderStorm added a commit that referenced this pull request Jul 6, 2026
#2963)

Split out of #2945 so it can land independently of the
rendering-not-default change: disable the uv download cache (one-off
`uvx` tool runner, no Python deps to cache) which also lets the
redundant `zizmor: ignore[cache-poisoning]` comments go, move
martin-core's `image` to a dev-dependency (only used in the rendering
test), and drop martin's unused `utoipa-actix-web` dependency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant