Skip to content

A Swift wrapper around libgmp compatible with the OpenSSL-based Bignum library

License

Notifications You must be signed in to change notification settings

mdaxter/BignumGMP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BignumGMP

A Swift wrapper around the GNU Multiple Precision Arithmetic Library (libgmp), largely compatible with the OpenSSL-based Swift big number library.

Prerequisites

This package uses CGMP, which, in turn makes available libgmp for Swift. Therefore, prior to compiling, you need to have a copy of libgmp installed for your operating system.

Linux

For apt-based Linux distributions (such as Debian or Ubuntu), you need to install the libgmp-dev package first:

sudo apt install libgmp-dev

macOS

Install gmp via Homebrew:

brew install gmp

Compiling and Testing

This library uses the Swift Package Manager. To build and test use:

swift build  -Xcc -I/usr/local/include -Xlinker -L/usr/local/lib
swift test   -Xcc -I/usr/local/include -Xlinker -L/usr/local/lib

Limitations

At the moment, only a small number of BigInt operations corresponding to the libgmp mpz type are implemented.

About

A Swift wrapper around libgmp compatible with the OpenSSL-based Bignum library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages