Use features to make some dependencies optional #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 enablesbase64
, required for reading and writing compressed MOCs as base64)memmap
(enablesmemmap2
, required for all of the FITS file IO)skymap
(enablescolorous
,mapproj
, andpng
, required for image saving)serde
(only enablesserde
, required forSerialize
andDeserialize
on stuff incdshealpix::nested::map::mom::impls::ported_from_mom_builder
)sort
(enablesbincode
,toml
,memmap
, andserde
, required forcdshealpix::nested::sort
)