-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Xinyu Yang edited this page Jan 12, 2026
·
3 revisions
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.
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:
-
Performance: At its core,
rssnis 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. - Expressiveness: The library provides a rich, user-friendly API for constructing and manipulating complex mathematical expressions.
-
Extensibility:
rssnis 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. -
Interoperability: A stable C-compatible Foreign Function Interface (FFI) allows
rssnto be integrated with other programming languages, such as Python, C++, and C, making its powerful features accessible in a wider range of applications.
- 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
cdylibis available for integration with other languages.
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 dualExpr/DAGrepresentation and the FFI strategy. - Core Modules: An overview of the main modules and their functionalities.
-
Usage: Practical examples and guides on how to use
rssnin your own projects.
We hope this wiki helps you get the most out of rssn.