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

Package request: rust-src #43716

Closed
Zapeth opened this issue May 2, 2023 · 8 comments
Closed

Package request: rust-src #43716

Zapeth opened this issue May 2, 2023 · 8 comments
Labels
request Package request

Comments

@Zapeth
Copy link
Contributor

Zapeth commented May 2, 2023

Package name

rust-src

Package homepage

https://github.com/rust-lang/rust

Description

It looks like the rust package is missing the std and core source files that would normally be required for language-servers to provide analysis (ie rust-analyzer).

I'm not sure what configuration steps would be necessary to provide the source files as a separate package, it seems it might be possible to include them in the build with the extended and tools settings in the rust config.toml.

Alpine also provides the source files as a separate package (https://pkgs.alpinelinux.org/package/edge/community/x86_64/rust-src), but I don't know how much can be gleaned from their template, if anything.

Sidenote: rust-analyzer currently doesn't work out of the box with the rust package due to the missing sources, setting up this package and adding it as an optional dependency to rust-analyzer should hopefully fix that.

Does the requested package meet the package requirements?

Required

Is the requested package released?

Yes

@Zapeth Zapeth added the request Package request label May 2, 2023
@Zapeth Zapeth changed the title Package request: Package request: rust-src May 2, 2023
@tranzystorekk
Copy link
Contributor

The rust package is almost exclusively for building void's rust packages, for development purposes you'll want to use rustup. I'm guessing rust-analyzer can be configured to use sources from there.

@Zapeth
Copy link
Contributor Author

Zapeth commented May 3, 2023

The rust package is almost exclusively for building void's rust packages

Yes, thats why I suggested it as a separate package

for development purposes you'll want to use rustup

I'd prefer sticking to the distro-packaged variants if possible (rust-dbg and rust-doc were also accepted as separate packages)

@classabbyamp
Copy link
Member

The rust package is almost exclusively for building void's rust packages

generally yes, but there is also the case of platforms which rustup doesn't support but void does

@nekopsykose
Copy link

i also personally only ever use the packaged rust toolchains

for -src specifically, you only need to add src to the built tools and then the rust-src-*.tar* is generated, which has the sources to unpack into destdir

@tranzystorekk
Copy link
Contributor

Sounds reasonable, I can prepare a PR then

@classabbyamp
Copy link
Member

let's just include it in the next rust update

@tranzystorekk
Copy link
Contributor

Pending addition in #44220

@Zapeth
Copy link
Contributor Author

Zapeth commented Jun 16, 2023

Installed and tested with rust-analyzer, which indeed seems to work out of the box now, thanks

@Zapeth Zapeth closed this as completed Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request Package request
Projects
None yet
Development

No branches or pull requests

4 participants