Skip to content

fix(nix): enable LZ4 support for Windows builds#1983

Merged
thomas-nguy merged 1 commit intomainfrom
release/v1.7.x
Mar 12, 2026
Merged

fix(nix): enable LZ4 support for Windows builds#1983
thomas-nguy merged 1 commit intomainfrom
release/v1.7.x

Conversation

@thomas-nguy
Copy link
Copy Markdown
Collaborator

@thomas-nguy thomas-nguy commented Mar 11, 2026

backport nix window build fix


👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

Summary by CodeRabbit

  • Bug Fixes

    • LZ4 compression support is now enabled for Windows builds, improving data compression capabilities.
  • Chores

    • Enhanced build system with improved Windows compatibility testing and more robust dependency handling.

* fix(nix): LZ4 not build in windows

* update ci build.yml

* update lz4

* add objdump debug for rocksdb.nix

* fix(nix): generate lz4 import lib from DLL exports on MinGW

* add changelog

* ci: smoke test Windows tarballs with wine

* fix wine test

* Update CHANGELOG.md

Signed-off-by: Xinyu <91446598+XinyuCRO@users.noreply.github.com>

---------

Signed-off-by: Xinyu <91446598+XinyuCRO@users.noreply.github.com>
Co-authored-by: Xinyu <91446598+XinyuCRO@users.noreply.github.com>
@thomas-nguy thomas-nguy requested a review from a team as a code owner March 11, 2026 05:28
@thomas-nguy thomas-nguy requested review from ApacCronos and songgaoye and removed request for a team March 11, 2026 05:28
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

The pull request adds Windows compatibility testing via Wine to the CI pipeline, enables LZ4 compression support for Windows RocksDB builds through improved DLL export handling and platform-specific adjustments, and documents the LZ4 fix in the changelog. Changes span CI configuration, Nix build logic, and release notes.

Changes

Cohort / File(s) Summary
CI/CD Windows Testing
.github/workflows/build.yml
Added Wine installation and validation sequence with multi-attempt package updates and architecture handling (i386). Introduced smoke testing stage for Windows tarballs under Wine, including environment setup, tarball extraction, and execution of cronosd.exe with database migration and error handling. Expanded changed-files detection to include nix files, build workflow, and release scripts.
Build Configuration
nix/rocksdb.nix
Enabled LZ4 unconditionally for all builds. Improved DLL export extraction during MinGW builds using objdump parsing with error validation. Added runtime validation for missing lz4.dll with diagnostics. Introduced platform-specific post-install adjustments: Darwin (install_name_tool for dylib references) and Linux with shared builds (patchelf for runtime library search path).
Documentation
CHANGELOG.md
Added changelog entry documenting LZ4 support enablement for Windows builds.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

nix

Suggested reviewers

  • songgaoye
  • randy-cro
  • JayT106

Poem

🐰 Wine flows through CI pipes so fine,
LZ4 compresses without a whine,
DLL exports dance in the build,
Cross-platform dreams beautifully fulfilled!
🍷✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'fix(nix): enable LZ4 support for Windows builds' directly and specifically describes the main change - enabling LZ4 support for Windows in the nix configuration, which aligns with the primary objective.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release/v1.7.x

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@thomas-nguy thomas-nguy changed the title fix(nix): enable LZ4 support for Windows builds (#1982) fix(nix): enable LZ4 support for Windows builds Mar 11, 2026
@thomas-nguy thomas-nguy added this pull request to the merge queue Mar 12, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 12, 2026
@thomas-nguy thomas-nguy added this pull request to the merge queue Mar 12, 2026
Merged via the queue into main with commit ad76eae Mar 12, 2026
100 of 103 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants