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

Break out the ASN1 primitives into their own crate or feature? #9

Open
scouten-adobe opened this issue Apr 5, 2023 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@scouten-adobe
Copy link
Contributor

I'm wondering if it would be possible to break out the ASN1 primitives in the asn1 folder as their own independent crate or as a feature of the CMS crate that we could use independently? The rest of the crate brings in dependencies that we can't support (notably blocking calls on reqwest that can't compile on some of our targeted platforms).

@indygreg
Copy link
Owner

indygreg commented Apr 8, 2023

reqwest is an optional feature of the cryptography-message-syntax crate and is disabled by default. I thought Cargo was smart enough to elide crates from optional dependencies?

If there are solid reasons to split out the ASN.1 types into their own crate, we can do it. But I'd prefer they remain where they are.

@indygreg indygreg added the enhancement New feature or request label Apr 8, 2023
@scouten-adobe
Copy link
Contributor Author

I think it could be done in place by using crate features here. Would you welcome a PR if I spend the time on it?

@indygreg
Copy link
Owner

indygreg commented Jun 3, 2023

Yes, I would welcome PRs to add features to make dependency bloat optional.

@latonis
Copy link

latonis commented Feb 26, 2024

I've gone ahead and created the PR (#21) to break out reqwest into a feature. To prevent breaking changes, I added the http feature to include reqwest and included it in the default feature set.

To avoid bringing down reqwest and its dep list, one can do the following in Cargo.toml:

cryptographic-message-syntax = { version = "0.26.0", default-features = false }

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

No branches or pull requests

3 participants