npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@justinelliottcobb/amari-wasm

v0.19.1

Published

WebAssembly bindings for Amari mathematical computing library - geometric algebra, tropical algebra, automatic differentiation, measure theory, fusion systems, and information geometry

Readme

@justinelliottcobb/amari-wasm v0.19.1

Unified Mathematical Computing Library with High-Precision WebAssembly Support

npm version CI License: MIT

Amari is a comprehensive mathematical computing library that brings advanced algebraic systems to JavaScript/TypeScript through WebAssembly. Features high-precision arithmetic for spacecraft orbital mechanics and relativistic physics calculations with pure Rust implementation and no native dependencies for universal deployment.

Features

| Module | Crate | Since | Description | |--------|-------|-------|-------------| | Geometric Algebra | amari-core | v0.1 | Multivectors, rotors, geometric products for 3D rotations and spatial transformations | | Tropical Algebra | amari-tropical | v0.9.3 | Max-plus semiring operations for optimization and neural network applications | | Automatic Differentiation | amari-dual | v0.9.3 | Forward-mode AD with dual numbers for exact derivatives | | Cellular Automata | amari-automata | v0.9.4 | Geometric cellular automata with multivector states | | Holographic Memory | amari-fusion | v0.12.3 | Vector Symbolic Architecture for associative memory with binding and bundling | | Measure Theory | amari-measure | v0.10.0 | Lebesgue integration, probability measures, and measure-theoretic foundations | | Probability | amari-probabilistic | v0.13.0 | Distributions on multivector spaces, MCMC sampling, Monte Carlo estimation | | Functional Analysis | amari-functional | v0.15.0 | Hilbert spaces, linear operators, spectral decomposition, Sobolev spaces | | Optical Fields | amari-holographic | v0.15.1 | GA-native Lee hologram encoding for DMD displays and VSA-based optical processing | | Computational Topology | amari-topology | v0.16.0 | Simplicial complexes, homology, persistent homology, Morse theory | | Dynamical Systems | amari-calculus | v0.19.1 | ODE solvers, stability analysis, bifurcation diagrams, Lyapunov exponents | | Enumerative Geometry | amari-enumerative | v0.19.1 | WDVV curve counting, matroids, CSM classes, stability conditions | | Probabilistic Contracts | amari-flynn | v0.19.1 | SMT-LIB2 proof obligations, Monte Carlo verification, rare event tracking | | GF(2) Algebra | amari-core, amari-enumerative | v0.19.1 | GF(2) linear algebra, binary Clifford algebra, coding theory, matroid representability, Kazhdan-Lusztig polynomials | | Orbital Mechanics | amari-relativistic | v0.9.4 | Spacetime algebra (Cl(1,3)) with high-precision trajectory calculations |

Also includes bindings for: amari-network (geometric network analysis), amari-optimization (gradient descent, NSGA-II), amari-info-geom (Fisher metrics, statistical manifolds), amari-calculus (differential geometry, manifolds).

High-Precision Arithmetic

  • Pure Rust Backend: dashu-powered arithmetic with no native dependencies
  • Universal Deployment: Same precision guarantees across desktop, web, and edge environments
  • Orbital-Grade Tolerance: Configurable precision for critical trajectory calculations

Installation

npm install @justinelliottcobb/amari-wasm

Or with yarn:

yarn add @justinelliottcobb/amari-wasm

Quick Start

import init, { WasmMultivector, WasmRotor } from '@justinelliottcobb/amari-wasm';

async function main() {
  await init();

  // Create basis vectors
  const e1 = WasmMultivector.basis_vector(0);
  const e2 = WasmMultivector.basis_vector(1);

  // Compute geometric product
  const product = e1.geometric_product(e2);
  console.log(product.to_string()); // e12 (bivector)

  // Create a rotor for 90-degree rotation
  const rotor = WasmRotor.from_axis_angle(
    WasmMultivector.basis_vector(2),
    Math.PI / 2
  );

  // Rotate a vector
  const vector = WasmMultivector.from_coefficients(
    new Float64Array([1, 0, 0, 0, 0, 0, 0, 0])
  );
  const rotated = rotor.rotate_vector(vector);

  // Clean up WASM memory
  e1.free(); e2.free(); product.free();
  rotor.free(); vector.free(); rotated.free();
}

main();

See the docs/ directory for detailed guides and API references for each module.

Use Cases

  • Computer Graphics: 3D rotations and transformations using rotors
  • Physics Simulations: Geometric algebra for electromagnetic fields and relativistic calculations
  • Machine Learning: Tropical neural networks and automatic differentiation
  • Optimization: Tropical algebra for shortest path and scheduling problems
  • Scientific Computing: High-performance mathematical operations with orbital-grade precision
  • Probability & Statistics: Measure theory, numerical integration, and probabilistic modeling
  • Formal Verification: SMT-LIB2 proof obligation generation for browser-based verification workflows
  • Symbolic AI: Holographic memory for associative reasoning and concept binding
  • Holographic Displays: Lee hologram encoding for DMD and SLM devices
  • Topological Data Analysis: Persistent homology for shape and feature detection
  • Chaos Theory: Lorenz attractors, bifurcation diagrams, Lyapunov exponents
  • Algebraic Geometry: Rational curve counting, Schubert calculus, Gromov-Witten invariants
  • Error-Correcting Codes: Binary linear codes (Hamming, Reed-Muller, Golay) for communication systems
  • Finite Field Combinatorics: Grassmannian point counting, matroid representability, Kazhdan-Lusztig polynomials
  • Spacecraft Trajectory Planning: High-precision orbital mechanics in web applications

Building from Source

# Clone the repository
git clone https://github.com/justinelliottcobb/Amari.git
cd Amari/amari-wasm

# Install dependencies
npm install

# Build WASM module
npm run build

# Run tests
npm test

Contributing

Contributions are welcome. Please see CONTRIBUTING.md for details.

License

MIT License - see LICENSE for details.

Acknowledgments

  • Built with Rust and wasm-bindgen
  • Inspired by geometric algebra libraries like GAViewer and Ganja.js
  • Tropical algebra concepts from discrete mathematics

Contact


Made with Rust by the Amari team