#math #library

GSL

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

35 releases (13 stable)

Uses old Rust 2015

7.0.0 Nov 6, 2023
7.0.0-rc1 Jul 26, 2023
6.0.0 Sep 17, 2021
5.0.0 Sep 8, 2021
0.4.11 Nov 26, 2014

#57 in Algorithms

Download history 372/week @ 2024-07-20 397/week @ 2024-07-27 211/week @ 2024-08-03 280/week @ 2024-08-10 253/week @ 2024-08-17 384/week @ 2024-08-24 457/week @ 2024-08-31 453/week @ 2024-09-07 619/week @ 2024-09-14 429/week @ 2024-09-21 453/week @ 2024-09-28 394/week @ 2024-10-05 190/week @ 2024-10-12 269/week @ 2024-10-19 629/week @ 2024-10-26 249/week @ 2024-11-02

2,711 downloads per month
Used in 16 crates

GPL-3.0+

2MB
57K SLoC

rust-GSL

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

The minimum support Rust version is 1.54.

Installation

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

Linux

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

macOS

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.

Windows

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

Usage

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

[dependencies]
GSL = "7.0"

You can see examples in the examples folder.

Building

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:

[dependencies.GSL]
version = "2"
features = ["v2_1"]

Documentation

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

> cargo doc --open

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

License

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

Dependencies