Skip to content

ChiefWoods/solana-math

Repository files navigation

solana-math

A small family of Rust crates for safe and deterministic math utilities used in Solana programs and supporting libraries.

Crates

  • basis-points: A validated BasisPoints type (0..=10_000) with optional rust_decimal conversions.
  • solana-safe-math: Checked arithmetic and conversion traits that return explicit errors instead of panicking.
  • wrapped-decimal: A fixed-size, POD-safe wrapper for rust_decimal::Decimal using a stable 16-byte representation.

Workspace commands

just check
just test
just doc
just changeset    # add release intent (requires cargo-changeset)
just version      # bump versions + changelogs from changesets
just publish <crate>

Install the release helper once: cargo install cargo-changeset.

Notes

  • Optional Anchor derives are available behind the anchor feature where applicable.

About

A small family of Rust crates for safe and deterministic math utilities used in Solana programs and supporting libraries.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages