fits-io

Crates.iofits-io
lib.rsfits-io
version0.1.3
created_at2026-01-12 11:05:10.888167+00
updated_at2026-01-18 14:59:57.274114+00
descriptionA pure-Rust FITS file handling library inspired by CFITSIO, focused on safety, clarity, and performance.
homepage
repository
max_upload_size
id2037490
size236,853
Joatin Granlund (Joatin)

documentation

README

FitsIo

A safe, ergonomic, and pure-Rust library for reading and writing FITS (Flexible Image Transport System) files, inspired by CFITSIO.

This crate supports no_std environments, optional async I/O with Tokio, and structured access to FITS headers, images, and tables — without any C dependencies.

Designed for astronomy, astrophotography, embedded systems, and scientific pipelines where portability and safety matter.

Features

  • 📦 Pure Rust implementation (no CFITSIO, no C bindings)
  • 🚫 no_std compatible
  • ⚡ Async I/O with Tokio (enabled by default)
  • 🧩 Support for Primary HDUs and extensions
  • 🖼️ Image HDUs
  • 📊 ASCII tables and binary tables
  • 🧠 Typed access to FITS header keywords
  • 🚀 Streaming and memory-efficient reads
  • 🛡️ Idiomatic error handling with Result
  • 🔁 CFITSIO-inspired API, redesigned for Rust

Installation

Add the crate to your Cargo.toml:

[dependencies]
fits-io = "0.1"

no_std mode

[dependencies]
fits-io = { version = "0.1", default-features = false }

Design Goals

  • Safety — eliminate undefined behavior and unsafe FFI
  • Portability — run anywhere Rust runs
  • Ergonomics — minimal boilerplate
  • Performance — streaming-friendly, low overhead
  • Familiarity — CFITSIO-inspired, Rust-native

Supported FITS Features

Feature Status
Primary HDU
Image HDU
Binary Tables
ASCII Tables
Header read/write
Compression
Streaming I/O 🚧
WCS helpers 🚧

License

Licensed under either of:

  • Apache License, Version 2.0
  • MIT License

at your option.

Contributing

Issues, discussions, and pull requests are welcome. Please open an issue for large changes or new features.

Acknowledgements

Inspired by CFITSIO and the FITS standard maintained by NASA/HEASARC.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Commit count: 0

cargo fmt