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

Rust nightly compiler #52803

Open
jianshu93 opened this issue Dec 14, 2024 · 13 comments
Open

Rust nightly compiler #52803

jianshu93 opened this issue Dec 14, 2024 · 13 comments

Comments

@jianshu93
Copy link
Contributor

Dear Bioconda team,

I noticed that the default Rust compiler is the stable version. Is that possible to use the nightly Rust since the new SIMD or stdsimd are all under the nightly version, which will be in the stable version in the near future. I do not know how when choose compilers like this:

  • {{ compiler('rust') }}

Thanks,

Jianshu

@martin-g
Copy link
Contributor

martin-g commented Dec 16, 2024

I see no way to specify the Rust compiler version with conda_build_config.yaml
You could try:

- {{ compiler("rust") }}
- rust ==nightly-2024-12-15

@xhochy
Copy link

xhochy commented Dec 16, 2024

You will need to add the conda-forge/label/rust_dev as a channel source. The nightly builds are not on the main channel but in a separate label.

@martin-g
Copy link
Contributor

I might be wrong but I think Bioconda hardcodes conda-forge and bioconda channels in bioconda_utils Python code and usage of third party channels is forbidden ...

@martin-g
Copy link
Contributor

Although I have seen recipes using syntax like - bioconda::some_dependency.
@jianshu93 Please try with - conda-forge/label/rust_dev::rust ==nightly-2024-12-15

@xhochy
Copy link

xhochy commented Dec 16, 2024

The version is different, you will need:

- conda-forge/label/rust_dev::rust_{{ target_platform }} 1.85.0
- conda-forge/label/rust_dev::rust 1.85.0.dev20241213

We don't build every nightly, only from time to time.

@jianshu93
Copy link
Contributor Author

Hi all ,

Thanks for the help. Nightly 1.85 will be good. So I just add the 2 lines suggested under dependency part? Other parts remain the same?

I have a software like this:https://github.com/bioconda/bioconda-recipes/blob/master/recipes/gsearch/meta.yaml

After adding the 2 lines there, I will chang the build part to use a SIMD feature that is only available in nightly version. Why not use rustup to manage stable and nightly inside bioconda.

Thanks,

Jianshu

@martin-g
Copy link
Contributor

Thanks for the help. Nightly 1.85 will be good. So I just add the 2 lines suggested under dependency part? Other parts remain the same?

I think you are the first one requesting this in Bioconda, so I am not sure whether it will work or not. Try it!

Why not use rustup to manage stable and nightly inside bioconda.

If the above does not work then you could try this too. Just make sure you use a pinned version of nightly!

@xhochy
Copy link

xhochy commented Dec 16, 2024

If the above does not work then you could try this too. Just make sure you use a pinned version of nightly!

That will mean though, that compiler flags will not be correctly setup for the binary, especially if you are cross-compiling.

@martin-g
Copy link
Contributor

There is no cross-compilation at Bioconda. All builds run on native platforms.
linux-aarch64 and osx-arm64 are built on CircleCI.
linux-ppc64le is not supported.

@danielnachun
Copy link

An alternative solution here might be to see if export RUSTC_BOOTSTRAP=1 works with the latest stable compiler. This has worked with no issues for all the recipes I've submitted which claimed to need a nightly compiler, and is the standard approach used by many other package managers.

@jianshu93
Copy link
Contributor Author

Hi @danielnachun, Do you mean in the build.rs I add this line at the very beginning. I am not sure how stable Rust and nightly Rust was deployed inside conda.

Thanks,
Jianshu

@jianshu93
Copy link
Contributor Author

  • conda-forge/label/rust_dev::rust_{{ target_platform }} 1.85.0
  • conda-forge/label/rust_dev::rust 1.85.0.dev20241213

Do I use Linux or linux? Not sure the rules for it. It took quite long tom compile Rust on bioconda.

Thanks,
Jianshu

@danielnachun
Copy link

Hi @danielnachun, Do you mean in the build.rs I add this line at the very beginning. I am not sure how stable Rust and nightly Rust was deployed inside conda.

Thanks,

Jianshu

You would set this in your build.sh. See here for an example: https://github.com/conda-forge/swc-feedstock/blob/main/recipe/build.sh

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

No branches or pull requests

4 participants