New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@fusionstrings/swiss-eph

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fusionstrings/swiss-eph

Swiss Ephemeris WASM binding for Deno, Node.js and Browser

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

@fusionstrings/swiss-eph

Swiss Ephemeris astronomical calculation library compiled to WebAssembly for cross-platform JavaScript/TypeScript usage, with idiomatic Rust bindings.

crates.io docs.rs License: AGPL-3.0

Features

  • Cross-platform: Works in Deno, Node.js, browsers, and edge runtimes (Cloudflare Workers)
  • Rust Bindings: Complete FFI and safe Rust API for native performance
  • High precision: Bit-level accuracy matching native Swiss Ephemeris calculations
  • Complete API: 95+ functions for planetary positions, houses, eclipses, and more
  • Zero dependencies: Self-contained WASM module with built-in Moshier ephemeris
  • TypeScript: Full type definitions with TSDoc documentation

Installation (JS/TS)

Deno / JSR

import { load } from "jsr:@fusionstrings/swiss-eph";

Node.js / npm

npm install @fusionstrings/swiss-eph
import { load } from "@fusionstrings/swiss-eph";

Quick Start (JS/TS)

import { Constants, load } from "@fusionstrings/swiss-eph";

// Initialize the Swiss Ephemeris
const eph = await load();

// Calculate Julian Day for a date
const jd = eph.swe_julday(2024, 6, 15, 12.0, Constants.SE_GREG_CAL);

// Get Sun's position
const { xx, error } = eph.swe_calc_ut(
  jd,
  Constants.SE_SUN,
  Constants.SEFLG_SPEED,
);
console.log(`Sun longitude: ${xx[0]}°`);

Rust Usage

Add this to your Cargo.toml:

[dependencies]
swiss-eph = "0.1.0"

Quick Start (Rust)

use swisseph_x::safe::*;
use swisseph_x::*;

fn main() {
    let jd = julday(2024, 1, 1, 12.0);
    let flags = CalcFlags::new().with_speed();
    let sun = calc(jd, SE_SUN, flags).unwrap();
    println!("Sun longitude: {:.6}°", sun.longitude);
}

API Overview (JS/TS)

FunctionDescription
swe_calc / swe_calc_utPlanetary positions (TT/UT)
swe_houses / swe_houses_exHouse cusps and angles
swe_julday / swe_revjulJulian Day conversions
swe_sidtimeSidereal time
swe_deltatDelta T (TT - UT)

License

AGPL-3.0 - Same license as the Swiss Ephemeris library.

This software is based on the Swiss Ephemeris by Astrodienst AG. See https://www.astro.com/swisseph/ for more information.

Credits

  • Swiss Ephemeris by Astrodienst AG
  • WASM compilation using WASI SDK and wasmbuild

Keywords

astrology

FAQs

Package last updated on 18 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts