Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add static linking option #105

Open
hombit opened this issue Aug 8, 2021 · 6 comments
Open

Feature request: add static linking option #105

hombit opened this issue Aug 8, 2021 · 6 comments

Comments

@hombit
Copy link

hombit commented Aug 8, 2021

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

@GuillaumeGomez
Copy link
Owner

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. :)

@hombit
Copy link
Author

hombit commented Aug 12, 2021

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?

@GuillaumeGomez
Copy link
Owner

Oh I see, then no. I don't want to embed the sources of the C library and handle its compilation myself.

@hombit
Copy link
Author

hombit commented Aug 12, 2021

Thank you for the answer

@hombit hombit closed this as completed Aug 12, 2021
@hombit
Copy link
Author

hombit commented Aug 14, 2021

Sorry, I probably miss-understood you. Would it be acceptable to introduce a Cargo feature forcing static links against a locally installed static GSL?

@hombit hombit reopened this Aug 14, 2021
@GuillaumeGomez
Copy link
Owner

If it doesn't need to run a C compiler to do so, then I'm fine with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants