rssn 0.2.0

A comprehensive scientific computing library for Rust, aiming for feature parity with NumPy, SciPy, and SymPy.
Documentation

rssn: A High-Performance Scientific Computing Library for Rust

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

rssn is an open-source scientific computing library for Rust, combining a high-performance symbolic computation engine with numerical methods and physics simulations.

At its core, rssn utilizes a Directed Acyclic Graph (DAG) to represent mathematical expressions, ensuring that they are always in a canonical form. This allows for highly efficient memory use and computational speed.


✨ Key Features

  • Efficient DAG-based Expression Model: Expressions are stored as a canonical DAG, ensuring that identical subexpressions are represented by a single node in memory for maximum efficiency.
  • Advanced Symbolic Algebra: A powerful Computer Algebra System (CAS) that goes beyond simple simplification:
    • Polynomial Algebra: Includes GrΓΆbner basis computation for solving polynomial systems.
    • Simplification with Relations: Can simplify expressions with respect to polynomial side-relations (e.g., simplifying x^2 to 1 - y^2 given x^2 + y^2 - 1 = 0).
  • 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.
  • Stable FFI Interface: A robust C-compatible foreign function interface (cdylib) is available for integration with other languages like Python, C++, and Fortran.

πŸš€ Quick Start

Add rssn to your Rust project:

cargo add rssn

Then, perform a simple symbolic differentiation:

use rssn::symbolic::core::Expr;
use rssn::symbolic::calculus::differentiate;

// Define a variable 'x'
let x = Expr::new_variable("x");

// Define the expression: sin(x)
let expr = Expr::new_sin(x);

// Differentiate with respect to 'x'
let derivative = differentiate(&expr, "x");

// The result will be cos(x)
println!("The derivative of {} is: {}", expr, derivative);

For more advanced examples, such as simplification with relations, please see the API documentation.


πŸ—ΊοΈ Roadmap

  • v0.1.0 β€” Finalize core symbolic engine, expand simplification rules.
  • v0.2.0 β€” Stabilization release, expand numerical methods.
  • v0.3.0 β€” Performance improvements & broader algorithm coverage.
  • v0.4.0 β€” Optional FFI for HPC, start development of rsst scripting toolkit.
  • v1.0.0 β€” Full API stabilization.

🀝 Contributing

We welcome contributions of all kinds β€” bug fixes, performance optimizations, new algorithms, and documentation improvements. See CONTRIBUTING.md for detailed guidelines.


πŸ‘₯ Maintainers & Contributors


πŸ“œ License

Licensed under the Apache 2.0. See LICENSE for details.


πŸ“œ Architecture

See ARCHITECTURE for details.


πŸ“œ Code Stastics

See CODE_STASTICS for details.


πŸ“œ Attributions

See ATTRIBUTIONS for details.


πŸ“œ Security

See SECURITY for details.


πŸ“œ Code Of Conduct

See CODE_OF_CONDUCT for details.

Report of abuse are fully avalible in this project.

A Note from the Author

As one of the primary author, I extend my deepest gratitude for your interest in this project.

I am a high school student in mainland China with an interest in the field of hep-th and computing science. Due to my demanding academic commitments, sometimes my time is limited, and my responses to issues and core pull requests which need my review may sometimes be delayed.

And also, as one of the mission of Apich, we will continue to test the edges of the current AI system assisted coding and development. Discussions on that is welcomed but only without hate.

I sincerely appreciate all of your patience and understanding, and I welcome any contribution from the community.

--- Pana Yang