rhai-bigint: Arbitrary-Precision BigInt Arithmetic
rhai-bigint is an independent Rhai package that provides seamless, arbitrary-precision BigInt
arithmetic via the num-bigint crate.
See https://docs.rs/rhai-bigint for the list of functions.
On
crates.io:rhai-bigintOn
GitHub:rhaiscript/rhai-bigintPackage name:
BigIntPackage
Dependency
Cargo.toml:
[dependencies]
rhai = "1.25.0"
rhai-bigint = "0.1" # use rhai-bigint crate
Load Package into Engine
use rhai::Engine;
use rhai::packages::Package; // needed for 'Package' trait
use rhai_bigint::BigIntPackage;
let mut engine = Engine::new();
// Create new 'BigIntPackage' instance
let bigint = BigIntPackage::new();
// Load the package into the `Engine`
bigint.register_into_engine(&mut engine);
Features
| Feature | Description | Default? |
|---|---|---|
sync | enables rhai/sync support | no |