Skip to content
Xinyu Yang edited this page Jan 12, 2026 · 3 revisions

Welcome to the rssn Wiki

Crates.io Docs.rs License Scc Count Badge Code Scc Count Badge Blanks Scc Count Badge Lines Scc Count Badge Comments Scc Count Badge Cocomo Scc Count Badge Effort Discord Server DOI

rssn is an open-source scientific computing library for Rust, combining a high-performance symbolic computation engine with numerical methods and physics simulations. This wiki provides a deep dive into its architecture, core modules, and usage patterns.

Core Philosophy

The primary goal of rssn is to provide a powerful, efficient, and flexible tool for both symbolic and numerical computing. It is built on the following principles:

  1. Performance: At its core, rssn is designed for speed and memory efficiency. The use of a Directed Acyclic Graph (DAG) to represent mathematical expressions is a key architectural choice that enables the canonicalization of expressions, minimizing redundancy and computational overhead.
  2. Expressiveness: The library provides a rich, user-friendly API for constructing and manipulating complex mathematical expressions.
  3. Extensibility: rssn is designed to be modular. Feature flags allow users to include only the functionality they need, from the core symbolic engine to numerical methods, physics simulations, and foreign function interfaces.
  4. Interoperability: A stable C-compatible Foreign Function Interface (FFI) allows rssn to be integrated with other programming languages, such as Python, C++, and C, making its powerful features accessible in a wider range of applications.

Key Features

  • Efficient DAG-based Expression Model: All expressions are canonicalized and stored in a DAG, ensuring that identical subexpressions are represented by a single node in memory.
  • Advanced Computer Algebra System (CAS):
    • Powerful simplification engine.
    • Polynomial algebra, including Gröbner basis computation.
    • Expression simplification with respect to polynomial side-relations.
  • Symbolic Calculus: Functions for differentiation, integration, limits, and series expansion.
  • Numerical Methods: A rich collection of algorithms for numerical integration, optimization, and solving differential equations.
  • Versatile Output: Render expressions as pretty-printed text, LaTeX, or Typst.
  • Safe, Stable FFI Interface: A robust C-compatible cdylib is available for integration with other languages.

Navigating the Wiki

This wiki is divided into several sections to help you understand the project:

  • Architecture: A deep dive into the core design of rssn, including the dual Expr/DAG representation and the FFI strategy.
  • Core Modules: An overview of the main modules and their functionalities.
  • Usage: Practical examples and guides on how to use rssn in your own projects.

We hope this wiki helps you get the most out of rssn.

Clone this wiki locally