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

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.

Documentation

See https://docs.rs/rhai-bigint for the list of functions.

On crates.io: rhai-bigint

On GitHub: rhaiscript/rhai-bigint

Package 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

FeatureDescriptionDefault?
syncenables rhai/sync supportno