Skip to content

vacp2p/nim-intops

Repository files navigation

intops

intops is a Nim library with ready-to-use core primitives for CPU-sized integers. It is intended to be used as a foundation for other libraries that rely on manipulations with big integers, e.g. cryptography libraries.

intops offers a clean high-level API that hides the implementation details of an operation behind a dispatcher which tries to offer the best implementation for the given environment. However, you can override the dispatcher's choice and call any implementation manually.

intops aims to satisfy the following requirements:

  1. Offer a complete set of arithmetic primitives on signed and unsigned integers necessary to build bignum and cryptography-focuced libraries: addition, subtraction, multiplication, division, and composite operations.
  2. Support 64- and 32-bit integers.
  3. Support 64- and 32-bit CPUs.
  4. Support Windows, Linux, and macOS.
  5. Support GCC-compatible and MSVC compilers.
  6. Support runtime and compile time usage.
  7. Offer the best implementaion for each combination of CPU, OS, C compiler, and usage time.
  8. Allow the user to pick the implementation manually.

License

Licensed and distributed under either of

or

at your option. This file may not be copied, modified, or distributed except according to those terms.

About

intops is a Nim library with ready-to-use core primitives for CPU-sized integers.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHEv2
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages