今日已更新 339 条资讯 | 累计 19899 条内容
关于我们

标签:#Astronomy

找到 16 篇相关文章

AI 资讯

Stop shipping a 1990s C library to compute planets. Xalen is the pure-Rust, Apache-2.0 replacement for Swiss Ephemeris.

Stop shipping a 1990s C library to compute planets. Xalen is the pure-Rust, Apache-2.0 replacement for Swiss Ephemeris. If your app does astrology, you already know the dependency. Swiss Ephemeris: a C library from the 1990s, a folder of binary .se1 data files you have to ship and locate at runtime, and a license that is either AGPL or you pay for a commercial seat. For 30 years it was the only serious option, so everyone just swallowed the cost. That era is over. Xalen Ephemeris is a full planetary engine written in pure Rust, with no unsafe in the core engine (the only unsafe lives in the optional FFI, Node and WASM binding crates), released under Apache-2.0. No C toolchain. No data files to ship. No copyleft clause waiting for the day you try to make money. It is built to replace Swiss Ephemeris in production, not to admire it from a distance. Python is live on PyPI and the Rust crates are live on crates.io: # Python pip install xalen # Rust cargo add xalen-ephem xalen-time xalen-ayanamsa xalen-vedic Node and WASM build straight from the repo. Repo: https://github.com/vedika-io/xalen-ephemeris Switching takes one line Xalen ships a pyswisseph-shaped API on purpose. Migrating an existing codebase is a find-and-replace: # before import swisseph as swe # after import xalen.swe as swe jd = swe . julday ( 1990 , 6 , 15 , 10.5 ) xx , ok = swe . calc_ut ( jd , swe . SUN , swe . FLG_SWIEPH | swe . FLG_SPEED ) # same argument order, same SE_/SEFLG_/SIDM_ constants, same tuple layout Your function calls do not change. Your data-file directory disappears. Your license problem disappears. Xalen vs Swiss Ephemeris Line them up and the gap is hard to miss. Swiss Ephemeris is C from the 1990s, shipped as a native library you compile and link, fed by .se1 data files you have to bundle and locate at runtime, under AGPL or a paid commercial license. Xalen is pure Rust with no unsafe in the core engine, thread-safe, with no native dependency and no data files for the analytical eng

2026-06-03 原文 →