rust-lang / rust-lang/rfcs

Proposal: Modular standard library and crates.io improvements

Open
#2,989 11 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Markdown
Stars
6.6k
Forks
1.7k
Avg merge
16h 14m
Merged PRs (30d)
1

Description

Rust has a small standard library because they don't want to add something bad to the standard library because if they do they won't fix or remove it because it would break compatibility. I've been thinking of a solution and this is what I've come up with:

Before I explain my modular standard library idea I need to explain my crates.io improvements:

  1. There will be crate titles for crates with the default title being unverified. If a crate is verified it means there's nothing malicious about it. If a crate is official it means it's maintained by the official Rust team. If a crate is unverified it means the crate isn't gaurenteed to be safe.
  2. Precompiled crates for efficiency.
  3. Crate groups, let's say somebody wants to add a ton of packages as dependencies for their project but they don't want all of it cluttering their cargo.toml. You'd go onto crates.io and create a crate group with all the specified crates. Multiple versions of these groups can be made like with normal creates (so 1.0.0, 1.2.4, 2.0.5, etc).

Now with all that out of the way this is my proposal which would allow the Rust standard library to be big with the freedom to make breaking changes without breaking compatibility:

Make every little part of the standard library a crate and have the standard library be a crate group that's added by default. This way there can be different versions of every module that's part of the standard library so breaking changes can be made and corrected without breaking anything because developers could simply use an older version of that specific crate from the standard library.

Contributor guide

No contributing guide indexed for this repository

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

No files, tests, or entry points are named. Start by reviewing the RFC process and the existing Rust standard-library and crates.io architecture, then determine the scope and compatibility model for the proposal. Done would require a concrete, reviewable RFC rather than a broad concept.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.