Somewhere between reality and the space/flight sim E:D.
Use galos-sync to populate the database and galos to perform basic queries
from the CLI.
The galos-map program is a 3D galaxy map, see its
documentation for more.
Install the toolchain with rustup. The workspace tracks
stable (see rust-toolchain), so a plain install is enough.
elite_journal, eddn, eddb, and edsm are submodules, pulled into the
build through [patch.crates-io]. They must be checked out or the patches stop
applying and the published copies come down beside the working tree.
git submodule update --initThe database columns are PostGIS geometries, so a PostgreSQL with PostGIS is required. Building galos_map on Linux additionally needs the ALSA and udev development headers.
Every binary and cargo sqlx read the connection from DATABASE_URL, taken
from the environment or a .env file in the working directory or one above it.
# .env
DATABASE_URL=postgresql://postgres@localhost/galos_developmentcargo install sqlx-cli --locked --version "$(cargo pkgid sqlx | sed 's/.*@//')"
# Create the database and run the migrations.
cargo sqlx database setup --source galos_db/migrations/Managing migrations and resetting the database live with the database crate,
galos_db.
To build or test without a database, use the cached query metadata in .sqlx/:
SQLX_OFFLINE=true cargo build# Populate the database. `galos-sync --help` lists the sources.
cargo run --release --bin galos-sync -- eddn # live feed from EDDN
cargo run --release --bin galos-sync -- edsm # EDSM nightly dumps
cargo run --release --bin galos-sync -- journal # local journal files
# Query from the CLI.
cargo run --bin galos -- --help
# Open the 3D map. See galos_map/README.md.
cargo run --release -p galos_mapRUST_LOG selects what the tools log (e.g. RUST_LOG=debug), info and above
by default.
# Create a backup.
pg_dump -Fc galos_development > latest.dump
# Restore from backup.
pg_restore -Cd postgres < latest.dump