-
Notifications
You must be signed in to change notification settings - Fork 113
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
Update notes about static linking and MUSL #224
Conversation
People often use the edition guide as general documentation of capabilities, not just for Rust 2018. There is extensive information on the web suggesting that Rust *only* supports static linking with MUSL. Add a note documenting current capabilities, so that people know they have a choice of libc implementations even if they need static linking.
d387919
to
964782b
Compare
cc @estebank |
Thanks @joshtriplett ! Just so you know, the current state of the edition RFC would be to remove the vast majority of the edition guide, and until that RFC is merged, I've effectively stopped work here entirely. |
@steveklabnik That's fair, but until that change happens, I've seen people use and cite the edition guide as a reference for the capabilities of Rust. I don't mind if this text ends up deleted later to make way for something else. Would you consider merging it in the interim? |
I think we shouldn't just remove the information -- I would like to see it put elsewhere (maybe something like a "Feature List" or whatever, not sure on naming), but regardless I agree that merging this in the interim makes sense to me. The reason we are thinking of dropping it from the Edition Guide in particular is that people were confused about whether the features were tied to a particular edition or not, I believe. |
(Note: current Rust (as of 1.48) supports static linking with either glibc or | ||
MUSL, so you can select whichever libc you need or prefer.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure it is 1.48? I thought static support is in 1.49 (rust-lang/rust#77386).
I would suggest being a little clearer here, and providing an example:
(Note: current Rust (as of 1.48) supports static linking with either glibc or | |
MUSL, so you can select whichever libc you need or prefer.) | |
> Note: Starting with Rust 1.49, the Linux glibc targets also support static | |
> linking the C runtime. This can be done with the [`+crt-static` target feature][crt-static]. | |
> For example, with Cargo: | |
> | |
> ```console | |
> RUSTFLAGS="-C target-feature=+crt-static" cargo build --target x86_64-unknown-linux-gnu | |
> ``` | |
[crt-static]: ../../../reference/linkage.html#static-and-dynamic-c-runtimes |
I would also put this at the bottom of this section (just before ## Installing MUSL support
).
I'm fine with minor updates until the fate of the guide is determined. Also, in the future I would like to see platform-specific documentation added to the |
Ping @joshtriplett Are you still interested in this? |
People often use the edition guide as general documentation of
capabilities, not just for Rust 2018. There is extensive information
on the web suggesting that Rust only supports static linking with
MUSL. Add a note documenting current capabilities, so that people know
they have a choice of libc implementations even if they need static
linking.