rain-math-float 0.1.5

Decimal floating-point arithmetic for Rainlang / DeFi smart contracts. Packs a 224-bit signed coefficient and 32-bit signed exponent into a single bytes32, with exact decimal semantics (no NaN, Infinity, or negative zero — operations error on nonsense). Rust bindings delegate to the Solidity reference via an in-memory EVM so on-chain and off-chain results match exactly.
Documentation
[package]
name = "rain-math-float"
version = "0.1.5"
edition = "2021"
license = "LicenseRef-DCL-1.0"
description = "Decimal floating-point arithmetic for Rainlang / DeFi smart contracts. Packs a 224-bit signed coefficient and 32-bit signed exponent into a single bytes32, with exact decimal semantics (no NaN, Infinity, or negative zero — operations error on nonsense). Rust bindings delegate to the Solidity reference via an in-memory EVM so on-chain and off-chain results match exactly."
homepage = "https://github.com/rainlanguage/rain.math.float"
repository = "https://github.com/rainlanguage/rain.math.float"

[lib]
crate-type = ["rlib"]

[dependencies]
alloy = { version = "1.0.9", features = ["sol-types", "json-rpc"] }
thiserror = "2.0.12"
serde = "1.0.219"
# wasm-bindgen must be a direct dependency: the #[wasm_bindgen] macro emits
# `::wasm_bindgen` paths, and without a direct dep on the crate they fail to
# resolve and the macro recurses without bound on opaque-class structs (Float).
wasm-bindgen = "0.2.122"
wasm-bindgen-utils = "0.1.2"

[target.'cfg(not(target_family = "wasm"))'.dependencies]
revm = { version = "25.0.0", default-features = false, features = [
  "c-kzg",
  "portable",
  "std",
  "tracer",
] }

[target.'cfg(target_family = "wasm")'.dependencies]
revm = { version = "25.0.0", default-features = false, features = [
  "kzg-rs",
  "portable",
  "std",
  "tracer",
] }
getrandom = { version = "0.2.11", features = ["js", "js-sys"] }

[dev-dependencies]
alloy = { version = "1.0.9", features = ["sol-types", "json-rpc", "arbitrary"] }
anyhow = "1.0.98"
proptest = "1.7.0"
serde_json = "1.0.140"