rust-GSL
rust-GSL copied to clipboard
Feature request: add static linking option
It would be nice if the crate supports static linking with the GSL via a Cargo feature flag. The most of scientific crates with bindings provide such an option, e.g. ndarray-linalg
, fftw
, netcdf
and hdf5
So basically doing that: https://github.com/rust-math/fftw/blob/master/fftw-sys/src/lib.rs#L13-L16? If so, feel free to send a PR. :)
I mean something like this: https://github.com/rust-math/fftw/blob/master/fftw-sys/src/lib.rs#L3-L4 and this: https://github.com/rust-math/fftw/tree/master/fftw-src
I thing it would require creating gsl-src
crate which will be dedicated to hold sources for the current GSL release and compile it to a static library. While we have it we could add a feature to gsl
and gsl-sys
saying if we use statically compiled GSL.
Would you accept PR doing something like this?
Oh I see, then no. I don't want to embed the sources of the C library and handle its compilation myself.
Thank you for the answer
Sorry, I probably miss-understood you. Would it be acceptable to introduce a Cargo feature forcing static links against a locally installed static GSL?
If it doesn't need to run a C compiler to do so, then I'm fine with it.