#mathematics #library #gsl


A rust binding for the GSL (the GNU scientific library)

33 releases (6 major breaking)

Uses old Rust 2015

6.0.0 Sep 17, 2021
5.0.0 Sep 8, 2021
4.0.4 Sep 7, 2021
4.0.1 Jun 9, 2021
0.4.11 Nov 26, 2014

#8 in Math

Download history 560/week @ 2021-09-29 362/week @ 2021-10-06 482/week @ 2021-10-13 187/week @ 2021-10-20 180/week @ 2021-10-27 188/week @ 2021-11-03 145/week @ 2021-11-10 387/week @ 2021-11-17 531/week @ 2021-11-24 490/week @ 2021-12-01 348/week @ 2021-12-08 938/week @ 2021-12-15 253/week @ 2021-12-22 236/week @ 2021-12-29 280/week @ 2022-01-05 276/week @ 2022-01-12

1,001 downloads per month
Used in less than 11 crates


57K SLoC


A Rust binding for the GSL library (the GNU Scientific Library).

The minimum support Rust version is 1.54.


This binding requires the GSL library library (version >= 2) to be installed:


# on debian based systems:
sudo apt-get install libgsl0-dev


brew install gsl

Apple silicon

Homebrew installs libraries under /opt/homebrew/include on Apple silicon to maintain backward compatibility with Rosetta 2.

After gsl has been installed in the usual way, use the environment variable:

RUSTFLAGS='-L /opt/homebrew/include'

before cargo run, cargo build, etc., to tell the compiler where gsl is located.


Instructions are available there: https://www.gnu.org/software/gsl/extras/native_win_builds.html.


This crate works with Cargo and is on crates.io. Just add the following to your Cargo.toml file:

GSL = "4.0"

You can see examples in the examples folder.


To build rgsl, just run cargo build. However, if you want to use a specific version, you'll need to use the cargo features. For example:

cargo build --features v2_1

If a project depends on this version, don't forget to add in your Cargo.toml:

version = "2"
features = ["v2_1"]


You can access the rgsl documentation locally, just build it:

> cargo doc --open

Then open this file with an internet browser: file:///{rgsl_location}/target/doc/rgsl/index.html

You can also access the latest build of the documentation via the internet here.


rust-GSL is a wrapper for GSL, therefore inherits the GPL license.