Skip to content

load, cache & show std replacements - #3532

Closed
syphar wants to merge 1 commit into
rust-lang:mainfrom
syphar:std-replacements
Closed

syphar wants to merge 1 commit into
rust-lang:mainfrom
syphar:std-replacements

Conversation

@syphar

@syphar syphar commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

TODO

  • perhaps, if we can get a pure crate specific url for std replacements, can we drop the cache completely? and just live-fetch all the time per crate?

summary

Here we start showing crate warnings in the topbar.

First is the std-replacement data.
We're using a small partial so we can cache it independently from the rustdoc content.

For now, CDN caching is just a TTL of 10 minutes, with room for improvement.

We load the data from the json endpoint, which is properly cached through github pages.

For now we just run a scheduled task that updates the data every hour, happy to change the frequency.

first UI draft

image

First draft of the rendering, happy to take ideas? or help?

next steps

Idea is that I'll add rustsec "unmaintained" warnings as next thing, because they are relatively easy to interpret and also fit into the "crate warning" logic. In my mind I would show a second widget in the topbar if both warnings are raised by the same crate.

@syphar syphar self-assigned this Sep 17, 2026
@github-actions github-actions Bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Sep 17, 2026
@rustbot

This comment has been minimized.

@syphar syphar changed the title WIP: load, cache & show std replacements load, cache & show std replacements Sep 23, 2026
@syphar

syphar commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

This is how crates.io renders the same warning:
image

Generally I feel like I want to find a way that we don't have to make the topbar bigger.

But not sure if this is worth a dropdown? or detail page like for the abnormalities?

@syphar syphar closed this Sep 23, 2026
@syphar
syphar deleted the std-replacements branch September 30, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants