usearch icon indicating copy to clipboard operation
usearch copied to clipboard

Bug: Rust docs are failing to build for 2.16.x

Open hadronzoo opened this issue 1 year ago • 8 comments

Describe the bug

2.16.0 appears to have introduced a GCC 13 requirement, which is breaking CI systems like the Rust Docs builder. Compiling a Rust project that depends on USearch 2.16.2 on a Github Action Runner using ubuntu-latest will also result in the same compilation failure.

Steps to reproduce

Compile a Rust project that uses USearch 2.16.0 on Ubuntu 22.04, which will fail with cc1plus: error: attribute 'avx512fp16' argument 'target' is unknown. Upgrading to GCC 13 or switching to Ubuntu 24.04 will fix the issue.

Expected behavior

Rust docs to build for new versions. Compilation to succeed on Ubuntu 22.04 without errors.

USearch version

v2.16.0

Operating System

Ubuntu 22.04

Hardware architecture

x86

Which interface are you using?

Other bindings

Contact Details

[email protected]

Are you open to being tagged as a contributor?

  • [X] I am open to being mentioned in the project .git history as a contributor

Is there an existing issue for this?

  • [X] I have searched the existing issues

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

hadronzoo avatar Nov 13 '24 06:11 hadronzoo

@hadronzoo, hi! Is there a way to override the compilation settings of the docs builder?

I assume it might be easier to fix this issue in SimSIMD first.

ashvardanian avatar Nov 13 '24 08:11 ashvardanian

It looks like docs.rs does have a way to update the build environment for a crate: https://forge.rust-lang.org/docs-rs/add-dependencies.html.

hadronzoo avatar Nov 13 '24 15:11 hadronzoo

@hadronzoo, sounds like a solution! Any chance you could open a PR? Might be best to start in the SimSIMD repo, as it's the source of the problems, I assum.

ashvardanian avatar Nov 13 '24 17:11 ashvardanian

Is there any way to detect the older platform to prevent this error? Unfortunately, any crate which depends upon USearch also fails to build docs. I've also opened a docs.rs issue.

hadronzoo avatar Nov 13 '24 17:11 hadronzoo

It looks like they only take 20.04 packages:

This should be the name of a package in the Ubuntu 20.04 Repositories.

I think that's going to block upgrading GCC.

hadronzoo avatar Nov 13 '24 17:11 hadronzoo

Another option is to make the simsimd feature optional instead of being enable by default.

hadronzoo avatar Nov 13 '24 23:11 hadronzoo

@hadronzoo, making it optional is a bad idea. It brings too much to the table and very few people remember to check the available options/flags/settings 🤔 Is there a way to control the minimum viable GLibC version or OS version?

ashvardanian avatar Nov 14 '24 10:11 ashvardanian

I think this is blocked on https://github.com/rust-lang/docs.rs/issues/2672.

hadronzoo avatar Nov 15 '24 03:11 hadronzoo

@hadronzoo, I'm considering the same solution I've used with Python. There, instead of pulling the SimSIMD kernels from the Git submodule, I pull the most recent pre-compiled Python package from PyPi. I want to do the same with Rust, assuming SimSIMD already has a Rust binding, and a more sophisticated build pipeline.

ashvardanian avatar Jun 08 '25 04:06 ashvardanian

Now that https://github.com/rust-lang/docs.rs/issues/2672 is resolved, it looks like docs are back.

hadronzoo avatar Jun 10 '25 03:06 hadronzoo

Serde started shipping binaries but there was a strong reaction against it. The change was eventually reverted: HN link.

hadronzoo avatar Jun 10 '25 03:06 hadronzoo