rust-lang / rust-lang/rust

Better documentation about which libraries are linked by default by the rust compiler

Open
#139,619 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-docs A-linkage O-windows T-compiler T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Location

Release notes, possibly the reference, not sure where else

Summary

There is currently no documentation about which system libraries are linked by rustc via the standard library and which of these libraries are guaranteed to be linked in the future. This was noticed while reporting #139352 and should likely be fixed before that change is stable.

Ideally there would be a list/table of linked libraries per target for at least tier 1 targets that contains all linked system libraries and also clarify which of these libraries are guaranteed to be linked in the future. (If none are guaranteed to be linked that's also fine, if that's stated explicitly). In addition it would be great to include documentation on how to test if your code relies on such not-guaranteed linkage. For windows that seems to be the command described by @ChrisDenton here. I'm not sure if similar commands exist for other platforms?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading issue #139352 and the linked Windows command discussion, then compare the release notes and Rust Reference as possible documentation locations. Done means documenting linked system libraries and their future guarantees for at least tier 1 targets, along with platform-specific ways to test reliance on non-guaranteed linkage.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.