Files
aevolution/cmake/Quic.cmake
T
dingoandClaude Opus 5.5 1819ebc0ab
Foundation / checks (checks) (push) Successful in 32m47s
Foundation / checks (client) (push) Failing after 10m1s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m53s
Foundation / checks (network) (push) Successful in 11m18s
Foundation / checks (postgres) (push) Successful in 40m20s
Foundation / checks (tsan) (push) Successful in 7m46s
Foundation / postgres-tools (push) Skipped
Foundation / image (push) Skipped
Foundation / server-image (push) Skipped
Switch the engineering client to M10 sessions (M10.5c)
evo-client's remote mode now runs over RegionSessionClient (QUIC, session
v2): snapshot-fed environment and organism views, the camera following the
server's view until the user moves it and then driving the interest, intention
records with a simulated state, and reconnects with the next grant of a bundle.
The launcher reads 160-byte M10 grants and defaults to the dev route.

- quic::resolve_ipv4 shared by the client and evo-session-probe
- evo-session-probe grants: owner-only bundles of 1-64 grants
- evo-server --m10-max-grant-lifetime (dev only, 60..3600 s)
- presets client-network/client-package build QUIC; msquic links the CRT
  fully static; msquic.dll and msquic/OpenSSL licences in the Windows package
- client-remote-session test against a loopback region
- ADR-0093/0091/0086 amendments, M10_CLIENT_SESSIONS guide, validation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 11:57:07 -04:00

59 lines
3.0 KiB
CMake

# M10.2 QUIC transport (ADR-0090): pinned msquic 2.6.2 with its OpenSSL TLS provider
# (OpenSSL 3.5.9 LTS, TLS 1.3 only, built static inside the msquic shared library).
# Explicit preparation only: cmake -P tools/prepare-msquic.cmake. On Windows msquic.dll
# links the whole C runtime statically (M10.5c): the client package ships it and allows
# no runtime DLL imports (ADR-0086), including the UCRT forwarders. Windows builds need a
# native Perl (Strawberry Perl) and NASM for OpenSSL, plus nmake from the MSVC shell.
include_guard(GLOBAL)
include("${PROJECT_SOURCE_DIR}/tools/msquic-pin.cmake")
set(msquic_source "${PROJECT_SOURCE_DIR}/build/external/msquic/msquic-${EVO_MSQUIC_VERSION}")
if(NOT EXISTS "${msquic_source}/evo-verified.sha256")
message(FATAL_ERROR "Prepare msquic explicitly: cmake -P tools/prepare-msquic.cmake")
endif()
file(STRINGS "${msquic_source}/evo-verified.sha256" verified_msquic)
if(NOT verified_msquic STREQUAL "${EVO_MSQUIC_SHA256} ${EVO_OPENSSL_SHA256} ${EVO_XDP_SHA256}")
message(FATAL_ERROR "Prepared msquic/OpenSSL do not match the reviewed pins")
endif()
if(WIN32)
find_program(EVO_NATIVE_PERL perl)
find_program(EVO_NASM nasm)
if(NOT EVO_NATIVE_PERL OR NOT EVO_NASM)
message(FATAL_ERROR "msquic's OpenSSL build needs a native Perl (Strawberry Perl) and NASM on PATH")
endif()
endif()
enable_language(C)
foreach(setting IN ITEMS "QUIC_TLS_LIB=openssl" "QUIC_BUILD_SHARED=ON" "QUIC_BUILD_TEST=OFF"
"QUIC_BUILD_TOOLS=OFF" "QUIC_BUILD_PERF=OFF" "QUIC_ENABLE_LOGGING=OFF" "QUIC_EMBED_GIT_HASH=OFF"
"QUIC_SOURCE_LINK=OFF" "QUIC_USE_EXTERNAL_OPENSSL=OFF" "QUIC_CODE_CHECK=OFF"
"QUIC_STATIC_LINK_CRT=ON" "QUIC_STATIC_LINK_PARTIAL_CRT=OFF")
string(REPLACE "=" ";" pair "${setting}")
list(GET pair 0 name)
list(GET pair 1 value)
set(${name} "${value}" CACHE STRING "Pinned by AEvolution (ADR-0090)" FORCE)
endforeach()
add_subdirectory("${msquic_source}" "${PROJECT_BINARY_DIR}/msquic" EXCLUDE_FROM_ALL SYSTEM)
# Upstream compiles itself with warnings as errors (and MSVC /analyze). As for Mbed TLS,
# compiler-version-specific diagnostics must not fail unmodified upstream sources
# (MSVC 19.44 /analyze reports C28020 in crypto_tls.c); owned code keeps its policy.
if(MSVC)
target_compile_options(warnings INTERFACE /WX-)
else()
target_compile_options(warnings INTERFACE -Wno-error)
endif()
# Consumer target: the public C API header and the shared library.
add_library(evo_msquic INTERFACE)
target_include_directories(evo_msquic SYSTEM INTERFACE "${msquic_source}/src/inc")
target_link_libraries(evo_msquic INTERFACE msquic)
if(WIN32)
# msquic.h's inline address helpers (QuicAddrFromString) call Rtl* functions in ntdll.
target_link_libraries(evo_msquic INTERFACE ntdll)
endif()
# The shared library must sit next to Windows executables that load it.
function(evo_msquic_runtime target)
if(WIN32)
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:msquic>" "$<TARGET_FILE_DIR:${target}>"
VERBATIM)
endif()
endfunction()