Skip to content

Legacy dependencies cause duplicated crates and larger binaries #1339

@gekh

Description

@gekh

Describe the feature

Current duplicate dependencies:
• legacy-hyper-rustls
• legacy-rustls

These legacy dependencies force inclusion of older versions like rustls v0.21.12, which leads to duplicated crates in the build. This significantly increases binary size, especially problematic for use cases like AWS Lambda, where larger binaries impact cold start time.

Request:
Please remove these legacy dependencies from the default feature set to avoid unnecessary duplication and bloat in downstream builds.

Use Case

I’m building lightweight Rust applications for AWS Lambda, where binary size directly impacts cold start time. The inclusion of legacy-hyper-rustls and legacy-rustls causes duplicate versions of rustls (such as v0.21.12) to be pulled in, even when I’m already using the latest rustls elsewhere in my project. This bloats the binary and slows down startup performance, which is critical in serverless environments.

Proposed Solution

Remove legacy-hyper-rustls and legacy-rustls from the default feature set. This allows users to opt into legacy support only when explicitly needed, avoiding unnecessary dependency duplication and keeping builds minimal by default.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

A note for the community

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue, please leave a comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions