conda-forge / rust-feedstock

A conda-smithy repository for rust.
BSD 3-Clause "New" or "Revised" License
7 stars 26 forks source link

Is it possible to include `rust-src` in the conda package? #110

Closed AngryMaciek closed 2 years ago

AngryMaciek commented 2 years ago

Comment:

I am not a rust developer (at all).

I would like to prepare a Jupyter Lab server with Rust kernel available. It seems that despite installing required packages from Anaconda Cloud I am still missing rust-src in my dedicated jupyter conda environment. I get:

Error: Failed to find sysroot for Cargo.toml file /tmp/.tmpbZ0Pkw/Cargo.toml. Is rust-src installed?

Please take a look here (https://github.com/google/evcxr/issues/222) for more information.

Is it possible to include rust-src in this feedstock?
Are there any alternatives of how to install this package in a conda env?

pkgw commented 2 years ago

If we were to provide rust-src, it would make more sense to provide it as a separate package, since the files aren't needed for building Rust in most circumstances (in fact it's strange to me that the JLab Rust kernel needs it, but I'm sure they have a reason). The Rust package is already pretty big and I have to imagine that rust-src is large as well.

I'm going to close this issue since it looks like you were able to find a workaround in the issue thread that you linked above. If people continue running into this issue with JLab+Rust then perhaps we should revisit, but for the time being my recommendation would be to point people toward the workaround in https://github.com/google/evcxr/issues/222#issuecomment-1135625829 .

bjorn3 commented 2 years ago

in fact it's strange to me that the JLab Rust kernel needs it, but I'm sure they have a reason

Evcxr internally uses rust-analyzer for figuring out the types of variables to generate the right code necessary to preserve them across multiple code blocks. For this rust-analyzer needs the source of the standard library as it doesn't know how to read the metadata in compiled rust libraries like rustc does.

The Rust package is already pretty big and I have to imagine that rust-src is large as well.

The gzipped source tarball is about 3MB. Unpacked it is about 27MB. This is not a whole lot compared to the whole package. I understand if you think it is too much anyways though.

pkgw commented 2 years ago

The gzipped source tarball is about 3MB. Unpacked it is about 27MB.

Oh, that's not as bad as I'd have guessed. I'd still like to wait and see how much of a need there is for the source files, but that's good to know. Thanks for actually checking!