libswisseph-sys
Rust system wrapper for the swisseph C library
Ephemeris files
Ephemeris files are excluded from this crate so that it fits on crates.io. There are standard standard ephemeris files located in the swisseph c library and there are many more that can be included depending on the desired calculation. For example: astroids, JPL, etc.
The ephemeris path with default to and can be set as described in the swisseph C library. See https://github.com/aloistr/swisseph/ for further details.
Example usage
use *;
let mut xx: = ;
let mut serr = ;
let y = 2002;
let m = 1;
let d = 1;
let h = 0.0;
let i_flag = SE_GREG_CAL as i32;
let tjd_ut = swe_julday;
let ipl = SE_SUN as i32;
swe_calc_ut;
let _lng = xx;
let _lat = xx;
let _speed = xx;
TODO
- See if bindgen can generate more ergonomic integer types. There is some discrepancy between signed and unsigned types for functions and constants.
- There are a couple of header files that are not included because of overlapping function names
swisseph docs
https://www.astro.com/swisseph/swephprg.htm https://www.astro.com/ftp/swisseph/doc/swisseph.pdf
Credit
- Astrodienst / @aloistr for swisseph
- Stéphane Bressani / @stephaneworkspace for work on his wrapper and rust project
Notes
Added the swisseph c lib as submodule
git submodule add https://github.com/aloistr/swisseph.git libswisseph/
u128 warnings
Rustc u128 is not ffi safe. Warnings may be thrown on compilation