Thank you so much @carols10cents , I'm here.
Salute to all the experts here! I'm a Rust newbie who has gone through great lengths to scale China's "Great Firewall" (GFW) to be here. After seeing this question, I couldn't help but chime in with some humble suggestions.
I've forked the RFC repository, but I'm feeling a bit nervous about whether submitting a PR directly would be too presumptuous, so I'm leaving a comment here first to share my organized thoughts. The original proposal was written in Chinese and then translated using deepseek, so I hope it's understandable.
If it's convenient, I'd appreciate any guidance from the experts on how a newbie like me can contribute to Rust. Thank you again! Below are my small suggestions:
New Proposal
Prerequisites
Record crate status in crates.io with the following states:
pub enum CrateStatus {
/// Clients do not update this version but allow developers to specify it manually.
PreRelease(TimeRange),
Release, // default status.
/// This version should be prominently marked on both the website and client.
LimitedRelease(SemVerRange),
GoverningRelease(TimeRange),
/// Clients do not update this version but allow developers to specify it manually.
PreDelete(TimeRange),
}
These statuses will support the deletion mechanisms below.
Deletion Mechanisms
1. Author-Initiated Deletion
- Crates with version
0.1.x
published less than 8 hours ago.
2. Conditional Deletion
- Long-unmaintained crates with version
0.1.x
.
3. Manual Deletion
- Crates with critical issues and no active maintainers.
Rationale
0.1.x
and 8h
Crates with version 0.1.x
on crates.io are typically experimental. Authors consider them unsuitable for production use, aligning with SemVer conventions. Most authors adhere to this practice.
If a crate was published for learning purposes, authors often wish to delete it after achieving their goals. However, current policies prevent such deletions. Thus, providing a time window (e.g., 8 hours or longer) before indexing these versions is essential.
Such crates should initially have the status PreRelease(0h..8h)
. During this window, authors may freely delete them. After expiration, the status automatically transitions to Release
.
Automated Deletion
Due to historical policies, many 0.1.x
crates on crates.io are unmaintained and occupy desirable names (e.g., reqwest
vs. request
). This creates confusion and technical debt. New developers should not need to navigate such legacy issues.
A scheduled task will check 0.1.x
crates in Release
status and set their status to GoverningRelease(0d..90d)
. If no maintenance occurs within 90 days, the status transitions to PreDelete(0d..3d)
, and authors are notified via email. If unresolved after 3 days, the crate name enters a pre-deletion state on crates.io, allowing others to claim it.
Once a new crate uses the name, the system permanently deletes the old crate.
Manual Deletion
For critical issues in active crates, authors may request deletion by setting the status to PreDelete(0d..3d)
. After submitting a fixed version, authors can delete the problematic version at an appropriate time.
Direct deletions may impact dependent projects. Client tools must warn users about deleted versions and automatically upgrade to fixed versions. For abandoned crates with critical issues, the crates.io team may manually set the status to PreDelete(0d..60d)
. If the original maintainer returns during this period and provides a fix, only the problematic version is deleted.
Caching Considerations
Testing crates have limited impact and require no special handling. For widely used crates, client tools must support version deprecation warnings and automatic upgrades to fixed versions.
Renaming Proposal
The LimitedRelease
status can facilitate name swaps between crates. For example, renaming reqwest(0.11.0)
to request(1.1.1)
would follow this process:
- The
request
author transfers ownership toreqwest
and adopts a new name (e.g.,support_community_development
). - The
reqwest
author accepts the namerequest
. - The system sets
reqwest
toLimitedRelease(0..0.11.0)
. - The system sets
request
toLimitedRelease(2.0.0..)
. Name changes are breaking changes and require a major version bump. - The system sets
request
toLimitedRelease(0..1.1.1)
.
Clients resolving dependencies for request
within 0..1.1.1
will use the original crate, while versions >=2.0.0
will resolve to the renamed reqwest
crate. This preserves backward compatibility and resolves legacy naming conflicts.
Drawbacks
Significant coding effort is anticipated.