Skip to content

Use features to make some dependencies optional #17

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

matt-cornell
Copy link
Contributor

This is a big library that's able to do a lot of things, but for my usage, I only need the basic HEALPix operations. While one solution could be to split this into multiple crates, I made the less invasive change of adding feature flags for things that aren't necessary for the library's functioning. Since there's not a standard way of documenting feature flags, I haven't documented them, but I'd be happy to do so however you'd like.

The new features and dependencies they enable are:

  • base64 (only enables base64, required for reading and writing compressed MOCs as base64)
  • memmap (enables memmap2, required for all of the FITS file IO)
  • skymap (enables colorous, mapproj, and png, required for image saving)
  • serde (only enables serde, required for Serialize and Deserialize on stuff in cdshealpix::nested::map::mom::impls::ported_from_mom_builder)
  • sort (enables bincode, toml, memmap, and serde, required for cdshealpix::nested::sort)

@fxpineau
Copy link
Member

@matt-cornell
Thank you very much: it is something I also had in mind (to make features to lower the number of dependencies when only interested in core functionalities), and you did it 👍
As soon as I have time, I will have a look at the PR.

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

Successfully merging this pull request may close these issues.

2 participants