Repository: readthedocs/readthedocs.org

Issue:
Upgrade rust build environment to 1.70
## 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

-



Discussion:

Resolving patch:
diff --git a/readthedocs/settings/base.py b/readthedocs/settings/base.py
--- a/readthedocs/settings/base.py
+++ b/readthedocs/settings/base.py
@@ -622,32 +622,35 @@ def TEMPLATES(self):
             'python': {
                 '2.7': '2.7.18',
                 '3.6': '3.6.15',
-                '3.7': '3.7.15',
-                '3.8': '3.8.15',
-                '3.9': '3.9.15',
-                '3.10': '3.10.8',
-                '3.11': '3.11.0',
+                '3.7': '3.7.17',
+                '3.8': '3.8.17',
+                '3.9': '3.9.17',
+                '3.10': '3.10.12',
+                '3.11': '3.11.4',
                 'pypy3.7': 'pypy3.7-7.3.9',
-                'pypy3.8': 'pypy3.8-7.3.9',
-                'pypy3.9': 'pypy3.9-7.3.9',
+                'pypy3.8': 'pypy3.8-7.3.11',
+                'pypy3.9': 'pypy3.9-7.3.12',
                 'miniconda3-4.7': 'miniconda3-4.7.12',
                 'mambaforge-4.10': 'mambaforge-4.10.3-10',
             },
             'nodejs': {
                 '14': '14.20.1',
-                '16': '16.18.0',
-                '18': '18.11.0',
-                '19': '19.0.0',
+                '16': '16.18.1',
+                '18': '18.16.1',  # LTS
+                '19': '19.0.1',
+                '20': '20.3.1',
             },
             'rust': {
                 '1.55': '1.55.0',
                 '1.61': '1.61.0',
                 '1.64': '1.64.0',
+                '1.70': '1.70.0',
             },
             'golang': {
                 '1.17': '1.17.13',
-                '1.18': '1.18.7',
-                '1.19': '1.19.2',
+                '1.18': '1.18.10',
+                '1.19': '1.19.10',
+                '1.20': '1.20.5',
             },
         },
     }


Test patch: