Skip to content

Contributing to RidgeCast (Developer)

Thanks for helping improve RidgeCast. The project combines GUI behavior, downloaded geospatial data, parallel Rust code, GPU shaders, SQLite, and a C++ propagation model, so changes should be narrow, testable, and explicit about modeling assumptions.

Unless explicitly stated otherwise, contributions submitted for inclusion in RidgeCast are licensed under the GNU General Public License, version 3 only (GPL-3.0-only), like the project itself; see LICENSE. Retain existing third-party copyright notices and license terms when changing bundled code or data.

Follow the platform prerequisites and build instructions in README.md. Check both the desktop and MCP packages before making changes:

Terminal window
cargo check --workspace --locked

This section is optional; skip it unless you need to step through code in a debugger.

Cargo.toml sets debug = "line-tables-only" for the dev profile, which cargo build, cargo check, and cargo test all use, and debug = false for third-party dependencies. With full debug info, each build of RidgeCast’s own crate came to about 800 MB, and the Windows debug-symbol files (PDBs) to about 10 GB. Panics and backtraces still show file and line numbers, and you can still set breakpoints and step, but a debugger cannot show local variables.

To get local variables for RidgeCast’s own code, override the setting for one command. Cargo reads CARGO_PROFILE_DEV_DEBUG as [profile.dev] debug; third-party dependencies stay without debug info either way.

Terminal window
# bash / Git Bash
CARGO_PROFILE_DEV_DEBUG=full cargo build
Terminal window
# PowerShell: the variable stays set for the whole session
$env:CARGO_PROFILE_DEV_DEBUG = "full"
cargo build
# when you are done:
Remove-Item Env:CARGO_PROFILE_DEV_DEBUG

To debug a test, run cargo test --no-run the same way and attach the debugger to the test executable it prints.

Switching between the two settings rebuilds RidgeCast’s own crate, and a full-debug build can take many GB of disk. To keep it from filling your normal target/ directory, add --target-dir target/full-debug to the command. Deleting that folder then reclaims the space without touching your regular build. Unset the variable before the checks in the next section.

The dependencies tiff, weezl, flate2, zlib-rs, miniz_oxide, and zstd decode terrain rasters, which is slow when unoptimized. Cargo.toml keeps them at opt-level = 3 in dev and test builds, so stepping into them shows optimized code in which some variables are unavailable.

Run:

Terminal window
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked

Check documentation links with PowerShell:

Terminal window
pwsh -File tools/check-doc-links.ps1

Tests that reach the network or need local data are marked #[ignore] with the reason. The workspace test command above runs the default offline selection.

To include the ignored tests, first check their notes for network and local data requirements, then run:

Terminal window
cargo test --workspace --locked -- --include-ignored

Some ignored tests also need staged WorldPop rasters or an FCC snapshot. The FCC snapshot is local data, and its data-backed test skips if the snapshot is absent. Read the individual test’s note before running the data-backed checks.

For rendering changes, exercise normal and multiply overlays, pan and zoom through viewport edges, and test with no basemap. For propagation changes, compare CPU and GPU behavior where both paths apply and include a focused regression test.

  • Prefer small domain types over long positional argument lists.
  • Keep expensive I/O, terrain work, and propagation calculations off the UI thread.
  • Preserve cancellation checks in long loops and background jobs.
  • Avoid panics on downloaded, imported, or user-authored data.
  • Add comments for invariants, non-obvious coordinate transforms, model assumptions, concurrency ownership, and performance bounds.
  • Do not narrate straightforward code with comments.
  • Keep serialized configuration backward compatible. Add Serde defaults or aliases when fields or variants evolve.
  • Give every floating window an explicit default_width and a default_height, and wrap anything that can grow — a list, a report, a settings page, a message of unknown length — in app::ui::window_layout::scrolling_body. A window with no scroll area takes its contents’ full height and is then pinned to the top of the screen, so its bottom rows, including the buttons that dismiss it, are clipped and unreachable on a display shorter than its contents. Use scrolling_body_with_footer where the actions belong under the body rather than at the end of it.

Never commit:

  • FCC ULS archives, extracted .dat files, or the amateur SQLite database
  • Licensee address exports
  • Downloaded terrain, land-cover, or map tiles
  • Generated network/configuration files
  • API credentials, signing keys, or private node-source data

The repository ignore rules cover standard runtime paths. Check git status before every commit.

Report vulnerabilities through the security policy. Use redacted or synthetic data in issues, screenshots, and regression fixtures.

  • Use a short imperative commit subject.
  • Separate mechanical formatting from behavior changes when practical.
  • Describe user-visible behavior, modeling changes, performance impact, and validation.
  • Include screenshots for meaningful UI changes. Follow the consistency and privacy guidance in the screenshot capture checklist.
  • Walk the affected workflow in a fresh Basic project and again in Advanced. Check that the documented commands are visible in the stated mode. Name the mode in captions when it affects the controls being shown, and check each changed capture wherever it appears in the README, help, or website.
  • Identify any tests that were skipped and why.

Every user-visible feature must be documented on a page reachable from docs/README.md. Keep the root README focused on the product, major capabilities, and the shortest path into the documentation.

Choose the page type according to the reader’s immediate need:

The page… The reader is… Write a…
Guides action Learning Tutorial
Guides action Completing real work How-to guide
Provides facts Completing real work Reference page
Develops understanding Learning or reflecting Concept page

This classification follows the Diátaxis documentation framework.

  • A tutorial owns the learner’s success. Use a fixed path, produce visible results early, state expected results, minimize choices, and test the complete journey from its documented starting state.
  • A how-to guide begins with a real-world goal and assumes basic competence. Keep it focused on action; link to reference and concepts instead of digressing.
  • A reference page describes controls, settings, formats, defaults, limits, and behavior consistently and without persuasive narrative.
  • A concept page explains context, models, tradeoffs, rationale, and limitations. Put operational procedures and exhaustive option lists elsewhere.

For a user-interface or behavior change, state in the pull request which documentation page changed, or why no documentation impact exists. Prefer one canonical description with cross-links over duplicated facts.

The website builds its documentation from the same Markdown. Register a new guide and its screenshots in website/content-manifest.json, and add the guide to the sidebar in website/astro.config.mjs. Link to the canonical guide from the website’s Overview, Install, or Examples page when it helps visitors find the workflow. Review those summaries when a workflow or its interface mode changes.

The Rust bridge lives in src/engine/itm.rs; the wrapper and model implementation live in cpp/. Keep the bridge portable across MSVC, Clang, and GCC. Changes to propagation formulas should cite their source and include numeric regression tests.

Development snapshot (0.5.0-dev)· revision 885e28c1 · Canonical source on GitHubHome · Install · Examples · Glossary · Model limits