diff --git a/fizz/CMakeLists.txt b/fizz/CMakeLists.txt index 0e853feeb82..b8c3f735d51 100644 --- a/fizz/CMakeLists.txt +++ b/fizz/CMakeLists.txt @@ -9,6 +9,10 @@ endif() project("fizz" VERSION ${PACKAGE_VERSION} LANGUAGES CXX C) +# Set for FetchContent to skip find_package(fizz) +set(fizz_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" + CACHE INTERNAL "fizz source directory") + if (NOT DEFINED CPACK_GENERATOR) set(CPACK_GENERATOR "RPM") endif() @@ -49,7 +53,10 @@ set(BIN_INSTALL_DIR bin CACHE STRING set(CMAKE_INSTALL_DIR lib/cmake/fizz CACHE STRING "The subdirectory where CMake package config files should be installed") -find_package(folly CONFIG REQUIRED) +# If folly is being built from source (FetchContent), skip find_package +if (NOT DEFINED folly_SOURCE_DIR) + find_package(folly CONFIG REQUIRED) +endif() find_package(fmt CONFIG REQUIRED) find_package(OpenSSL REQUIRED) @@ -112,134 +119,80 @@ if(aegis_FOUND) endif() include(FizzOptions) -include(FizzSources) - -configure_file(fizz-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/generated/fizz/fizz-config.h) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/generated/fizz/fizz-config.h DESTINATION ${INCLUDE_INSTALL_DIR}/fizz/) - -set(FIZZ_HEADER_DIRS - backend - backend/liboqs - backend/openssl - backend/openssl/certificate - backend/openssl/crypto - backend/openssl/crypto/aead - backend/openssl/crypto/exchange - backend/openssl/crypto/signature - client - compression - crypto - crypto/aead - crypto/exchange - crypto/hpke - crypto/signature - crypto/openssl - experimental/crypto/exchange - experimental/ktls - experimental/util - extensions/clientpadding - extensions/delegatedcred - extensions/exportedauth - extensions/tokenbinding - protocol - protocol/clock - protocol/ech - record - server - util - tool -) - -set(FIZZ_TEST_HEADER_DIRS - client/test - compression/test - crypto/aead/test - crypto/exchange/test - crypto/test - crypto/hpke/test - protocol/test - protocol/clock/test - protocol/ech/test - record/test - server/test - tool/test - util/test - test -) - -foreach(dir ${FIZZ_HEADER_DIRS}) - file(GLOB_RECURSE headers ${dir}/*.h) - set(FIZZ_HEADERS - ${FIZZ_HEADERS} - ${headers}) -endforeach() - -foreach(dir ${FIZZ_TEST_HEADER_DIRS}) - file(GLOB_RECURSE headers ${dir}/*.h) - set(FIZZ_TEST_HEADERS - ${FIZZ_TEST_HEADERS} - ${headers}) -endforeach() - - -add_library(fizz - ${FIZZ_LIBRARY_SOURCES} -) - -if (BUILD_SHARED_LIBS) - set_target_properties(fizz - PROPERTIES VERSION ${PACKAGE_VERSION}) -endif() - -get_filename_component(FIZZ_BASE_DIR ${CMAKE_SOURCE_DIR}/.. ABSOLUTE) - -target_include_directories( - fizz - PUBLIC +include(FizzFunctions) + +# Set the generated directory for FetchContent compatibility +set(FIZZ_GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated) + +configure_file(fizz-config.h.in ${FIZZ_GENERATED_DIR}/fizz/fizz-config.h) +install(FILES ${FIZZ_GENERATED_DIR}/fizz/fizz-config.h + DESTINATION ${INCLUDE_INSTALL_DIR}/fizz/) + +# Collect all headers via recursive glob (like folly does) +file(GLOB_RECURSE FIZZ_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +# Filter out test, facebook, and other non-public directories +list(FILTER FIZZ_HEADERS EXCLUDE REGEX "/test/") +list(FILTER FIZZ_HEADERS EXCLUDE REGEX "/facebook/") +list(FILTER FIZZ_HEADERS EXCLUDE REGEX "/buck_config/") +list(FILTER FIZZ_HEADERS EXCLUDE REGEX "/build/") + +# Collect test headers separately +file(GLOB_RECURSE FIZZ_TEST_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +list(FILTER FIZZ_TEST_HEADERS INCLUDE REGEX "/test/") +list(FILTER FIZZ_TEST_HEADERS EXCLUDE REGEX "/facebook/") + +# ============================================================================= +# Configuration interface library (matches //fizz:config BUCK target) +# ============================================================================= +get_filename_component(FIZZ_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. ABSOLUTE) + +add_library(fizz_config INTERFACE) +target_include_directories(fizz_config + INTERFACE $ - $ + $ $ - ${FOLLY_INCLUDE_DIR} - ${OPENSSL_INCLUDE_DIR} - ${sodium_INCLUDE_DIR} - ${ZSTD_INCLUDE_DIR} - PRIVATE - ${GLOG_INCLUDE_DIRS} - ${FIZZ_INCLUDE_DIRECTORIES} ) - - -target_link_libraries(fizz - PUBLIC - ${FOLLY_LIBRARIES} - ${OPENSSL_LIBRARIES} - sodium - Threads::Threads - ZLIB::ZLIB - ${ZSTD_LIBRARY} - PRIVATE - ${GLOG_LIBRARIES} - ${GFLAGS_LIBRARIES} - ${FIZZ_LINK_LIBRARIES} - ${CMAKE_DL_LIBS} - ${LIBRT_LIBRARIES}) - -if (liboqs_FOUND) - target_link_libraries(fizz PRIVATE OQS::oqs) -endif() - -if (aegis_FOUND) - target_link_libraries(fizz PRIVATE aegis::aegis) -endif() - -if ($FIZZ_SHINY_DEPENDENCIES) - add_dependencies(fizz ${FIZZ_SHINY_DEPENDENCIES}) -endif() - -if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) - # Work around C1128: number of sections exceeded object file format limit. - target_compile_options(fizz PUBLIC /bigobj) -endif() +install(TARGETS fizz_config EXPORT fizz-exports) +add_library(fizz::fizz_config ALIAS fizz_config) + +# ============================================================================= +# Build granular libraries from subdirectory CMakeLists.txt files +# Sources are compiled ONCE via OBJECT libraries, then reused for both +# granular .a files and the monolithic libfizz.a +# ============================================================================= + +# Order matters - dependencies must be added first +add_subdirectory(util) +add_subdirectory(protocol/clock) +add_subdirectory(protocol/ech) +add_subdirectory(record) +add_subdirectory(crypto) +add_subdirectory(crypto/aead) +add_subdirectory(crypto/exchange) +add_subdirectory(crypto/hpke) +add_subdirectory(protocol) +add_subdirectory(compression) +add_subdirectory(backend) +add_subdirectory(client) +add_subdirectory(server) +add_subdirectory(extensions/clientpadding) +add_subdirectory(extensions/delegatedcred) +add_subdirectory(extensions/exportedauth) +add_subdirectory(extensions/tokenbinding) +add_subdirectory(experimental/batcher) +add_subdirectory(experimental/client) +add_subdirectory(experimental/crypto) +add_subdirectory(experimental/ktls) +add_subdirectory(experimental/protocol) +add_subdirectory(experimental/server) +add_subdirectory(experimental/util) + +# ============================================================================= +# Create monolithic fizz library and resolve deferred dependencies +# ============================================================================= +fizz_create_monolithic_library() +fizz_resolve_deferred_dependencies() install( TARGETS fizz @@ -247,15 +200,8 @@ install( DESTINATION ${LIB_INSTALL_DIR} ) -# We unfortunately cannot install fizz's headers with the install() -# statement above. install(TARGETS) appears to only support installing -# PUBLIC_HEADER in a flat include directory, and not a deeper tree. -foreach(dir ${FIZZ_HEADER_DIRS}) - get_filename_component(PARENT_DIR "/${dir}" DIRECTORY) - install(DIRECTORY ${dir} DESTINATION "${INCLUDE_INSTALL_DIR}/fizz${PARENT_DIR}" - FILES_MATCHING PATTERN "*.h" - PATTERN "test" EXCLUDE) -endforeach() +# Install headers preserving directory structure (using recursive glob like folly) +fizz_install_headers(fizz ${CMAKE_CURRENT_SOURCE_DIR} ${FIZZ_HEADERS}) # Install CMake package configuration files for fizz include(CMakePackageConfigHelpers) @@ -299,6 +245,11 @@ add_library(fizz_test_support target_link_libraries(fizz_test_support PUBLIC fizz + Folly::folly_init_init + Folly::folly_testing_test_util + Folly::folly_executors_manual_executor + Folly::folly_io_async_scoped_event_base_thread + Folly::folly_detail_base64_detail_base64_api ) # export fizz headers and targets for unit tests utils @@ -310,14 +261,8 @@ install( LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) -foreach(dir ${FIZZ_TEST_HEADER_DIRS}) - get_filename_component(PARENT_DIR "/${dir}" DIRECTORY) - install( - DIRECTORY ${dir} - DESTINATION "${FIZZ_TEST_INSTALL_PREFIX}/include/fizz${PARENT_DIR}" - FILES_MATCHING PATTERN "*.h" - ) -endforeach() +# Install test headers using recursive glob +fizz_install_headers(fizz ${CMAKE_CURRENT_SOURCE_DIR} ${FIZZ_TEST_HEADERS}) macro(add_gtest test_source test_name) add_executable(${test_name} ${test_source} test/CMakeTestMain.cpp) diff --git a/fizz/backend/CMakeLists.txt b/fizz/backend/CMakeLists.txt new file mode 100644 index 00000000000..6b7d5fe7792 --- /dev/null +++ b/fizz/backend/CMakeLists.txt @@ -0,0 +1,88 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# NOTE: This file is manually maintained due to conditional libaegis/liboqs logic. + +fizz_add_library(fizz_backend_libaegis + SRCS libaegis/AEGISCipher.cpp + EXPORTED_DEPS + fizz_config + fizz_crypto_aead_aead + fizz_crypto_aead_cryptoutil + fizz_crypto_crypto + Folly::folly_lang_checked_math +) +if (FIZZ_HAVE_LIBAEGIS) + if(BUILD_SHARED_LIBS) + target_link_libraries(fizz_backend_libaegis INTERFACE aegis::aegis) + else() + target_link_libraries(fizz_backend_libaegis PUBLIC aegis::aegis) + endif() + target_link_libraries(fizz_backend_libaegis_obj PUBLIC aegis::aegis) +endif() + +fizz_add_library(fizz_backend_liboqs + SRCS liboqs/OQSKeyExchange.cpp + EXPORTED_DEPS + fizz_config + fizz_crypto_crypto + fizz_crypto_exchange_key_exchange + Folly::folly_memory +) +if (FIZZ_HAVE_OQS) + if(BUILD_SHARED_LIBS) + target_link_libraries(fizz_backend_liboqs INTERFACE OQS::oqs) + else() + target_link_libraries(fizz_backend_liboqs PUBLIC OQS::oqs) + endif() + target_link_libraries(fizz_backend_liboqs_obj PUBLIC OQS::oqs) +endif() + +fizz_add_library(fizz_backend_openssl + SRCS + openssl/certificate/CertUtils.cpp + openssl/crypto/OpenSSLKeyUtils.cpp + openssl/crypto/Sha.cpp + openssl/crypto/aead/OpenSSLEVPCipher.cpp + openssl/crypto/exchange/OpenSSLKeyExchange.cpp + openssl/crypto/signature/Signature.cpp + EXPORTED_DEPS + fizz_compression_certificate_compressor + fizz_config + fizz_crypto_aead_aead + fizz_crypto_aead_cryptoutil + fizz_crypto_aead_iobuf + fizz_crypto_crypto + fizz_crypto_exchange_key_exchange + fizz_crypto_hasher + fizz_crypto_hkdf + fizz_protocol_certificate + fizz_record_record + Folly::folly_conv + Folly::folly_io_async_ssl_openssl_transport_certificate + Folly::folly_io_iobuf + Folly::folly_lang_assume + Folly::folly_lang_bits + Folly::folly_lang_checked_math + Folly::folly_memory + Folly::folly_portability_openssl + Folly::folly_range + Folly::folly_ssl_openssl_cert_utils + Folly::folly_ssl_openssl_hash + Folly::folly_ssl_openssl_ptr_types + Folly::folly_string +) + +fizz_add_library(fizz_backend_libsodium + SRCS libsodium/crypto/exchange/X25519.cpp + EXPORTED_DEPS + fizz_crypto_crypto + fizz_crypto_exchange_key_exchange + Folly::folly_conv + Folly::folly_io_iobuf + Folly::folly_optional + Folly::folly_range +) diff --git a/fizz/client/CMakeLists.txt b/fizz/client/CMakeLists.txt new file mode 100644 index 00000000000..c952ec10fe5 --- /dev/null +++ b/fizz/client/CMakeLists.txt @@ -0,0 +1,150 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_client_fizz_client_context + SRCS + FizzClientContext.cpp + DEPS + fizz_protocol_default_factory + EXPORTED_DEPS + fizz_client_cert_manager + fizz_client_psk_cache + fizz_compression_cert_decompression_manager + fizz_protocol_certificate + fizz_protocol_clock_system_clock + fizz_protocol_ech_grease_ech_setting + fizz_protocol_factory + fizz_record_record +) + +fizz_add_library(fizz_client_actions + EXPORTED_DEPS + fizz_client_psk_cache + fizz_protocol_actions + fizz_protocol_params + fizz_util_variant + Folly::folly_c_portability +) + +fizz_add_library(fizz_client_state + SRCS + State.cpp + EXPORTED_DEPS + fizz_client_client_extensions + fizz_client_fizz_client_context + fizz_protocol_certificate + fizz_protocol_ech_encryption + fizz_protocol_key_scheduler + fizz_protocol_types + fizz_record_record_layer +) + +fizz_add_library(fizz_client_cert_manager + SRCS + CertManager.cpp + EXPORTED_DEPS + fizz_protocol_certificate +) + +fizz_add_library(fizz_client_protocol + SRCS + ClientProtocol.cpp + DEPS + fizz_crypto_hpke_utils + fizz_crypto_utils + fizz_protocol_certificate_verifier + fizz_protocol_ech_encryption + fizz_protocol_ech_grease_ech + fizz_protocol_protocol + fizz_protocol_state_machine + fizz_record_record + EXPORTED_DEPS + fizz_client_actions + fizz_client_client_extensions + fizz_client_fizz_client_context + fizz_client_psk_cache + fizz_client_state + fizz_protocol_ech_encrypted_client_hello + fizz_util_status +) + +fizz_add_library(fizz_client_early_data_rejection + SRCS + EarlyDataRejectionPolicy.cpp + EXPORTED_DEPS + fizz_client_state +) + +fizz_add_library(fizz_client_fizz_client + EXPORTED_DEPS + fizz_client_fizz_client_context + fizz_client_protocol + fizz_client_psk_cache + fizz_protocol_certificate_verifier + fizz_protocol_fizz_base + Folly::folly_lang_switch +) + +fizz_add_library(fizz_client_async_fizz_client + EXPORTED_DEPS + fizz_client_client_extensions + fizz_client_early_data_rejection + fizz_client_fizz_client + fizz_client_fizz_client_context + fizz_client_protocol + fizz_protocol_async_fizz_base + fizz_protocol_default_certificate_verifier + fizz_protocol_exporter + fizz_util_tracer + Folly::folly_io_socket_option_map +) + +fizz_add_library(fizz_client_psk_cache + EXPORTED_DEPS + fizz_protocol_certificate + fizz_protocol_types + fizz_record_record +) + +fizz_add_library(fizz_client_ech_policy + EXPORTED_DEPS + fizz_protocol_ech_encrypted_client_hello + Folly::folly_optional +) + +fizz_add_library(fizz_client_psk_serialization_utils + SRCS + PskSerializationUtils.cpp + DEPS + fizz_record_record + Folly::folly_io_iobuf + EXPORTED_DEPS + fizz_client_psk_cache + fizz_protocol_certificate +) + +fizz_add_library(fizz_client_synchronized_lru_psk_cache + SRCS + SynchronizedLruPskCache.cpp + EXPORTED_DEPS + fizz_client_psk_cache + Folly::folly_container_evicting_cache_map + Folly::folly_synchronized +) + +fizz_add_library(fizz_client_client_extensions + EXPORTED_DEPS + fizz_record_record +) + +fizz_add_library(fizz_client_multi_client_extensions + SRCS + MultiClientExtensions.cpp + EXPORTED_DEPS + fizz_client_client_extensions +) diff --git a/fizz/cmake/FizzFunctions.cmake b/fizz/cmake/FizzFunctions.cmake new file mode 100644 index 00000000000..97d808c8548 --- /dev/null +++ b/fizz/cmake/FizzFunctions.cmake @@ -0,0 +1,401 @@ +# Copyright (c) 2018, Facebook, Inc. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Functions for building granular fizz libraries. + +# Install header files preserving directory structure +# Similar to folly's auto_install_files() +function(fizz_install_headers rootName rootDir) + file(TO_CMAKE_PATH "${rootDir}" rootDir) + string(LENGTH "${rootDir}" rootDirLength) + foreach(fil ${ARGN}) + file(TO_CMAKE_PATH "${fil}" filePath) + string(FIND "${filePath}" "/" rIdx REVERSE) + if(rIdx EQUAL -1) + continue() + endif() + string(SUBSTRING "${filePath}" 0 ${rIdx} filePath) + + string(LENGTH "${filePath}" filePathLength) + string(FIND "${filePath}" "${rootDir}" rIdx) + if(rIdx EQUAL 0) + math(EXPR filePathLength "${filePathLength} - ${rootDirLength}") + string(SUBSTRING "${filePath}" ${rootDirLength} ${filePathLength} fileGroup) + install(FILES ${fil} + DESTINATION ${INCLUDE_INSTALL_DIR}/${rootName}${fileGroup}) + endif() + endforeach() +endfunction() + +# Initialize global properties for tracking targets and deferred dependencies +set_property(GLOBAL PROPERTY FIZZ_COMPONENT_TARGETS) +set_property(GLOBAL PROPERTY FIZZ_DEFERRED_DEPS) +set_property(GLOBAL PROPERTY FIZZ_GRANULAR_INTERFACE_TARGETS) + +# Define a granular fizz library that: +# 1. Compiles sources ONCE via OBJECT library +# 2. Creates a STATIC library for individual linking +# 3. Defers internal fizz deps to be resolved later +# 4. Tracks OBJECT target for monolithic aggregation +# +# Usage: +# fizz_add_library(fizz_crypto_hkdf +# SRCS Hkdf.cpp +# DEPS fizz_crypto_hasher # Private dependencies +# EXPORTED_DEPS fizz_crypto_crypto # Public dependencies (propagated) +# EXTERNAL_DEPS ${SOME_LIBRARY} # External library dependencies +# ) +function(fizz_add_library _target_name) + cmake_parse_arguments( + FIZZ_LIB + "" # Options (boolean flags) + "" # Single-value args + "SRCS;DEPS;EXPORTED_DEPS;EXTERNAL_DEPS" # Multi-value args + ${ARGN} + ) + + set(_sources ${FIZZ_LIB_SRCS}) + if(NOT _sources) + # Legacy support: if no SRCS keyword, treat remaining args as sources + set(_sources ${FIZZ_LIB_UNPARSED_ARGUMENTS}) + endif() + + # Object library name - used for monolithic aggregation + set(_obj_target "${_target_name}_obj") + + # Skip if no sources (header-only library) + list(LENGTH _sources _src_count) + if(_src_count EQUAL 0) + # Header-only: create INTERFACE library + add_library(${_target_name} INTERFACE) + target_include_directories(${_target_name} + INTERFACE + $ + $ + $ + ) + + # Link exported deps for INTERFACE libraries + if(FIZZ_LIB_EXPORTED_DEPS) + target_link_libraries(${_target_name} INTERFACE ${FIZZ_LIB_EXPORTED_DEPS}) + endif() + if(FIZZ_LIB_EXTERNAL_DEPS) + target_link_libraries(${_target_name} INTERFACE ${FIZZ_LIB_EXTERNAL_DEPS}) + endif() + + install(TARGETS ${_target_name} EXPORT fizz-exports) + add_library(fizz::${_target_name} ALIAS ${_target_name}) + return() + endif() + + # 1. Create OBJECT library (compiles sources once) + add_library(${_obj_target} OBJECT ${_sources}) + + if(BUILD_SHARED_LIBS) + set_property(TARGET ${_obj_target} PROPERTY POSITION_INDEPENDENT_CODE ON) + endif() + + target_include_directories(${_obj_target} + PUBLIC + $ + $ + $ + ${FOLLY_INCLUDE_DIR} + ${OPENSSL_INCLUDE_DIR} + ${sodium_INCLUDE_DIR} + ${ZSTD_INCLUDE_DIR} + PRIVATE + ${GLOG_INCLUDE_DIRS} + ${FIZZ_INCLUDE_DIRECTORIES} + ) + + target_compile_features(${_obj_target} PUBLIC cxx_std_20) + + # Link external dependencies on OBJECT library + target_link_libraries(${_obj_target} + PUBLIC + ${OPENSSL_LIBRARIES} + sodium + Threads::Threads + PRIVATE + ${GLOG_LIBRARIES} + ${GFLAGS_LIBRARIES} + ${FIZZ_LINK_LIBRARIES} + ${CMAKE_DL_LIBS} + ${LIBRT_LIBRARIES} + ) + + # Link explicit external deps + if(FIZZ_LIB_EXTERNAL_DEPS) + target_link_libraries(${_obj_target} PUBLIC ${FIZZ_LIB_EXTERNAL_DEPS}) + endif() + + # Separate fizz internal deps (defer) from external deps (link immediately) + set(_immediate_deps "") + set(_fizz_deps "") + foreach(_dep IN LISTS FIZZ_LIB_EXPORTED_DEPS) + if(_dep MATCHES "^fizz_") + list(APPEND _fizz_deps ${_dep}) + else() + # Folly::*, external libs, etc. - link immediately + list(APPEND _immediate_deps ${_dep}) + endif() + endforeach() + + # Debug output + message(STATUS "fizz_add_library(${_target_name})") + message(STATUS " EXPORTED_DEPS: ${FIZZ_LIB_EXPORTED_DEPS}") + message(STATUS " Immediate deps: ${_immediate_deps}") + message(STATUS " Deferred fizz deps: ${_fizz_deps}") + + # Link non-fizz deps immediately - they provide include paths needed at compile time + if(_immediate_deps) + target_link_libraries(${_obj_target} PUBLIC ${_immediate_deps}) + endif() + + # For shared builds: link Folly::folly to OBJECT libraries to get transitive + # includes (Boost, etc.). We can't link fizz internal deps because they're + # INTERFACE libraries linking to monolithic fizz, creating cycles. + # Also link optional dependencies (OQS, aegis) for headers that need them. + if(BUILD_SHARED_LIBS) + target_link_libraries(${_obj_target} PUBLIC Folly::folly) + if(liboqs_FOUND) + target_link_libraries(${_obj_target} PUBLIC OQS::oqs) + endif() + if(aegis_FOUND) + target_link_libraries(${_obj_target} PUBLIC aegis::aegis) + endif() + endif() + + # Defer internal fizz dependencies until all targets are created + # Only for static builds - in shared builds, fizz internal deps are INTERFACE + # libraries linking to monolithic fizz, which would create cycles + if(NOT BUILD_SHARED_LIBS) + if(_fizz_deps) + list(JOIN _fizz_deps "," _deps_str) + set_property(GLOBAL APPEND PROPERTY FIZZ_DEFERRED_DEPS + "${_obj_target}|PUBLIC|${_deps_str}" + ) + endif() + if(FIZZ_LIB_DEPS) + list(JOIN FIZZ_LIB_DEPS "," _deps_str) + set_property(GLOBAL APPEND PROPERTY FIZZ_DEFERRED_DEPS + "${_obj_target}|PRIVATE|${_deps_str}" + ) + endif() + endif() + + # Track OBJECT target for monolithic aggregation + set_property(GLOBAL APPEND PROPERTY FIZZ_COMPONENT_TARGETS ${_obj_target}) + + # 2. Create the granular library target + if(BUILD_SHARED_LIBS) + # For shared builds: create INTERFACE library that will link to monolithic fizz + add_library(${_target_name} INTERFACE) + + target_include_directories(${_target_name} + INTERFACE + $ + $ + $ + ) + + # Track this target to link to fizz after monolithic library is created + set_property(GLOBAL APPEND PROPERTY FIZZ_GRANULAR_INTERFACE_TARGETS ${_target_name}) + + install(TARGETS ${_target_name} EXPORT fizz-exports) + else() + # For static builds: create STATIC library + add_library(${_target_name} STATIC $) + + target_include_directories(${_target_name} + PUBLIC + $ + $ + $ + ${FOLLY_INCLUDE_DIR} + ${OPENSSL_INCLUDE_DIR} + ${sodium_INCLUDE_DIR} + ${ZSTD_INCLUDE_DIR} + PRIVATE + ${GLOG_INCLUDE_DIRS} + ${FIZZ_INCLUDE_DIRECTORIES} + ) + + target_compile_features(${_target_name} PUBLIC cxx_std_20) + + # Link external dependencies on STATIC library + target_link_libraries(${_target_name} + PUBLIC + ${OPENSSL_LIBRARIES} + sodium + Threads::Threads + PRIVATE + ${GLOG_LIBRARIES} + ${GFLAGS_LIBRARIES} + ${FIZZ_LINK_LIBRARIES} + ${CMAKE_DL_LIBS} + ${LIBRT_LIBRARIES} + ) + + # Link explicit external deps + if(FIZZ_LIB_EXTERNAL_DEPS) + target_link_libraries(${_target_name} PUBLIC ${FIZZ_LIB_EXTERNAL_DEPS}) + endif() + + # Link non-fizz deps immediately (reuse _immediate_deps computed above) + if(_immediate_deps) + target_link_libraries(${_target_name} PUBLIC ${_immediate_deps}) + endif() + + # Defer internal fizz dependencies for STATIC library too (reuse _fizz_deps) + if(_fizz_deps) + list(JOIN _fizz_deps "," _deps_str) + set_property(GLOBAL APPEND PROPERTY FIZZ_DEFERRED_DEPS + "${_target_name}|PUBLIC|${_deps_str}" + ) + endif() + if(FIZZ_LIB_DEPS) + list(JOIN FIZZ_LIB_DEPS "," _deps_str) + set_property(GLOBAL APPEND PROPERTY FIZZ_DEFERRED_DEPS + "${_target_name}|PRIVATE|${_deps_str}" + ) + endif() + + install( + TARGETS ${_target_name} + EXPORT fizz-exports + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + ) + endif() + + # Create alias for the library + add_library(fizz::${_target_name} ALIAS ${_target_name}) +endfunction() + +# Resolve all deferred dependencies after all targets have been created +# Call this after all add_subdirectory() calls and fizz_create_monolithic_library() +function(fizz_resolve_deferred_dependencies) + # Allow linking targets defined in other directories + cmake_policy(SET CMP0079 NEW) + + get_property(_deferred_deps GLOBAL PROPERTY FIZZ_DEFERRED_DEPS) + + foreach(_spec IN LISTS _deferred_deps) + # Parse the spec: "target|visibility|dep1,dep2,..." + string(REPLACE "|" ";" _parts "${_spec}") + list(LENGTH _parts _len) + if(_len LESS 3) + continue() + endif() + + list(GET _parts 0 _target) + list(GET _parts 1 _visibility) + list(GET _parts 2 _deps_str) + + # Split deps by comma + string(REPLACE "," ";" _deps "${_deps_str}") + + # Filter to only existing targets (skip deps that weren't generated) + set(_valid_deps "") + foreach(_dep IN LISTS _deps) + if(TARGET ${_dep}) + list(APPEND _valid_deps ${_dep}) + endif() + endforeach() + + if(_valid_deps) + target_link_libraries(${_target} ${_visibility} ${_valid_deps}) + endif() + endforeach() +endfunction() + +# Create the monolithic fizz library from all component OBJECT libraries +# Call this after all add_subdirectory() calls, before fizz_resolve_deferred_dependencies() +function(fizz_create_monolithic_library) + get_property(_component_targets GLOBAL PROPERTY FIZZ_COMPONENT_TARGETS) + + if(NOT _component_targets) + message(STATUS "No component targets found, skipping monolithic library creation") + return() + endif() + + # Collect all object files from component targets + set(_all_objects) + foreach(_target IN LISTS _component_targets) + list(APPEND _all_objects $) + endforeach() + + # Create the monolithic library + add_library(fizz ${_all_objects}) + + if(BUILD_SHARED_LIBS) + set_property(TARGET fizz PROPERTY POSITION_INDEPENDENT_CODE ON) + set_property(TARGET fizz PROPERTY VERSION ${PACKAGE_VERSION}) + endif() + + target_include_directories(fizz + PUBLIC + $ + $ + $ + ${FOLLY_INCLUDE_DIR} + ${OPENSSL_INCLUDE_DIR} + ${sodium_INCLUDE_DIR} + ${ZSTD_INCLUDE_DIR} + PRIVATE + ${GLOG_INCLUDE_DIRS} + ${FIZZ_INCLUDE_DIRECTORIES} + ) + + target_compile_features(fizz PUBLIC cxx_std_20) + + # Link all dependencies + target_link_libraries(fizz + PUBLIC + Folly::folly + ${OPENSSL_LIBRARIES} + sodium + Threads::Threads + ZLIB::ZLIB + ${ZSTD_LIBRARY} + PRIVATE + ${GLOG_LIBRARIES} + ${GFLAGS_LIBRARIES} + ${FIZZ_LINK_LIBRARIES} + ${CMAKE_DL_LIBS} + ${LIBRT_LIBRARIES} + ) + + if (liboqs_FOUND) + target_link_libraries(fizz PRIVATE OQS::oqs) + endif() + + if (aegis_FOUND) + target_link_libraries(fizz PRIVATE aegis::aegis) + endif() + + if ($FIZZ_SHINY_DEPENDENCIES) + add_dependencies(fizz ${FIZZ_SHINY_DEPENDENCIES}) + endif() + + if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) + target_compile_options(fizz PUBLIC /bigobj) + endif() + + # Create alias for consistency + add_library(fizz::fizz ALIAS fizz) + + # For shared builds: link all granular INTERFACE targets to the monolithic library + if(BUILD_SHARED_LIBS) + cmake_policy(SET CMP0079 NEW) + get_property(_interface_targets GLOBAL PROPERTY FIZZ_GRANULAR_INTERFACE_TARGETS) + foreach(_target IN LISTS _interface_targets) + target_link_libraries(${_target} INTERFACE fizz) + endforeach() + endif() +endfunction() diff --git a/fizz/compression/CMakeLists.txt b/fizz/compression/CMakeLists.txt new file mode 100644 index 00000000000..dd39d800a74 --- /dev/null +++ b/fizz/compression/CMakeLists.txt @@ -0,0 +1,59 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# NOTE: This file is manually maintained due to optional brotli dependency. + +# Header-only interface library +fizz_add_library(fizz_compression_certificate_compressor + EXPORTED_DEPS fizz_record_record +) + +fizz_add_library(fizz_compression_cert_decompression_manager + SRCS CertDecompressionManager.cpp + EXPORTED_DEPS fizz_compression_certificate_compressor +) + +fizz_add_library(fizz_compression_zlib_certificate_compressor + SRCS ZlibCertificateCompressor.cpp + EXPORTED_DEPS fizz_compression_certificate_compressor + EXTERNAL_DEPS ZLIB::ZLIB +) + +fizz_add_library(fizz_compression_zlib_certificate_decompressor + SRCS ZlibCertificateDecompressor.cpp + EXPORTED_DEPS fizz_compression_certificate_compressor + EXTERNAL_DEPS ZLIB::ZLIB +) + +fizz_add_library(fizz_compression_zstd_certificate_compressor + SRCS ZstdCertificateCompressor.cpp + EXPORTED_DEPS fizz_compression_certificate_compressor + EXTERNAL_DEPS ${ZSTD_LIBRARY} +) + +fizz_add_library(fizz_compression_zstd_certificate_decompressor + SRCS ZstdCertificateDecompressor.cpp + EXPORTED_DEPS fizz_compression_certificate_compressor + EXTERNAL_DEPS ${ZSTD_LIBRARY} +) + +# Brotli is optional - only build if found +find_package(Brotli QUIET) +if (Brotli_FOUND OR TARGET brotli::brotlienc) + set(FIZZ_HAVE_BROTLI TRUE CACHE BOOL "Build with Brotli support") + + fizz_add_library(fizz_compression_brotli_certificate_compressor + SRCS BrotliCertificateCompressor.cpp + EXPORTED_DEPS fizz_compression_certificate_compressor + EXTERNAL_DEPS brotli::brotlienc + ) + + fizz_add_library(fizz_compression_brotli_certificate_decompressor + SRCS BrotliCertificateDecompressor.cpp + EXPORTED_DEPS fizz_compression_certificate_compressor + EXTERNAL_DEPS brotli::brotlidec + ) +endif() diff --git a/fizz/crypto/CMakeLists.txt b/fizz/crypto/CMakeLists.txt new file mode 100644 index 00000000000..94dd0549fe7 --- /dev/null +++ b/fizz/crypto/CMakeLists.txt @@ -0,0 +1,56 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_crypto_crypto + SRCS + Crypto.cpp + EXPORTED_DEPS + Folly::folly_io_iobuf + Folly::folly_range +) + +fizz_add_library(fizz_crypto_hasher + SRCS + Hasher.cpp + Hmac.cpp + EXPORTED_DEPS + fizz_crypto_crypto + Folly::folly_io_iobuf +) + +fizz_add_library(fizz_crypto_hkdf + SRCS + Hkdf.cpp + EXPORTED_DEPS + fizz_crypto_crypto + fizz_crypto_hasher + Folly::folly_io_iobuf +) + +fizz_add_library(fizz_crypto_key_derivation + SRCS + KeyDerivation.cpp + EXPORTED_DEPS + fizz_crypto_crypto + fizz_crypto_hkdf + fizz_record_record +) + +fizz_add_library(fizz_crypto_random + EXPORTED_DEPS + Folly::folly_io_iobuf + sodium +) + +fizz_add_library(fizz_crypto_utils + SRCS + Utils.cpp + EXPORTED_DEPS + fizz_config + Folly::folly_range +) diff --git a/fizz/crypto/aead/CMakeLists.txt b/fizz/crypto/aead/CMakeLists.txt new file mode 100644 index 00000000000..14084eeb271 --- /dev/null +++ b/fizz/crypto/aead/CMakeLists.txt @@ -0,0 +1,30 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_crypto_aead_aead + EXPORTED_DEPS + Folly::folly_io_iobuf + Folly::folly_optional +) + +fizz_add_library(fizz_crypto_aead_iobuf + SRCS + IOBufUtil.cpp + EXPORTED_DEPS + Folly::folly_io_iobuf + Folly::folly_range +) + +fizz_add_library(fizz_crypto_aead_cryptoutil + EXPORTED_DEPS + fizz_crypto_aead_aead + fizz_crypto_aead_iobuf + Folly::folly_conv + Folly::folly_memory + Folly::folly_range +) diff --git a/fizz/crypto/exchange/CMakeLists.txt b/fizz/crypto/exchange/CMakeLists.txt new file mode 100644 index 00000000000..35ec4adcff6 --- /dev/null +++ b/fizz/crypto/exchange/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_crypto_exchange_key_exchange + EXPORTED_DEPS + Folly::folly_io_iobuf + Folly::folly_range +) + +fizz_add_library(fizz_crypto_exchange_async_key_exchange + EXPORTED_DEPS + fizz_crypto_exchange_key_exchange + Folly::folly_futures_core +) + +fizz_add_library(fizz_crypto_exchange_hybrid_key_exchange + SRCS + HybridKeyExchange.cpp + EXPORTED_DEPS + fizz_crypto_exchange_key_exchange +) diff --git a/fizz/crypto/hpke/CMakeLists.txt b/fizz/crypto/hpke/CMakeLists.txt new file mode 100644 index 00000000000..4d42f0b898c --- /dev/null +++ b/fizz/crypto/hpke/CMakeLists.txt @@ -0,0 +1,62 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_crypto_hpke_utils + SRCS + Utils.cpp + EXPORTED_DEPS + fizz_crypto_crypto + fizz_crypto_hpke_types + fizz_protocol_types + Folly::folly_optional +) + +fizz_add_library(fizz_crypto_hpke_hkdf + SRCS + Hkdf.cpp + DEPS + fizz_record_record + EXPORTED_DEPS + fizz_crypto_hasher + fizz_crypto_hkdf +) + +fizz_add_library(fizz_crypto_hpke_dhkem + SRCS + DHKEM.cpp + DEPS + Folly::folly_io_iobuf + EXPORTED_DEPS + fizz_crypto_exchange_key_exchange + fizz_crypto_hpke_hkdf + fizz_crypto_hpke_types + fizz_record_record +) + +fizz_add_library(fizz_crypto_hpke_types + EXPORTED_DEPS + Folly::folly_io_iobuf +) + +fizz_add_library(fizz_crypto_hpke_context + SRCS + Context.cpp + DEPS + fizz_crypto_hpke_utils +) + +fizz_add_library(fizz_crypto_hpke_hpke + SRCS + Hpke.cpp + DEPS + fizz_crypto_hpke_types + EXPORTED_DEPS + fizz_crypto_aead_aead + fizz_crypto_hpke_context + fizz_crypto_hpke_dhkem +) diff --git a/fizz/experimental/batcher/CMakeLists.txt b/fizz/experimental/batcher/CMakeLists.txt new file mode 100644 index 00000000000..0d15c03611b --- /dev/null +++ b/fizz/experimental/batcher/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_experimental_batcher_batcher + EXPORTED_DEPS + fizz_experimental_crypto_batch_signature + fizz_experimental_protocol_batch_signature_types + fizz_server_async_self_cert + Folly::folly_futures_shared_promise +) diff --git a/fizz/experimental/client/CMakeLists.txt b/fizz/experimental/client/CMakeLists.txt new file mode 100644 index 00000000000..d2c057dfb18 --- /dev/null +++ b/fizz/experimental/client/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_experimental_client_batch_signature_peer_cert + SRCS + BatchSignaturePeerCert.cpp + EXPORTED_DEPS + fizz_experimental_crypto_batch_signature + fizz_experimental_protocol_batch_signature_types + fizz_protocol_certificate +) diff --git a/fizz/experimental/crypto/CMakeLists.txt b/fizz/experimental/crypto/CMakeLists.txt new file mode 100644 index 00000000000..b2add9b5a87 --- /dev/null +++ b/fizz/experimental/crypto/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_experimental_crypto_merkle_tree + EXPORTED_DEPS + fizz_backend_openssl + fizz_crypto_random + fizz_record_record + Folly::folly_container_f14_hash +) + +fizz_add_library(fizz_experimental_crypto_batch_signature + EXPORTED_DEPS + fizz_experimental_crypto_merkle_tree + fizz_record_record +) diff --git a/fizz/experimental/ktls/CMakeLists.txt b/fizz/experimental/ktls/CMakeLists.txt new file mode 100644 index 00000000000..7937f56ec44 --- /dev/null +++ b/fizz/experimental/ktls/CMakeLists.txt @@ -0,0 +1,35 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_experimental_ktls_ktls + SRCS + AsyncFizzBaseKTLS.cpp + AsyncKTLSSocket.cpp + FizzKTLSCallback.cpp + KTLS.cpp + DEPS + fizz_backend_openssl + fizz_client_state + Folly::folly_file + Folly::folly_portability_sockets + ${GLOG_LIBRARIES} + EXPORTED_DEPS + fizz_crypto_aead_aead + fizz_experimental_util_cert_extraction + fizz_protocol_async_fizz_base + fizz_protocol_key_scheduler + fizz_record_record + fizz_record_record_layer + Folly::folly_c_portability + Folly::folly_exception_wrapper + Folly::folly_expected + Folly::folly_function + Folly::folly_io_async_async_socket + Folly::folly_net_network_socket + ${GLOG_LIBRARIES} +) diff --git a/fizz/experimental/protocol/CMakeLists.txt b/fizz/experimental/protocol/CMakeLists.txt new file mode 100644 index 00000000000..5bc61602843 --- /dev/null +++ b/fizz/experimental/protocol/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_experimental_protocol_batch_signature_factory + EXPORTED_DEPS + fizz_experimental_client_batch_signature_peer_cert + fizz_protocol_factory +) + +fizz_add_library(fizz_experimental_protocol_batch_signature_types + SRCS + BatchSignatureTypes.cpp + EXPORTED_DEPS + fizz_backend_openssl + fizz_record_record +) diff --git a/fizz/experimental/server/CMakeLists.txt b/fizz/experimental/server/CMakeLists.txt new file mode 100644 index 00000000000..8a563af92e8 --- /dev/null +++ b/fizz/experimental/server/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_experimental_server_batch_signature_async_self_cert + EXPORTED_DEPS + fizz_experimental_batcher_batcher + fizz_experimental_crypto_batch_signature + fizz_experimental_protocol_batch_signature_types + fizz_server_async_self_cert + fizz_server_protocol +) diff --git a/fizz/experimental/util/CMakeLists.txt b/fizz/experimental/util/CMakeLists.txt new file mode 100644 index 00000000000..8ddca13700f --- /dev/null +++ b/fizz/experimental/util/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_experimental_util_cert_extraction + EXPORTED_DEPS + fizz_client_async_fizz_client + fizz_server_async_fizz_server +) diff --git a/fizz/extensions/clientpadding/CMakeLists.txt b/fizz/extensions/clientpadding/CMakeLists.txt new file mode 100644 index 00000000000..086694a2ffd --- /dev/null +++ b/fizz/extensions/clientpadding/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_extensions_clientpadding_types + SRCS + Types.cpp + EXPORTED_DEPS + fizz_record_record +) + +fizz_add_library(fizz_extensions_clientpadding_padding_client_extension + SRCS + PaddingClientExtension.cpp + DEPS + fizz_extensions_clientpadding_types + EXPORTED_DEPS + fizz_client_client_extensions +) diff --git a/fizz/extensions/delegatedcred/CMakeLists.txt b/fizz/extensions/delegatedcred/CMakeLists.txt new file mode 100644 index 00000000000..314e91d16a3 --- /dev/null +++ b/fizz/extensions/delegatedcred/CMakeLists.txt @@ -0,0 +1,97 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_extensions_delegatedcred_delegated_credential + SRCS + Types.cpp + DEPS + Folly::folly_io_iobuf + EXPORTED_DEPS + fizz_record_record + Folly::folly_optional +) + +fizz_add_library(fizz_extensions_delegatedcred_delegated_credential_client_extension + SRCS + DelegatedCredentialClientExtension.cpp + EXPORTED_DEPS + fizz_client_client_extensions + fizz_extensions_delegatedcred_delegated_credential +) + +fizz_add_library(fizz_extensions_delegatedcred_delegated_credential_utils + SRCS + DelegatedCredentialUtils.cpp + DEPS + fizz_backend_openssl + Folly::folly_ssl_openssl_cert_utils + EXPORTED_DEPS + fizz_extensions_delegatedcred_delegated_credential + fizz_protocol_certificate + fizz_protocol_clock_clock + Folly::folly_ssl_openssl_ptr_types +) + +fizz_add_library(fizz_extensions_delegatedcred_serialization + SRCS + Serialization.cpp + DEPS + fizz_extensions_delegatedcred_delegated_credential_utils + Folly::folly_base64 + Folly::folly_format + Folly::folly_range + EXPORTED_DEPS + fizz_extensions_delegatedcred_delegated_credential + fizz_extensions_delegatedcred_self_delegated_credential +) + +fizz_add_library(fizz_extensions_delegatedcred_peer_delegated_credential + EXPORTED_DEPS + fizz_backend_openssl + fizz_extensions_delegatedcred_delegated_credential + fizz_extensions_delegatedcred_delegated_credential_utils + fizz_protocol_clock_system_clock + Folly::folly_ssl_openssl_cert_utils +) + +fizz_add_library(fizz_extensions_delegatedcred_self_delegated_credential + EXPORTED_DEPS + fizz_backend_openssl + fizz_extensions_delegatedcred_delegated_credential + fizz_extensions_delegatedcred_delegated_credential_utils + Folly::folly_ssl_openssl_cert_utils +) + +fizz_add_library(fizz_extensions_delegatedcred_delegated_credential_factory + SRCS + DelegatedCredentialFactory.cpp + DEPS + fizz_extensions_delegatedcred_peer_delegated_credential + Folly::folly_portability_openssl + EXPORTED_DEPS + fizz_extensions_delegatedcred_delegated_credential + fizz_protocol_default_factory +) + +fizz_add_library(fizz_extensions_delegatedcred_delegated_credential_cert_manager + SRCS + DelegatedCredentialCertManager.cpp + EXPORTED_DEPS + fizz_extensions_delegatedcred_delegated_credential + fizz_extensions_delegatedcred_self_delegated_credential + fizz_server_cert_manager +) + +fizz_add_library(fizz_extensions_delegatedcred_delegated_credential_client_cert_manager + SRCS + DelegatedCredentialClientCertManager.cpp + DEPS + fizz_extensions_delegatedcred_delegated_credential + EXPORTED_DEPS + fizz_client_cert_manager +) diff --git a/fizz/extensions/exportedauth/CMakeLists.txt b/fizz/extensions/exportedauth/CMakeLists.txt new file mode 100644 index 00000000000..fde7bb20867 --- /dev/null +++ b/fizz/extensions/exportedauth/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_extensions_exportedauth_exported_authenticator + SRCS + ExportedAuthenticator.cpp + DEPS + fizz_backend_openssl + fizz_protocol_default_factory + EXPORTED_DEPS + fizz_crypto_hasher + fizz_protocol_async_fizz_base + fizz_protocol_certificate + fizz_protocol_exporter + fizz_protocol_protocol + fizz_record_record + fizz_record_record_layer +) diff --git a/fizz/extensions/javacrypto/CMakeLists.txt b/fizz/extensions/javacrypto/CMakeLists.txt new file mode 100644 index 00000000000..8f82d141bf5 --- /dev/null +++ b/fizz/extensions/javacrypto/CMakeLists.txt @@ -0,0 +1,25 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_extensions_javacrypto_java_crypto + SRCS + JavaCryptoCertificateVerifier.cpp + JavaCryptoPeerCert.cpp + JniUtils.cpp + OnLoad.cpp + DEPS + Folly::folly_ssl_openssl_cert_utils + ${GLOG_LIBRARIES} + EXPORTED_DEPS + fizz_backend_openssl + fizz_protocol_certificate + fizz_protocol_certificate_verifier + fizz_protocol_default_factory + fizz_record_record + Folly::folly_range +) diff --git a/fizz/extensions/tokenbinding/CMakeLists.txt b/fizz/extensions/tokenbinding/CMakeLists.txt new file mode 100644 index 00000000000..7b9bf007ef5 --- /dev/null +++ b/fizz/extensions/tokenbinding/CMakeLists.txt @@ -0,0 +1,66 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_extensions_tokenbinding_token_binding + SRCS + Types.cpp + DEPS + Folly::folly_io_iobuf + Folly::folly_string + EXPORTED_DEPS + fizz_record_record + Folly::folly_optional +) + +fizz_add_library(fizz_extensions_tokenbinding_token_binding_server_extension + EXPORTED_DEPS + fizz_extensions_tokenbinding_token_binding + fizz_extensions_tokenbinding_token_binding_context + fizz_server_negotiator + fizz_server_server_extensions +) + +fizz_add_library(fizz_extensions_tokenbinding_token_binding_client_extension + SRCS + TokenBindingClientExtension.cpp + EXPORTED_DEPS + fizz_client_client_extensions + fizz_extensions_tokenbinding_token_binding + fizz_extensions_tokenbinding_token_binding_context + Folly::folly_optional +) + +fizz_add_library(fizz_extensions_tokenbinding_token_binding_context + EXPORTED_DEPS + fizz_extensions_tokenbinding_token_binding +) + +fizz_add_library(fizz_extensions_tokenbinding_token_binding_validator + SRCS + Validator.cpp + DEPS + fizz_extensions_tokenbinding_utils + fizz_protocol_default_factory + EXPORTED_DEPS + fizz_backend_openssl + fizz_extensions_tokenbinding_token_binding + fizz_record_record +) + +fizz_add_library(fizz_extensions_tokenbinding_utils + EXPORTED_DEPS + fizz_extensions_tokenbinding_token_binding +) + +fizz_add_library(fizz_extensions_tokenbinding_token_binding_constructor + SRCS + TokenBindingConstructor.cpp + EXPORTED_DEPS + fizz_extensions_tokenbinding_token_binding + Folly::folly_ssl_openssl_ptr_types +) diff --git a/fizz/protocol/CMakeLists.txt b/fizz/protocol/CMakeLists.txt new file mode 100644 index 00000000000..beb6b15c1e5 --- /dev/null +++ b/fizz/protocol/CMakeLists.txt @@ -0,0 +1,187 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_protocol_state_machine + EXPORTED_DEPS + fizz_util_status + ${GLOG_LIBRARIES} +) + +fizz_add_library(fizz_protocol_events + SRCS + Events.cpp + EXPORTED_DEPS + Folly::folly_range +) + +fizz_add_library(fizz_protocol_params + SRCS + Params.cpp + EXPORTED_DEPS + fizz_client_client_extensions + fizz_client_psk_cache + fizz_crypto_aead_aead + fizz_protocol_ech_encrypted_client_hello + fizz_protocol_events + fizz_record_record + fizz_util_variant + Folly::folly_executor + Folly::folly_io_async_write_flags + Folly::folly_io_iobuf +) + +fizz_add_library(fizz_protocol_key_scheduler + SRCS + KeyScheduler.cpp + DEPS + fizz_protocol_ech_encrypted_client_hello + EXPORTED_DEPS + fizz_crypto_aead_aead + fizz_crypto_key_derivation + fizz_util_variant + Folly::folly_optional +) + +fizz_add_library(fizz_protocol_certificate + SRCS + Certificate.cpp + EXPORTED_DEPS + fizz_config + fizz_record_record +) + +fizz_add_library(fizz_protocol_handshake_context + SRCS + HandshakeContext.cpp + DEPS + fizz_crypto_hkdf + fizz_crypto_key_derivation + EXPORTED_DEPS + fizz_crypto_hasher + fizz_record_record +) + +fizz_add_library(fizz_protocol_factory + SRCS + Factory.cpp + EXPORTED_DEPS + fizz_crypto_aead_aead + fizz_crypto_crypto + fizz_crypto_exchange_key_exchange + fizz_crypto_hasher + fizz_crypto_key_derivation + fizz_protocol_certificate + fizz_protocol_handshake_context + fizz_protocol_key_scheduler + fizz_protocol_types + fizz_record_encrypted_record_layer + fizz_record_plaintext_record_layer + fizz_record_record +) + +fizz_add_library(fizz_protocol_default_factory + EXPORTED_DEPS + fizz_config + fizz_protocol_multi_backend_factory +) + +fizz_add_library(fizz_protocol_multi_backend_factory + SRCS + MultiBackendFactory.cpp + DEPS + fizz_backend_libaegis + fizz_backend_liboqs + fizz_backend_libsodium + fizz_backend_openssl + fizz_config + fizz_crypto_exchange_hybrid_key_exchange + fizz_crypto_hkdf + EXPORTED_DEPS + fizz_protocol_factory +) + +fizz_add_library(fizz_protocol_types + SRCS + Types.cpp + EXPORTED_DEPS + fizz_crypto_crypto + fizz_record_record + Folly::folly_lang_assume + Folly::folly_range +) + +fizz_add_library(fizz_protocol_actions + EXPORTED_DEPS + fizz_protocol_key_scheduler + fizz_protocol_types + fizz_record_record_layer + Folly::folly_c_portability + Folly::folly_exception_wrapper + Folly::folly_io_async_write_flags + Folly::folly_io_iobuf + Folly::folly_range + Folly::folly_small_vector +) + +fizz_add_library(fizz_protocol_protocol + EXPORTED_DEPS + fizz_protocol_factory + fizz_protocol_key_scheduler + fizz_record_record +) + +fizz_add_library(fizz_protocol_fizz_base + EXPORTED_DEPS + fizz_protocol_exporter + fizz_protocol_factory + fizz_protocol_params + fizz_util_variant + Folly::folly_io_async_async_socket_exception + Folly::folly_io_async_delayed_destruction +) + +fizz_add_library(fizz_protocol_async_fizz_base + SRCS + AsyncFizzBase.cpp + DEPS + Folly::folly_conv + EXPORTED_DEPS + fizz_protocol_certificate + fizz_protocol_key_scheduler + fizz_record_record + Folly::folly_io_async_async_socket + Folly::folly_io_async_decorated_async_transport_wrapper + Folly::folly_io_iobuf +) + +fizz_add_library(fizz_protocol_default_certificate_verifier + SRCS + DefaultCertificateVerifier.cpp + DEPS + Folly::folly_file_util + Folly::folly_ssl_openssl_cert_utils + EXPORTED_DEPS + fizz_protocol_certificate_verifier + Folly::folly_ssl_openssl_ptr_types +) + +fizz_add_library(fizz_protocol_certificate_verifier + EXPORTED_DEPS + fizz_protocol_certificate + fizz_record_record +) + +fizz_add_library(fizz_protocol_exporter + SRCS + Exporter.cpp + DEPS + fizz_crypto_hasher + EXPORTED_DEPS + fizz_crypto_key_derivation + fizz_protocol_factory +) diff --git a/fizz/protocol/clock/CMakeLists.txt b/fizz/protocol/clock/CMakeLists.txt new file mode 100644 index 00000000000..348d2ca2ee5 --- /dev/null +++ b/fizz/protocol/clock/CMakeLists.txt @@ -0,0 +1,16 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_protocol_clock_clock) + +fizz_add_library(fizz_protocol_clock_system_clock + SRCS + SystemClock.cpp + EXPORTED_DEPS + fizz_protocol_clock_clock +) diff --git a/fizz/protocol/ech/CMakeLists.txt b/fizz/protocol/ech/CMakeLists.txt new file mode 100644 index 00000000000..c6b5a3cd925 --- /dev/null +++ b/fizz/protocol/ech/CMakeLists.txt @@ -0,0 +1,55 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_protocol_ech_encrypted_client_hello + SRCS + Types.cpp + EXPORTED_DEPS + fizz_crypto_hpke_types + fizz_record_record + Folly::folly_io_iobuf +) + +fizz_add_library(fizz_protocol_ech_encryption + SRCS + Encryption.cpp + DEPS + fizz_crypto_hpke_utils + fizz_protocol_protocol + fizz_record_record + EXPORTED_DEPS + fizz_crypto_exchange_key_exchange + fizz_crypto_hpke_hpke + fizz_protocol_ech_encrypted_client_hello + fizz_protocol_factory +) + +fizz_add_library(fizz_protocol_ech_decrypter + SRCS + Decrypter.cpp + EXPORTED_DEPS + fizz_protocol_ech_encrypted_client_hello + fizz_protocol_ech_encryption + fizz_protocol_factory +) + +fizz_add_library(fizz_protocol_ech_grease_ech_setting + EXPORTED_DEPS + fizz_crypto_hpke_hpke +) + +fizz_add_library(fizz_protocol_ech_grease_ech + SRCS + GreaseECH.cpp + DEPS + fizz_crypto_hpke_utils + EXPORTED_DEPS + fizz_protocol_ech_encrypted_client_hello + fizz_protocol_ech_grease_ech_setting + fizz_protocol_factory +) diff --git a/fizz/record/CMakeLists.txt b/fizz/record/CMakeLists.txt new file mode 100644 index 00000000000..d4d2003c452 --- /dev/null +++ b/fizz/record/CMakeLists.txt @@ -0,0 +1,57 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_record_record + SRCS + Types.cpp + EXPORTED_DEPS + fizz_protocol_events + Folly::folly_conv + Folly::folly_io_iobuf + Folly::folly_optional + Folly::folly_string +) + +fizz_add_library(fizz_record_record_layer + SRCS + RecordLayer.cpp + EXPORTED_DEPS + fizz_crypto_aead_aead + fizz_protocol_params + fizz_record_record + Folly::folly_io_iobuf + Folly::folly_optional +) + +fizz_add_library(fizz_record_plaintext_record_layer + SRCS + PlaintextRecordLayer.cpp + DEPS + Folly::folly_string + EXPORTED_DEPS + fizz_record_record_layer +) + +fizz_add_library(fizz_record_encrypted_record_layer + SRCS + EncryptedRecordLayer.cpp + DEPS + fizz_crypto_aead_iobuf + EXPORTED_DEPS + fizz_crypto_aead_aead + fizz_record_buf_and_padding_policy + fizz_record_record_layer +) + +fizz_add_library(fizz_record_buf_and_padding_policy + SRCS + BufAndPaddingPolicy.cpp + EXPORTED_DEPS + fizz_record_record + Folly::folly_io_iobuf +) diff --git a/fizz/server/CMakeLists.txt b/fizz/server/CMakeLists.txt new file mode 100644 index 00000000000..c1898386e4b --- /dev/null +++ b/fizz/server/CMakeLists.txt @@ -0,0 +1,255 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_server_protocol + SRCS + ServerProtocol.cpp + State.cpp + DEPS + fizz_crypto_exchange_async_key_exchange + fizz_crypto_utils + fizz_protocol_certificate_verifier + fizz_protocol_ech_decrypter + fizz_protocol_protocol + fizz_protocol_state_machine + fizz_record_plaintext_record_layer + fizz_server_async_self_cert + fizz_server_negotiator + fizz_server_replay_cache + fizz_util_workarounds + Folly::folly_overload + Folly::folly_tracing_static_tracepoint + EXPORTED_DEPS + fizz_protocol_actions + fizz_protocol_certificate + fizz_protocol_ech_encrypted_client_hello + fizz_protocol_key_scheduler + fizz_protocol_params + fizz_protocol_types + fizz_record_record + fizz_record_record_layer + fizz_server_fizz_server_context + fizz_server_handshake_logging + fizz_server_resumption_state + fizz_server_server_extensions + fizz_util_status + fizz_util_variant + Folly::folly_futures_core + Folly::folly_optional + Folly::folly_small_vector +) + +fizz_add_library(fizz_server_negotiator + EXPORTED_DEPS + Folly::folly_optional +) + +fizz_add_library(fizz_server_fizz_server_context + SRCS + FizzServerContext.cpp + DEPS + fizz_protocol_default_factory + EXPORTED_DEPS + fizz_protocol_certificate + fizz_protocol_clock_system_clock + fizz_protocol_ech_decrypter + fizz_protocol_factory + fizz_record_record + fizz_server_cert_manager + fizz_server_cookie_cipher + fizz_server_negotiator + fizz_server_replay_cache + fizz_server_ticket_cipher +) + +fizz_add_library(fizz_server_ticket_policy + EXPORTED_DEPS + fizz_protocol_clock_system_clock + fizz_protocol_types + fizz_server_resumption_state +) + +fizz_add_library(fizz_server_ticket_cipher + EXPORTED_DEPS + fizz_server_resumption_state + Folly::folly_futures_core + Folly::folly_io_iobuf + Folly::folly_optional +) + +fizz_add_library(fizz_server_dual_ticket_cipher + EXPORTED_DEPS + fizz_server_ticket_cipher +) + +fizz_add_library(fizz_server_ticket_codec + SRCS + TicketCodec.cpp + DEPS + Folly::folly_io_async_ssl_openssl_transport_certificate + Folly::folly_ssl_openssl_cert_utils + EXPORTED_DEPS + fizz_record_record + fizz_server_fizz_server_context + fizz_server_resumption_state +) + +fizz_add_library(fizz_server_aead_ticket_cipher + EXPORTED_DEPS + fizz_server_aead_token_cipher + fizz_server_fizz_server_context + fizz_server_ticket_cipher + fizz_server_ticket_policy +) + +fizz_add_library(fizz_server_token_cipher + EXPORTED_DEPS + Folly::folly_io_iobuf + Folly::folly_optional + Folly::folly_range +) + +fizz_add_library(fizz_server_aead_token_cipher + SRCS + AeadTokenCipher.cpp + DEPS + fizz_crypto_aead_aead + fizz_crypto_random + fizz_crypto_utils + EXPORTED_DEPS + fizz_backend_openssl + fizz_crypto_hkdf + fizz_record_record + fizz_server_token_cipher + Folly::folly_io_iobuf + Folly::folly_optional +) + +fizz_add_library(fizz_server_ticket_types + EXPORTED_DEPS + fizz_backend_openssl + fizz_crypto_hkdf + fizz_protocol_types + fizz_server_aead_ticket_cipher + fizz_server_ticket_codec +) + +fizz_add_library(fizz_server_resumption_state + EXPORTED_DEPS + fizz_protocol_certificate + fizz_protocol_types + fizz_record_record +) + +fizz_add_library(fizz_server_cookie_cipher + SRCS + CookieCipher.cpp + DEPS + fizz_protocol_handshake_context + fizz_server_negotiator + EXPORTED_DEPS + fizz_protocol_ech_encrypted_client_hello + fizz_protocol_factory + fizz_record_record +) + +fizz_add_library(fizz_server_aead_cookie_cipher + SRCS + AeadCookieCipher.cpp + DEPS + fizz_record_record + EXPORTED_DEPS + fizz_server_cookie_cipher + fizz_server_fizz_server_context + fizz_server_token_cipher +) + +fizz_add_library(fizz_server_cookie_types + EXPORTED_DEPS + fizz_backend_openssl + fizz_crypto_hkdf + fizz_protocol_types + fizz_server_aead_cookie_cipher +) + +fizz_add_library(fizz_server_async_self_cert + EXPORTED_DEPS + fizz_protocol_certificate + Folly::folly_futures_core +) + +fizz_add_library(fizz_server_fizz_server + SRCS + FizzServer.cpp + EXPORTED_DEPS + fizz_protocol_fizz_base + fizz_server_fizz_server_context + fizz_server_protocol + fizz_util_workarounds + Folly::folly_overload +) + +fizz_add_library(fizz_server_async_fizz_server + EXPORTED_DEPS + fizz_protocol_async_fizz_base + fizz_protocol_exporter + fizz_server_fizz_server + fizz_server_fizz_server_context + fizz_server_protocol + fizz_util_tracer +) + +fizz_add_library(fizz_server_cert_manager + SRCS + DefaultCertManager.cpp + DEPS + Folly::folly_string + EXPORTED_DEPS + fizz_protocol_certificate +) + +fizz_add_library(fizz_server_server_extensions + EXPORTED_DEPS + fizz_record_record +) + +fizz_add_library(fizz_server_replay_cache + SRCS + ReplayCache.cpp + EXPORTED_DEPS + Folly::folly_futures_core + Folly::folly_io_iobuf + Folly::folly_range +) + +fizz_add_library(fizz_server_sliding_bloom_replay_cache + SRCS + SlidingBloomReplayCache.cpp + DEPS + fizz_crypto_random + Folly::folly_io_iobuf + Folly::folly_portability_unistd + Folly::folly_range + EXPORTED_DEPS + fizz_server_replay_cache + Folly::folly_io_async_async_base +) + +fizz_add_library(fizz_server_multi_server_extensions + SRCS + MultiServerExtensions.cpp + EXPORTED_DEPS + fizz_server_server_extensions +) + +fizz_add_library(fizz_server_handshake_logging + SRCS + HandshakeLogging.cpp + EXPORTED_DEPS + fizz_record_record +) diff --git a/fizz/util/CMakeLists.txt b/fizz/util/CMakeLists.txt new file mode 100644 index 00000000000..05ce7dab004 --- /dev/null +++ b/fizz/util/CMakeLists.txt @@ -0,0 +1,60 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. +# +# Auto-generated by fizz/facebook/generate_cmake.py - DO NOT EDIT MANUALLY + +fizz_add_library(fizz_util_fizz_util + SRCS + FizzUtil.cpp + DEPS + fizz_backend_libsodium + fizz_server_ticket_types + Folly::folly_file_util + Folly::folly_format + Folly::folly_portability_openssl + ${OPENSSL_LIBRARIES} + sodium + EXPORTED_DEPS + fizz_extensions_tokenbinding_token_binding_context + fizz_protocol_certificate + fizz_server_fizz_server_context + fizz_server_ticket_policy + Folly::folly_io_async_password_in_file + Folly::folly_io_async_ssl_context + Folly::folly_ssl_openssl_cert_utils +) + +fizz_add_library(fizz_util_parse + EXPORTED_DEPS + fizz_record_record + Folly::folly_range +) + +fizz_add_library(fizz_util_workarounds) + +fizz_add_library(fizz_util_variant) + +fizz_add_library(fizz_util_key_log_writer + EXPORTED_DEPS + fizz_protocol_key_scheduler + fizz_protocol_types + Folly::folly_range +) + +fizz_add_library(fizz_util_tracer + SRCS + Tracing.cpp + DEPS + Folly::folly_tracing_static_tracepoint + EXPORTED_DEPS + fizz_util_key_log_writer +) + +fizz_add_library(fizz_util_status + EXPORTED_DEPS + fizz_record_record + Folly::folly_optional +)