Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade rust build environment to 1.70 #10466

Closed
nmandery opened this issue Jun 23, 2023 · 4 comments · Fixed by #10217
Closed

Upgrade rust build environment to 1.70 #10466

nmandery opened this issue Jun 23, 2023 · 4 comments · Fixed by #10217
Assignees

Comments

@nmandery
Copy link

What's the problem this feature will solve?

The most recent currently available version of rust on RTD is 1.64, rust itself is at 1.70. In most cases 1.64 is fine, but there is a increasing amount of crates requiring newer features of the language, so repositories using those can not be build on RTD.

The case I was running into this was when building https://github.com/nmandery/h3ronpy :

The build log output was

Building wheels for collected packages: h3ronpy
  Building wheel for h3ronpy (pyproject.toml): started
  Building wheel for h3ronpy (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for h3ronpy (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      Running `maturin pep517 build-wheel -i /home/docs/checkouts/readthedocs.org/user_builds/h3ronpy/envs/latest/bin/python --compatibility off`
      📦 Including license file "/home/docs/checkouts/readthedocs.org/user_builds/h3ronpy/checkouts/latest/LICENSE.txt"
      🍹 Building a mixed python/rust project
      🔗 Found pyo3 bindings with abi3 support for Python ≥ 3.8
      🐍 Not using a specific python interpreter
      error: package `konst v0.3.5` cannot be built because it requires rustc 1.65.0 or newer, while the currently active rustc version is 1.64.0
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit status: 101": `PYO3_ENVIRONMENT_SIGNATURE="cpython-3.9-64bit" PYO3_PYTHON="/home/docs/checkouts/readthedocs.org/user_builds/h3ronpy/envs/latest/bin/python" PYTHON_SYS_EXECUTABLE="/home/docs/checkouts/readthedocs.org/user_builds/h3ronpy/envs/latest/bin/python" "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/home/docs/checkouts/readthedocs.org/user_builds/h3ronpy/checkouts/latest/Cargo.toml" "--release" "--lib"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/home/docs/checkouts/readthedocs.org/user_builds/h3ronpy/envs/latest/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for h3ronpy
Failed to build h3ronpy

Describe the solution you'd like

Having a more recent rust version available would be great. 1.65 would seemingly be sufficient for this issue, but upgrading directly to 1.70 would certainly be more sustainable.

I saw #9692 and while I am not too familiar with how RTD works, I could try to submit a PR according to whats done there.

Alternative solutions

I am not aware of any good workarounds.

Additional context

@humitos humitos self-assigned this Jun 23, 2023
@humitos
Copy link
Member

humitos commented Jun 23, 2023

Thanks for reporting this. It's good to know that people are using Rust on our platform 👍

I'll try to find some time to prioritize this work.

@nmandery
Copy link
Author

I think it is a good strategy to offer Rust support as a increasing number of python packages make use of it.

Thank you for looking into this

@humitos
Copy link
Member

humitos commented Jun 27, 2023

Rust 1.70 is available already. Can you confirm it's working for you? I did a quick test at https://readthedocs.org/projects/test-builds/builds/21135832/ and it worked for me.

@nmandery
Copy link
Author

Yes, I can confirm it works - Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants