Rust translation of libmpdec from mpdecimal 4.0.1, produced by c2rust. One
source tree builds for all targets; the configuration is selected by
target_pointer_width:
- 64-bit targets: CONFIG_64 (
uint128) - 32-bit targets: CONFIG_32 (
ansi32)
The crate exports the C ABI of libmpdec (staticlib, rlib).
Cargo.toml,src/: the translated crate, written byc2rust/install.py. Do not edit by hand. Regenerate withc2rust/transpile-all.sh.c2rust/: the translation pipeline, its run log (c2rust/RUNS.md) and the test scripts. See c2rust/README.md.libmpdec/,configure.ac: the C sources and header configuration of mpdecimal 4.0.1, which are the input of the translation.tests/: the short tests of mpdecimal 4.0.1, unmodified.testit-2.5.1/: mpdecimal-testit 2.5.1, the long tests. The featuretest-hooksis needed only for these tests.
The upstream C tests are linked with the crate's staticlib:
CRATE=root c2rust/test-short.sh macos-aarch64-uint128 # one target
CRATE=root c2rust/test-all.sh # all targetsThe crate is frozen on the short tests (tests/runshort.sh,
tests/runshort_alloc.sh). They pass on macOS aarch64/x86_64, Linux
aarch64/x86_64/i686/s390x/armv7, wasm32-wasip1 and Windows x86_64, with and
without test-hooks.
BSD-2-Clause, see COPYRIGHT.txt.