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

Fetch SDL development libraries automatically during installation #681

Closed
ottworks opened this issue Jul 7, 2017 · 6 comments
Closed

Fetch SDL development libraries automatically during installation #681

ottworks opened this issue Jul 7, 2017 · 6 comments

Comments

@ottworks
Copy link

ottworks commented Jul 7, 2017

Having manual installation procedures tends to get messy when working several levels down of dependency (ggez, in my case). Ideally, installation via crate should be fully automatic with no user action required.

@prail
Copy link

prail commented Jul 8, 2017

Definitely a good idea!

@Cobrand
Copy link
Member

Cobrand commented Jul 8, 2017

Ideally, installation via crate should be fully automatic with no user action required

Now that's an opinion, and a point of view that I don't share. Crates are bits of rust code first, and I feel like it should be kept this way. That's the same with other packages from other package managers; take nodejs and npm for instance, I don't think I've seen a package that would install a library automatically, it you don't have a dependency on your system, it fails. If you need a library, you must use your package manager...

Now I understand where you are coming from and this is a totally valid viewpoint, but I will allow this to be in this crate via an optional feature, and it has to be disabled by default. Pull requests are very welcome for this one, as I'm probably not going to do it myself.

@ottworks
Copy link
Author

ottworks commented Jul 8, 2017

For the record, the rust-portaudio crate does this.

@Cobrand
Copy link
Member

Cobrand commented Jul 8, 2017

portaudio and ffmpeg are the 2 crates that I know with that state of mind, and I'm definitely not a fan of both for having tested them. On the other hand, other widely used C bindings libraries such as postgres and cairo don't do it.

sqlite3 actually has a feature "bundled" to fetch and build automatically the library on crate usage.

The last one is the best of both worlds: if you don't want to use it, then it's exactly the same as any other crate, but otherwise you can enable a feature to have the library bundled within the crate itself.

@photex
Copy link
Contributor

photex commented Aug 16, 2017

Having been the instigator and contributor of adding the "bundled" feature to several crates, I propose the same be done for rust-sdl2.
I can start a PR and test on Windows if others can test on MacOS and Linux.

@rminderhoud
Copy link

Can close this one since #720 got merged?

@Cobrand Cobrand closed this as completed Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants