#routines #safe-bindings #sofa #erfa #astronomical #astronomy #international

erfars

Safe Rust bindings to the Essential Routines for Fundamental Astronomy (ERFA) C library

1 unstable release

Uses new Rust 2024

0.1.0 Feb 20, 2025

#2 in #erfa

Download history 94/week @ 2025-02-15 28/week @ 2025-02-22 7/week @ 2025-03-01

129 downloads per month

MIT/Apache

2.5MB
19K SLoC

C 17K SLoC // 0.7% comments Rust 2K SLoC // 0.0% comments Automake 48 SLoC // 0.1% comments M4 44 SLoC Shell 8 SLoC // 0.4% comments

Contains (obscure autoconf code, 1KB) external/erfa/configure.ac

erfars

This repository contains the erfars Rust crate, which provides safe Rust bindings to the Essential Routines for Fundamental Astronomy (ERFA) C library, which is based on the Standards of Fundamental Astronomy (SOFA) library published by the International Astronomical Union (IAU).

Documentation is currently not available, but the function interfaces are very similar to the C interfaces so please consult the original ERFA docs for now.

The only notable difference between this library and ERFA is that warning codes returned by ERFA are ignored by the safe Rust functions. This isn't a permanent design decision, I just haven't figured out an elegant way of returning warnings without forcing the user to pass mutable references everywhere. If you absolutely want the warning information, you can use the raw bindings directly.

Contributing

Contributions are always welcome in the form of Github issues or pull requests, and if you have any suggestions or questions you can always reach out to me directly.

Licensing

This library is licensed under either the MIT License or the Apache 2.0 License at your option. A copy of the original ERFA license is provided here.

No runtime deps