Skip to content

For developers

arcsec is written in Rust and is open source under the MIT licence. This page covers what you need beyond the ready-made downloads.

With Rust 1.96 or newer, this builds and installs arcsec on any platform Rust supports, including Intel Macs:

Terminal window
cargo install arcsec

The program lands in ~/.cargo/bin (on Windows, %USERPROFILE%\.cargo\bin).

Building needs a C compiler (cc on Linux and macOS, the MSVC build tools on Windows) for one dependency, ring, which provides the HTTPS that arcsec catalog install downloads over. Nothing else: FITS support is built in, so no system CFITSIO library is needed.

Terminal window
git clone https://github.com/cruzzil/arcsec
cd arcsec
cargo build --release # binary at target/release/arcsec

Each release archive has a SHA-256 checksum file, and SHA256SUMS lists them all:

  • Linux: sha256sum -c <file>.sha256
  • macOS: shasum -a 256 -c <file>.sha256
  • Windows: run Get-FileHash <file> in PowerShell and compare the hash with the .sha256 file’s contents.

Each archive also carries a signed build attestation from the GitHub Actions run that built it, which the GitHub CLI checks:

Terminal window
gh attestation verify <file> -R cruzzil/arcsec

The solving code is published separately as arcsec-core, for use from other Rust programs. Its API documentation is on docs.rs.

Two smaller crates sit beside it, for programs that want more of what the command line does:

  • arcsec-io reads FITS, XISF, ASDF, JPEG, PNG and TIFF images, and writes ASTAP’s .wcs and .ini files.
  • arcsec-catalogue is arcsec catalog as a library: which catalogues exist and which are installed, where they live, which to use for a field, downloading and verifying them, and building the blind index. Downloading is an optional feature, so a program that only needs to find catalogues does not pull in the HTTPS code.

Programs written in C or C++ can solve in-process with libarcsec, a shared or static library with a C header: pass it pixels or a file, get back a WCS. See the C library.