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

Minimize external header dependencies #151

Open
jagerman opened this issue Nov 22, 2024 · 0 comments
Open

Minimize external header dependencies #151

jagerman opened this issue Nov 22, 2024 · 0 comments
Labels

Comments

@jagerman
Copy link
Member

Currently the libquic public headers directly include ngtcp2, libevent, and oxenc, which means any application building against libquic must necessarily also build against the upstream dependencies. It ought to be possible to eliminate those, though, to make them private dependencies of libquic (i.e. to only include them from inside src/, but not include/.).

Just to take one example: quic/crypto.hpp currently includes ngtcp2 headers, but only appears to need them for the conn_ref member, which could instead be implemented as a struct ngtcp2_crypto_conn_ref; predeclaration and changing conn_ref to a unique_ptr, and adding an explicit destructor in the header with TLSSession::~TLSSession() = default; in the .cpp.

Obviously this is just one case of many, but it would be nice to privatize the dependencies.

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

No branches or pull requests

1 participant