Skip to content

fix: patch esaxx-rs for Windows CRT mismatch and update lancedb depen…#491

Merged
felix-schultz merged 1 commit intoalphafrom
fix/rust-toolchain
Feb 9, 2026
Merged

fix: patch esaxx-rs for Windows CRT mismatch and update lancedb depen…#491
felix-schultz merged 1 commit intoalphafrom
fix/rust-toolchain

Conversation

@felix-schultz
Copy link
Copy Markdown
Member

This pull request makes targeted dependency updates and configuration changes to improve cross-platform compatibility, particularly for Windows and iOS environments. The main focus is on adjusting how certain crates are compiled and linked, to avoid platform-specific issues.

Dependency and platform compatibility updates:

  • Updated the lancedb dependency in packages/storage/Cargo.toml to remove the fp16kernels feature for Windows, since fp16kernels are not supported and Lance skips compiling the C kernels for MSVC.
  • Added a conditional dependency for lancedb with the fp16kernels feature enabled only for non-Windows targets, ensuring correct feature usage across platforms.

Build and linking fixes:

  • Patched the esaxx-rs crate in Cargo.toml to use a fork that links against the dynamic MSVC CRT, resolving a conflict with ort_sys which uses dynamic CRT and avoiding linker errors on Windows.…dencies

@felix-schultz felix-schultz merged commit 418bc3e into alpha Feb 9, 2026
0 of 2 checks passed
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @felix-schultz, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing cross-platform compatibility, particularly for Windows and iOS environments, by making targeted adjustments to dependency configurations. It addresses critical build and linking issues related to the C Runtime Library on Windows and refines the usage of specific features within the lancedb crate to align with platform capabilities.

Highlights

  • Windows CRT Mismatch Fix: The esaxx-rs crate is now patched to use a specific Git fork that links against the dynamic MSVC CRT, resolving a conflict with ort_sys and preventing linker errors on Windows.
  • Conditional lancedb Feature Usage: The lancedb dependency has been updated to conditionally enable the fp16kernels feature only for non-Windows targets, as these kernels are not supported on Windows and were causing compilation issues.
Changelog
  • Cargo.lock
    • Updated the source for the esaxx-rs package to point to a specific Git repository and branch (feat/dynamic-msvc-link) instead of the crates.io registry.
  • Cargo.toml
    • Added a [patch.crates-io] section to explicitly override the esaxx-rs dependency, directing it to a custom Git fork and branch to resolve Windows CRT linking issues.
  • packages/storage/Cargo.toml
    • Removed the fp16kernels feature from the default lancedb dependency definition.
    • Introduced a [target.'cfg(not(target_os = "windows"))'.dependencies] section to conditionally include lancedb with the fp16kernels feature enabled exclusively for non-Windows operating systems.
Activity
  • No human activity (comments, reviews) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces targeted dependency updates to improve cross-platform compatibility, especially for Windows. The changes include patching esaxx-rs to resolve a CRT mismatch and conditionally enabling the fp16kernels feature for lancedb on non-Windows platforms. The approach is sound and directly addresses the described issues. My review includes a couple of suggestions to improve the long-term stability and maintainability of the dependency overrides by using specific commit revisions instead of branches.

# Patch esaxx-rs to fix Windows CRT mismatch (upstream hardcodes static CRT /MT,
# conflicting with ort_sys which uses dynamic CRT /MD → LNK2038)
[patch.crates-io]
esaxx-rs = { git = "https://github.com/thewh1teagle/esaxx-rs.git", branch = "feat/dynamic-msvc-link" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For long-term stability and reproducible builds, it's recommended to pin this patch to a specific commit hash (rev) instead of a branch. This prevents cargo update from pulling in unexpected changes from the feat/dynamic-msvc-link branch.

Suggested change
esaxx-rs = { git = "https://github.com/thewh1teagle/esaxx-rs.git", branch = "feat/dynamic-msvc-link" }
esaxx-rs = { git = "https://github.com/thewh1teagle/esaxx-rs.git", rev = "3c8ac57d245ab328f7c71953b7c116a8d1d5498f" }

# Using lancedb branch with lance v3.0.0-beta.1 which includes iOS fp16kernels fix (PR #5747)
lancedb = { git = "https://github.com/lancedb/lancedb.git", branch = "codex/update-lance-3-0-0-beta-1", features = ["polars", "remote", "aws", "azure", "gcs", "fp16kernels"]}
# fp16kernels are not supported on Windows (lance skips compiling the C kernels for MSVC)
lancedb = { git = "https://github.com/lancedb/lancedb.git", branch = "codex/update-lance-3-0-0-beta-1", features = ["polars", "remote", "aws", "azure", "gcs"]}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For long-term stability and reproducible builds, it's recommended to pin this dependency to a specific commit hash (rev) instead of a branch. This prevents cargo update from pulling in unexpected changes from the codex/update-lance-3-0-0-beta-1 branch. The same should be applied to the target-specific dependency on line 45.

Suggested change
lancedb = { git = "https://github.com/lancedb/lancedb.git", branch = "codex/update-lance-3-0-0-beta-1", features = ["polars", "remote", "aws", "azure", "gcs"]}
lancedb = { git = "https://github.com/lancedb/lancedb.git", rev = "422e10ba43576384250dc22fbd1d7e4c0ac9d2cb", features = ["polars", "remote", "aws", "azure", "gcs"]}

iceberg-datafusion = { git = "https://github.com/TM9657/iceberg-rust.git", branch = "main", optional = true }

[target.'cfg(not(target_os = "windows"))'.dependencies]
lancedb = { git = "https://github.com/lancedb/lancedb.git", branch = "codex/update-lance-3-0-0-beta-1", features = ["fp16kernels"]}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Pinning this to a specific commit hash (rev) ensures consistency with the main dependency declaration and improves build reproducibility.

Suggested change
lancedb = { git = "https://github.com/lancedb/lancedb.git", branch = "codex/update-lance-3-0-0-beta-1", features = ["fp16kernels"]}
lancedb = { git = "https://github.com/lancedb/lancedb.git", rev = "422e10ba43576384250dc22fbd1d7e4c0ac9d2cb", features = ["fp16kernels"]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant