rustls / rustls/rustls-ffi

improved handling of static libraries list

Open
#313 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
170
Forks
43
Avg merge
1d 1h
Merged PRs (30d)
10

Description

When we produce a library, it relies on a number of symbols that come from other libraries we expect to link against. For instance, on Linux our library should be linked with:

-lrustls -lgcc_s -lutil -lrt -lpthread -lm -ldl -lc

Mainly these dependencies come from the Rust standard library, which, for instance, requires pthread for its threading capabilities. I believe they can also come from our set of transitive dependencies (need to check).

We can get this list of libraries from rustc --print native-static-libs.

We document the list in our README, and have a test that it remains up-to-date across rustc versions. Across recent rustc releases, that test has flapped a bit, particularly with the inclusion / un-inclusion of legacy_stdio_definitions.lib (which occurs in two places in the linking list for Windows).

We should run --print native-static-libs across several recent rustc versions and see how its value has changed, particularly with an eye towards how it affects MSRV. Also it's worth noting: in my experience not all of the listed libraries are actually required to link rustls; it's a conservative set. So for instance we could start explicitly ignoring certain of them.

We should also check the issue / PR history for rustc and maybe file an issue to better understand whether legacy_stdio_definitions is meant to be included, and in what position(s).

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 with the README's documented native library list and the test that checks it across rustc versions. Run rustc --print native-static-libs for several recent versions, compare the results with the current test and MSRV, and review rustc issue/PR history concerning legacy_stdio_definitions; done means the list and test handle the observed variations consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
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.