Skip to content

replace source view / handler with redirect to crates.io source view - #3390

Draft
syphar wants to merge 1 commit into
rust-lang:mainfrom
syphar:no-source
Draft

replace source view / handler with redirect to crates.io source view#3390
syphar wants to merge 1 commit into
rust-lang:mainfrom
syphar:no-source

Conversation

@syphar

@syphar syphar commented Jul 2, 2026

Copy link
Copy Markdown
Member

IMO with the new crates.io source browser, we don't need our (super old) source browser any more.
Of course we'll keep the rustdoc source browsers. storage-features that were only there for the source browser can go too.

Happy to discuss, not sure if I forget use-cases that crates.io doesn't support?

  • SEO / crawling?
  • binary file download from the archive (I'm actually fine with removing this, for security)

I spent some time to build it in a way that old URLs to specific files are properly redirected to the corresponding crates.io source file.

Source archives stay for now, we use them to fetch readme's later. I might switch that to fetching them from crates.io too, let's see.

When this is deployed and works fine, we can stop storing the source file list in releases.files and drop the column. This will save us some storage and give us some performance.

@syphar syphar self-assigned this Jul 2, 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 Jul 2, 2026
@syphar
syphar force-pushed the no-source branch 3 times, most recently from 51bfa85 to de70f3e Compare July 2, 2026 05:11
@syphar
syphar marked this pull request as ready for review July 2, 2026 05:12
@syphar
syphar requested a review from a team as a code owner July 2, 2026 05:12
@syphar
syphar force-pushed the no-source branch 2 times, most recently from eb421cd to eb8c2ca Compare July 2, 2026 06:40
@syphar

This comment was marked as outdated.

@GuillaumeGomez

Copy link
Copy Markdown
Member

crates.io source view doesn't work without JS unlike docs.rs. Not sure if important or not though...

@syphar

syphar commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

crates.io source view doesn't work without JS unlike docs.rs. Not sure if important or not though...

oh yeah, valid point. Do you have a tendency?

Non-JS People won't even reach the source view through the menu, only way is probably through search results somehow.

@GuillaumeGomez

Copy link
Copy Markdown
Member

Someone mentioned on the crates.io zulip thread that it was an issue for them.

@syphar

syphar commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Someone mentioned on the crates.io zulip thread that it was an issue for them.

I'm wondering:

  • if there are enough no-js users to justify a third code browser, and
  • if the non-js users would be fine with the rustdoc source view, which seems to work without js too?

@GuillaumeGomez

Copy link
Copy Markdown
Member

if there are enough no-js users to justify a third code browser, and

I'd say no. But considering we had a meeting about rust websites coherency, I would have expected such discussions to happen before crates.io team decided to do it on their own with an inferior version in pretty much all regards, leaving the debate for us to decide if it's worth keeping these pages or just remove them and leave them to crates.io's.

if the non-js users would be fine with the rustdoc source view, which seems to work without js too?

The rustdoc output is incomplete, it doesn't list all files in the published crate, so the end goal is different.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@syphar
syphar force-pushed the no-source branch 2 times, most recently from cad329a to 1cdb098 Compare July 24, 2026 06:26
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot

rustbot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@syphar
syphar marked this pull request as draft August 5, 2026 04: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.

3 participants