Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

Adding symplex to Your Project

cargo add symplex

Or add it directly to your Cargo.toml:

[dependencies]
symplex = "0.3"

Minimum Supported Rust Version

symplex requires Rust 1.93+ (Edition 2024). Check your version with:

rustc --version

If you need to update:

rustup update stable

Platform Support

symplex is pure Rust with no C dependencies. It builds on any platform that Rust targets, including:

  • Linux (x86_64, aarch64)
  • macOS (x86_64, Apple Silicon)
  • Windows (x86_64)
  • WebAssembly (via wasm-pack — see the symplex-wasm crate)

All dependencies are MIT or Apache-2.0 licensed. There are no LGPL, GPL, or proprietary dependencies.

Feature Flags

symplex currently has no optional feature flags. All functionality is included by default. This may change in future releases as the library grows.

Companion Crates

CratePurpose
symplex-macrosThe expr!, matrix!, eq!, dim!, rule! procedural macros (a dependency of symplex; you do not add it yourself)
symplex-buildBuild-time code generation: run the CAS in build.rs and emit no_std Rust for firmware
symplex-wasmwasm-bindgen bindings with a persistent Session for browser notebooks and demos

Dependencies

The library depends on the following crates, all of which are widely used in the Rust ecosystem:

CratePurpose
num-bigint, num-rational, num-traits, num-integerArbitrary-precision arithmetic
smallvecStack-allocated small vectors for expression nodes
parking_lotFast reader-writer locks for thread-safe contexts
astro-floatArbitrary-precision floating-point for numerical evaluation
serde, serde_jsonJSON serialization of expressions
tracingOptional structured logging (enable with RUST_LOG=symplex=debug)
typenumCompile-time type-level integers for dimensional analysis
thiserrorError type derivation

The proc-macro crates (symplex-macros) additionally depend on syn, quote, and proc-macro2 for the expr!, matrix!, dim!, and related macros.

Verifying Your Installation

Create a file and run it to confirm everything works:

use symplex::prelude::*;

fn main() {
    let ctx = Context::new();
    let x = ctx.symbol("x");
    let f = x.powi(2).diff(&x);
    println!("d/dx(x²) = {f}");
    // Should print: d/dx(x²) = 2*x
}
cargo run

Tracing / Debug Output

symplex uses the tracing crate for structured logging. To see what the library is doing internally (simplification steps, integration strategy selection, etc.):

RUST_LOG=symplex=debug cargo run --example quickstart

This is useful for understanding why a particular computation produces the result it does, or for diagnosing performance issues.

Next Steps

Continue to First Steps to create your first symbolic expressions.