Registry / utility / gmp-mpfr-sys

gmp-mpfr-sys

JSON →
library1.7.1rscratesunverified

Rust FFI bindings for the GMP, MPFR, and MPC arbitrary-precision arithmetic libraries.

# Cargo.toml [dependencies] gmp-mpfr-sys = "1.7.1"
INSTALL
IMPORT
SIG · GMP-MPFR-SYS
G
gmp-mpfr-sys
utilityrustv1.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mpz_t
use gmp_mpfr_sys::gmp::mpz_t;

Minimal usage showing GMP integer initialization via FFI.

use gmp_mpfr_sys::gmp::mpz_t; fn main() { let mut a: mpz_t = unsafe { std::mem::zeroed() }; unsafe { gmp_mpfr_sys::gmp::mpz_init_set_str(&mut a, "12345678901234567890\0".as_ptr() as *const i8, 10); } println!("GMP integer initialized"); }
Debug
Known issues
gotchaRequires system libraries (GMP, MPFR, MPC) to be installed; build may fail without them.
fix
Install development packages: libgmp-dev, libmpfr-dev, libmpc-dev (Linux) or use vcpkg (Windows).
affects: >=1.0.0
Upgrade
Version history
1.7.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
gmp-mpfr-sys — cargo add gmp-mpfr-sys · libregistry