惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
WordPress大学
WordPress大学
月光博客
月光博客
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Google DeepMind News
Google DeepMind News
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
博客园 - 司徒正美
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
Blog — PlanetScale
Blog — PlanetScale
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
L
LangChain Blog
腾讯CDC
T
The Blog of Author Tim Ferriss
量子位

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Compute astrology charts in the browser: no node-gyp, no ...
Xalen Technologies · 2026-06-25 · via DEV Community
Cover image for Compute astrology charts in the browser: no node-gyp, no .se1 files, no AGPL

Xalen Technologies

If you've wired Swiss Ephemeris into a Node astrology app, you know the ritual. You npm install sweph, and now every machine needs Python plus a C/C++ toolchain, because the package compiles Swiss's C code via node-gyp at install time (make/gcc on Linux, Xcode on macOS, Visual C++ Build Tools on Windows).

It works on your laptop. Then it explodes:

  • Apple Silicon: node-gyp can't find full Xcode behind Command Line Tools.
  • Slim Docker / CI images: no Python, no build-essential, so the install dies.
  • Serverless: the .node binary you built locally won't load on Amazon Linux (wrong arch or glibc).

Then there's the data. Neither sweph nor swisseph bundles the .se1 ephemeris files; you download them yourself and point the library at a path. The modern set is 2 MB, the full GitHub set is 100 MB. And since 2.10.1, sweph is AGPL-3.0 (LGPL only under a professional license), a real obligation to weigh for a closed-source SaaS backend.

The pure-Rust alternative

XALEN Ephemeris is an analytical engine written entirely in Rust and licensed Apache-2.0. Three things make it interesting for JS/TS devs:

  • No node-gyp. The Node addon is napi-rs, which ships prebuilt per-platform binaries via npm. No Python, no C compiler, no compile step.
  • A real WASM build via wasm-bindgen, so you compute charts client-side in the browser: no server round-trip, no backend copyleft.
  • Zero data files. The core math (VSOP87A, ELP2000-82, IAU precession/nutation, an 8,870-star catalog) is analytical and compiled into the binary. No .se1 to host.
import init, * as xalen from "xalen-ephemeris"; // WASM build, runs in the browser
await init(); // load the .wasm module
const chart = xalen.computeChart({ datetime: "1990-04-12T08:30:00Z", lat: 28.6, lon: 77.2 });
console.log(chart); // planet longitudes, house cusps, etc.

Swiss via Node XALEN (pure Rust)
Build deps node-gyp + Python + C compiler none: prebuilt binary / .wasm
Runtime data .se1 files (2 to 100 MB) none, compiled in
Browser / WASM possible via Emscripten native wasm-bindgen
License AGPL-3.0 / professional Apache-2.0

To be fair, Swiss can be compiled to WASM (Emscripten ports exist, and its built-in Moshier mode is file-free). So the honest edge isn't capability, it's delivery: pure Rust straight to WASM, with no Emscripten/MEMFS shim and no data files to bundle.

Honest caveat: XALEN is young and not on npm or PyPI yet (crates.io currently serves an older 0.3.1 line). Today this is a watch-and-prototype story, not a drop-it-into-prod one.

Repo: github.com/vedika-io/xalen-ephemeris. Would you ship ephemeris math to the client, or is server-side non-negotiable for you?