msquic icon indicating copy to clipboard operation
msquic copied to clipboard

Support vcpkg

Open nibanks opened this issue 4 years ago • 6 comments

Describe the feature you'd like supported

It'd be great to integrate MsQuic with vcpkg: https://github.com/Microsoft/vcpkg

nibanks avatar Apr 02 '21 02:04 nibanks

I actually looked for this package on vcpkg also. Two things I noticed that might be useful changes before that:

  • Currently, the msquic target is hardcoded as a SHARED library (as opposed to respecting the BUILD_SHARED_LIBS cmake var)
  • It might be useful to have QUIC_BUILD_DIR default to PROJECT_BINARY_DIR if not supplied as another standard convention

jeremyong avatar Apr 02 '21 04:04 jeremyong

I estimated this is possible with the current vcpkg mainstream, and got some errors related to OSSL_ENCRYPTION_LEVEL. It's actually an OPENSSL_NO_QUIC related issue, so I think https://github.com/quictls/openssl.git needs to be registered to support this project.

I have 2 questions at this point.

  1. Is there any policy or guide for pre-installed OpenSSL in this project?
  2. Is there any other option for QUIC_TLS=openssl instead of quictls/openssl?

luncliff avatar May 02 '21 15:05 luncliff

  1. Is there any policy or guide for pre-installed OpenSSL in this project?

It depends on the scenario. On Linux, you can use the pre-installed v1.1.1 libcrypto.so that some distros have and build MsQuic so that libtls.so (from quictls repo) is statically linked. Or you can statically link the entire OpenSSL dependency (libcrypto and libtls) from quictls into MsQuic (this solution is generally also what is used on Windows if OpenSSL is used).

  1. Is there any other option for QUIC_TLS=openssl instead of quictls/openssl?

Nope. quictls is a fork of OpenSSL that also adds QUIC protocol support. The official OpenSSL branch is still a long ways off from supporting the QUIC protocol, so until that happens we must use this fork instead.

[S]o I think https://github.com/quictls/openssl.git needs to be registered to support this project.

That kind of seems reasonable. I suspect however the official OpenSSL is registered with vcpkg should be easily copy/pasted to support quictls as well. The only difference between the two (for the most part) are additional APIs. The other option would be that building MsQuic just internally submodules and builds it's own copy of quictls. I'm not an expert on which solution would be better.

nibanks avatar May 02 '21 16:05 nibanks

Got it. I'll try to make PR for quictls registration. But it may take some days to check configurations in multiple platforms. (Considering Windows/Linux first)

luncliff avatar May 04 '21 02:05 luncliff

Create a PR for quictls in https://github.com/microsoft/vcpkg/pull/17949

I used the code version 2021-05-03, but I don't think the commit is for release.
Please let me know if the version of quictls/openssl is decided.

luncliff avatar May 15 '21 09:05 luncliff

Create a PR for quictls in https://github.com/microsoft/vcpkg/pull/17949

I used the code version 2021-05-03, but I don't think the commit is for release.
Please let me know if the version of quictls/openssl is decided.

Are you asking which release of quictls to add? We're currently using the latest 1.1.1 release, not the 3.0.

nibanks avatar May 15 '21 14:05 nibanks