10 releases

0.5.0 Dec 20, 2023
0.4.5 Dec 29, 2021
0.4.1 Jul 13, 2021
0.3.0 Mar 21, 2021
0.1.0 Jun 22, 2020

#317 in Science

Download history 156/week @ 2024-07-28 30/week @ 2024-08-04 13/week @ 2024-08-11 1/week @ 2024-08-18 8/week @ 2024-08-25 4/week @ 2024-09-01 13/week @ 2024-09-15 35/week @ 2024-09-22 23/week @ 2024-09-29 9/week @ 2024-10-06 3/week @ 2024-10-13 23/week @ 2024-10-20 63/week @ 2024-10-27

99 downloads per month
Used in 2 crates

MIT license

2.5MB
17K SLoC

C 17K SLoC // 0.7% comments Rust 103 SLoC // 0.0% comments

rsofa

Current Crates.io Version

rsofa is a library to provide International Astronomical Union's (http://www.iau.org/) SOFA library (http://www.iausofa.org/) in rust.

rsofa is not a port of SOFA routines but uses bindgen to create a direct wrapper for the SOFA C library. rosfa is not officially endorsed by the International Astronomical Union.

Although still pre-1.0 release the package represents a complete wrapping of the SOFA C library. The only future work to do would be to implement additional test coverage to ensure agreement with C implementation. However given the auto-generated nature of the crate and direct C interface the likelihood of deviation is low.

SOFA Version History

Package Version SOFA Release
v0.5 2023-10-11
v0.4 2021-05-12
v0.3 2021-01-25
v0.2 2020-07-21
v0.1 2019-07-22

Update Process

Whenever a new version of the IAU SOFA C library is released, if that update includes the addition or deletion of a function in the library. the build.rs file should be updated to reflect the change. New functions should be added to the build list and deprecated functions removed.

Note, ./extern/sofa.h must be updated by coping the contents of ./extern/src/sofa.h with the following line adjusted out:

// #include "math.h"

This prevents bindgen generating bindings from the C math.h headers which cause later problems in the build process. It also points the headers to include the official release of sofam.h without duplicating it at the same level.

The bindings can be generated manually with:

cargo install bindgen
bindgen ./extern/src/sofa.h -o ./src/bindings.rs

License

The wrapper package is licensed under the MIT License.

In addition to the MIT license, any use of this module should comply with SOFA's license and terms of use which is reproduced in the license file.

Specifically, but not exclusively, any published work or commercial products which includes results achieved by using rsofa shall acknowledge that the SOFA software was used in obtaining those results.

No runtime deps

~0–2.2MB
~43K SLoC