Skip to content

Load the README's benchmark figure through github.com - #11

Merged
clabby merged 1 commit into
spare-heapsfrom
readme-figure
Nov 14, 2026
Merged

clabby merged 1 commit into
spare-heapsfrom
readme-figure

Conversation

@clabby

@clabby clabby commented Nov 14, 2026

Copy link
Copy Markdown
Owner

The bug. The figure in the README's Benchmarks section did not load on GitHub, and the link around it went to a 404.

  • Why: the figure pointed at raw.githubusercontent.com, which serves a private repository's files only with a token.
  • The fix: use https://github.com/clabby/bcmalloc/raw/main/assets/benchmarks.svg instead. That is the URL GitHub itself uses for a relative image. The request goes with the viewer's session and redirects to a raw URL that carries a token.
  • Why not a relative path: the URL stays absolute, which the crate docs need, because lib.rs includes the README. Once the repository is public, it redirects for everyone.

Checks: just bench-check, which confirms that the line sits outside the generated sections. I could not load the page in a logged-in browser from here, so the image itself is unconfirmed until you view the README on this branch.

Stacked on #9.

The figure in the README's Benchmarks section pointed at
raw.githubusercontent.com, which serves a private repository's files only
with a token, so GitHub showed a broken image and the link around it went to
a 404. A github.com/<repo>/raw/ URL is the one GitHub uses for a relative
image: it goes with the viewer's session and redirects to a raw URL with a
token. It stays absolute, which the crate docs need, because lib.rs includes
the README, and once the repository is public it redirects for everyone.
@clabby
clabby merged commit 92493a5 into main Nov 14, 2026
13 checks passed
@clabby
clabby deleted the readme-figure branch November 14, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant