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

split into gdal-sys and gdal crate #25

Closed
jdroenner opened this issue Dec 13, 2016 · 4 comments
Closed

split into gdal-sys and gdal crate #25

jdroenner opened this issue Dec 13, 2016 · 4 comments
Assignees

Comments

@jdroenner
Copy link
Member

Split rust-gdal into a gdal-sys and a (rust-) gdal crate.

(I'm currently working on this)

@jdroenner jdroenner self-assigned this Dec 13, 2016
@frewsxcv
Copy link
Member

Sounds great! I've been meaning to do this for a while.

@jdroenner
Copy link
Member Author

@frewsxcv should i add the rust-sys repository to georust? ;)

@frewsxcv
Copy link
Member

I'd recommend having both gdal and gdal-sys library crates exist within the same repository. This way, if there are ever updates to gdal-sys, gdal will get updated to reflect the changes at the same time.

There a couple strategies for doing this:

gdal-sys within gdal

/Cargo.toml (config for 'gdal')
/src/ (source files for 'gdal')
/gdal-sys/ (crate for 'gdal-sys')
/gdal-sys/Cargo.toml (config for 'gdal-sys')
/gdal-sys/src/ (source files for 'gdal-sys')

An example: https://github.com/alexcrichton/git2-rs

gdal-sys and gdal separate w/ cargo workspace

cargo workspaces are relatively new: https://github.com/rust-lang/rfcs/blob/master/text/1525-cargo-workspace.md

/Cargo.toml (workspace config)
/gdal/ (crate for 'gdal')
/gdal/Cargo.toml (config for 'gdal')
/gdal/src/ (source files for 'gdal')
/gdal-sys/ (crate for 'gdal-sys')
/gdal-sys/Cargo.toml (config for 'gdal-sys')
/gdal-sys/src/ (source files for 'gdal-sys')

An example: https://github.com/servo/webrender


Nowadays I prefer the second option

@jdroenner
Copy link
Member Author

I've been wondering how to do this and the examples are really helpful, thanks! Cargo workspaces look really nice.

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