Closed roberts-pumpurs closed 6 months ago
rustls-cert-gen is not intended for use as a library. You should use rcgen instead.
I'm going to close this for now based on our preference to discourage library use of the CLI crate.
rustls-cert-gen is not intended for use as a library.
It looks like we fell into a weird in-between here where the CLI tool is structured around a lib.rs
, and some elements are pub
, yet we recommend not using it as a library.
I think that recommendation is correct (it's a shame to drag in the extra deps like bpaf
and anyhow
for a library use-case) but perhaps we should take an action to make it seem less appealing?
@roberts-pumpurs Can you speak to whether there's something missing from rcgen
-proper that made you reach for rustls-cert-gen
instead?
No, rcgen
is fine. I just liked the builder pattern on the CLI — nothing else, really. And given that it was published on crates.io and had a lib.rs that (at first glance) exported everything that I'd need, it made me want to reach for that rather than the more "low-level" regen
crate.
Makes sense, I'm also a fan of the builder pattern :+1: Thanks for the reply.
This was preventing me from using
rustls-cert-gen
as a library. Also re-exportrcgen
crate to access shared types.