XALEN Ephemeris: a pure-Rust astrology engine with JPL-class planetary accuracy and zero unsafe core
Pure-Rust astronomical ephemeris for astrology — Vedic, Western, Chinese, and 9 world traditions
At a glance
- What is it?
- XALEN Ephemeris is an Apache-2.0 Rust workspace computing planetary positions, houses, ayanamsas, eclipse circumstances and a dozen astrological traditions, validated against JPL DE440 and Swiss Ephemeris, with Python, Node and WASM bindings planned across registries.
- Who is it for?
- Take XALEN Ephemeris if you are building astrology software and want a dependency-light, auditable engine rather than wrapping Swiss Ephemeris, because the accuracy report is published and reproducible through the committed golden tests, the core has zero unsafe Rust, and the tradition coverage from Vedic dashas to Arabic Lots is unusually wide.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 79 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 17, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What it computes
XALEN Ephemeris is a Rust workspace for astrological computation built on an astronomical core. The analytical engine combines VSOP87A for planets, ELP2000-82 for the Moon, IAU 2000B nutation and the full IAU 2006 and P03 rotation model, and it works standalone with zero data files. A separate NAIF DE440 SPK reader loads real JPL .bsp binary kernels for extended validity and JPL-grade accuracy. On top of the positions sit the astrology layers: 50 ayanamsa systems including Lahiri, KP Krishnamurti, Raman and Fagan-Bradley plus a custom variant with user-defined epoch and precession rate, 23 house systems from Placidus and Koch to Whole Sign and Krusinski-Pisa with automatic Porphyry fallback at polar latitudes, and tradition modules covering Vedic modules such as dasha, shadbala, KP, Jaimini and panchang, Western aspects, dignities, 97 Arabic Lots and horary, Chinese BaZi and Zi Wei Dou Shu, Lal Kitab, I Ching with all 384 line texts, numerology, Korean Saju and more.
The accuracy report
The README leads with validation against the references that matter, and docs/ACCURACY.md carries the full report. Against JPL Horizons DE440, the Sun agrees to 0.21 arcseconds and Mercury through Saturn to 0.76 arcseconds or better, Uranus and Neptune land near 1.8 to 2.5 arcseconds, and Pluto is arcminute-class in-window against the published Goffin-fit bound. The analytical Moon reaches an RMS near 2.8 arcseconds against pyswisseph across AD 1600 to 2100, with a maximum near 12 arcseconds, and the README discloses that an earlier build mis-applied the planet annual-aberration term to the geocentric Moon producing an 11 to 21 arcsecond residual, a bug now fixed. Loading the DE440 kernel takes the Moon sub-arcsecond. Eclipse classification uses rigorous Besselian elements with a per-observer local-circumstances layer, and the global type is validated against NASA for the 2017 and 2024 total solar eclipses. The numbers are reproducible from the repository through the committed accuracy test when a de440s.bsp kernel is present.
cargo test -p xalen-ephem --test accuracy_vs_de440A first look at the API
The README example shows the shape of a calculation, converting a birth date to a Julian day, opening a Vedic-configured almanac, taking the Moon geocentric ecliptic longitude, subtracting the Lahiri ayanamsa, and reading the nakshatra from the sidereal longitude.
use xalen_ephem::{Almanac, Body};
use xalen_time::{calendar_to_jd, CalendarSystem, JulianDay};
use xalen_ayanamsa::Ayanamsa;
use xalen_vedic::nakshatra::Nakshatra;
let jd = calendar_to_jd(1990, 3, 15, 12.0 - 5.5, CalendarSystem::default());
let almanac = Almanac::default_vedic();
let pos = almanac.geocentric_ecliptic(Body::Moon, jd).unwrap();
let sid = (pos.longitude.to_degrees() - Ayanamsa::Lahiri.compute_deg(jd.as_f64())).rem_euclid(360.0);
println!("{}", Nakshatra::from_longitude_deg(sid)); // SwatiThe workspace splits these concerns into crates: xalen-time carries UT1, TT and TDB Julian day types with the full leap-second table and a Stephenson-Morrison-Hohenkerk 2016 delta-T spline, xalen-ephem holds the engine, xalen-houses and xalen-ayanamsa the astrology geometry, and separate crates cover stars, vedic, western, chinese, numerology, iching and chart rendering, with SVG output for North Indian diamond, South Indian box and Western wheel charts and geocoding for over 130 cities.
Stars, asteroids and the catalog depth
The fixed-star coverage is layered. The xalen-western crate ships 506 built-in stars with proper motion and precession correction, covering everything brighter than magnitude 3, the Behenian and Royal stars, nakshatra yogatara and IAU-named stars to about magnitude 5. The xalen-stars crate adds 8,870 Hipparcos stars compiled into the binary, every record to magnitude 6.5 propagated from J1991.25 to J2000.0 with zero data files, on top of a 108-star curated core, and it can still load the full 118,218-star Hipparcos catalog from CSV at runtime. Beyond the classical bodies there are 15 asteroids including Ceres, Pallas, Juno, Vesta, Chiron-adjacent centaurs and the TNOs Eris, Sedna, Makemake and Haumea, plus an external element loader for any asteroid with known orbital elements, Black Moon Lilith in both mean and true osculating forms, and velocity and retrograde flags, topocentric positions and equatorial, heliocentric and rectangular output for every body.
The publishing caveat and how to build it
The most important operational fact is stated at the top of the README: the Rust crates, the PyPI xalen wheel and the npm packages are not published to their registries yet, and the Crates.io and docs.rs badges are placeholders until first release. Everything is built from source per the per-binding READMEs under crates/xalen-python, crates/xalen-node and crates/xalen-wasm. The workspace definition itself documents a build subtlety: xalen-python is a PyO3 extension module whose cdylib needs Python at link time, so it stays in the workspace members for cargo check but is omitted from default-members, and it is built with maturin develop from its own directory. The same care appears around the Hipparcos data crate, which a bare cargo build must not compile. For now, adopting XALEN means vendoring source and owning the build, which is the normal cost of an early research-grade library.
Limits and honest disclosures
The README is unusually explicit about its own weak spots. The Gauquelin sectors house system is an experimental placeholder that currently returns Placidus cusps rather than a true Gauquelin division, and the Qi Men Dun Jia module is marked experimental. The Pluto accuracy is arcminute-class in-window with a committed golden test asserting only a 600 to 610 arcsecond regression ceiling rather than a tighter claim. The analytical Moon error budget is stated against pyswisseph rather than DE440, with the kernel path as the sub-arcsecond option. Traditions outside the Vedic and Western cores vary in depth, with Burmese Mahabote limited to day-sign profiles. None of this is buried: the accuracy page and the inline notes draw the lines precisely, which is the posture you want when a librarys output decides chart boundaries, and it makes the comparison against Swiss Ephemeris a matter of reading published numbers instead of folklore.
Who benefits
Three audiences fit. Astrology application developers get a single dependency that covers panchang, divisional charts, dashas, compatibility and 19 languages for localized labels, which is most of what a consumer astrology product needs, without a C compile step on every target. Researchers and precision hobbyists get the DE440 kernel path, the published error budgets and reproducible tests, so claims can be checked rather than trusted. Rust projects needing astronomy generally can use the ephem, time and coords crates without touching the astrology layers at all, since the workspace keeps them separable. The counterweights are real: nothing is on a registry yet, the API will move before 1.0, and the full tradition surface means some modules are deeper than others. As a foundation bet, the zero-unsafe core, thread-safety and Apache-2.0 licence make it a reasonable one to track now and adopt at first registry release.
Editorial conclusion
Take XALEN Ephemeris if you are building astrology software and want a dependency-light, auditable engine rather than wrapping Swiss Ephemeris, because the accuracy report is published and reproducible through the committed golden tests, the core has zero unsafe Rust, and the tradition coverage from Vedic dashas to Arabic Lots is unusually wide. Treat the registry situation as the main caveat: the crates, the PyPI wheel and the npm packages are not published yet, so everything is built from source, and the Python extension needs maturin specifically. Load the DE440 kernel when sub-arcsecond Moon positions matter, and use the analytical engine when shipping zero data files matters more. For an astrology stack that has long meant one C library, this is the first credible pure-Rust alternative with its evidence in the open.
Frequently asked questions
Can I install XALEN Ephemeris from Crates.io or PyPI?
Not yet. The README states the Rust crates, the PyPI xalen wheel and the npm packages are not published, with the registry badges as placeholders, so you build from source per the per-binding READMEs.
How accurate is the analytical engine without data files?
Against JPL DE440 the Sun agrees to 0.21 arcseconds and Mercury through Saturn to 0.76 arcseconds or better, the analytical Moon reaches about 2.8 arcseconds RMS against pyswisseph, and loading the DE440 kernel brings the Moon sub-arcsecond.
Which astrological traditions does it cover?
The README lists Vedic modules such as dasha, shadbala, KP and panchang, Western aspects, dignities and 97 Arabic Lots, Chinese BaZi and Zi Wei Dou Shu, plus Lal Kitab, I Ching, numerology, Korean Saju, Nine Star Ki and others, with Gauquelin sectors and Qi Men Dun Jia marked experimental.
Community notes