Add Windows/MSVC support - #161
Merged
Merged
Conversation
TuxedoFish
force-pushed
the
windows/msvc-support
branch
from
September 11, 2026 06:47
8b38a8f to
d2bd1c5
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #161 +/- ##
=======================================
Coverage 70.09% 70.09%
=======================================
Files 54 54
Lines 8840 8840
Branches 530 530
=======================================
Hits 6196 6196
Misses 2639 2639
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Removes the last blocker for eventually submitting hyperliquid-sdk-cpp as an official vcpkg port - vcpkg's port-acceptance CI builds across Windows, Linux, and macOS by default, and this SDK had never been built on MSVC. Fixes needed, found by iterating against real windows-latest/MSVC CI (a temporary branch-scoped workflow was used to iterate without waiting on the full Linux/macOS/sanitizer/coverage suite each round, then folded into the real ci.yml matrix once green - 100% passed, 29/29 tests): - timegm: POSIX/glibc extension, no MSVC equivalent by that name - added an _mkgmtime/timegm split in ResponseTypes.h::parseOutcomeExpiry (same semantics), plus the <ctime> include it was transitively relying on. - /bigobj: Boost.Asio/Beast's heavy template instantiation blew past MSVC's default COFF object section-table limit (C1128) in WebsocketRunner.cpp. - /EHsc: MSVC needs the exception model spelled out explicitly; this codebase throws/catches throughout. - NOMINMAX / WIN32_LEAN_AND_MEAN / _WIN32_WINNT=0x0A00: standard guards against Boost.Asio's transitive <windows.h> (min/max macro collisions, header bloat, Asio's own target-Windows-version guessing warning). - ws2_32 / mswsock: Winsock link libraries Asio's networking code needs on Windows, not required on Linux/macOS. - CI: ci.yml's build-and-test job now sets shell: bash at the job level (Git Bash is present on windows-latest, so the existing bootstrap-vcpkg.sh and mkdir -p steps run unmodified across all four OS/compiler combinations), and Build/Test use --config Release/-C Release (no-ops on Linux/macOS's single-config generator, required on Windows' multi-config Visual Studio generator). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Le73N2EZjGLsCqmCScAse
TuxedoFish
force-pushed
the
windows/msvc-support
branch
from
September 11, 2026 14:48
a0d43a9 to
9c5759c
Compare
The "ubuntu-latest always fails, macos-latest hangs" pattern on this branch wasn't CI flakiness - it was self-inflicted. cmake --build --parallel with no number resolves to a bare `make -j` on the Makefiles generator (verified via --verbose), which for GNU Make means *unlimited* concurrent jobs, not "one per core". This repo's ~80 independent test/example targets all become ready simultaneously right after the shared library links, and firing all of them at once as heavy Boost.Asio/Beast compiles exhausts memory on a standard hosted runner. Reproduced locally: `systemd-run --user --scope -p MemoryMax=16G` (matching a typical hosted runner) + the old bare `--parallel` produced the exact same failure signature as CI - dozens of `gmake[2]: *** [...] Terminated` at the fan-out point. The same constrained build with `--parallel 4` completes cleanly (exit 0, 0 Terminated, 29/29 tests pass) - confirming the fix resolves the actual reproduced failure, not just a guess. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Le73N2EZjGLsCqmCScAse
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gets
hyperliquid-sdk-cppbuilding and passing its full test suite on Windows/MSVC - the last blocker called out for eventually submitting this SDK as an official vcpkg port (vcpkg's port-acceptance CI builds across Windows/Linux/macOS by default).Fixes needed, found by iterating against real
windows-latest/MSVC CI:timegm: POSIX/glibc extension, no MSVC equivalent by that name - added an_mkgmtime/timegmsplit inResponseTypes.h::parseOutcomeExpiry(same semantics), plus the<ctime>include it was transitively relying on before./bigobj: Boost.Asio/Beast's heavy template instantiation blew past MSVC's default COFF object section-table limit (C1128) inWebsocketRunner.cpp./EHsc: MSVC needs the exception model spelled out explicitly; this codebase throws/catches throughout.NOMINMAX/WIN32_LEAN_AND_MEAN/_WIN32_WINNT=0x0A00: standard guards against Boost.Asio's transitive<windows.h>(min/max macro collisions, header bloat, Asio's own "guessing the target Windows version" warning).ws2_32/mswsock: Winsock link libraries Asio's networking code needs on Windows, not required on Linux/macOS.ci.yml'sbuild-and-testjob now setsshell: bashat the job level (Git Bash is present onwindows-latest, so the existingbootstrap-vcpkg.sh/mkdir -psteps run unmodified across all four OS/compiler combinations), and Build/Test use--config Release/-C Release(no-ops on Linux/macOS's single-config generator, required for Windows' multi-config Visual Studio generator).Removed the stale "Windows/MSVC is intentionally out of scope" comment and the temporary branch-scoped
windows-experiment.ymlused to iterate against real MSVC without waiting on the full Linux/macOS/sanitizer/coverage suite each round.Stacked on #160 (
secp256k1overlay-port removal) since both are prerequisites for a future vcpkg port submission.Test plan
windows-latest, MSVC): 100% passed, 29/29 tests (verified on this branch before folding intoci.yml's real matrix)ctest: 29/29 passing, confirming theif(WIN32)/if(MSVC)-guarded CMake changes don't affect non-Windows builds🤖 Generated with Claude Code
https://claude.ai/code/session_018Le73N2EZjGLsCqmCScAse