{"id":24290636,"url":"https://github.com/nocduro/rustref","last_synced_at":"2025-08-20T21:08:39.101Z","repository":{"id":136265780,"uuid":"121932941","full_name":"nocduro/rustref","owner":"nocduro","description":"Rust documentation redirects","archived":false,"fork":false,"pushed_at":"2019-05-16T00:03:54.000Z","size":82,"stargazers_count":2,"open_issues_count":7,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-06T02:33:02.244Z","etag":null,"topics":["cloudflare","rocket","rust","tera"],"latest_commit_sha":null,"homepage":"https://rustref.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nocduro.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-18T08:26:47.000Z","updated_at":"2020-04-25T17:37:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7c31b23-d9b0-42d3-927e-dcc648a4726a","html_url":"https://github.com/nocduro/rustref","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nocduro/rustref","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nocduro%2Frustref","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nocduro%2Frustref/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nocduro%2Frustref/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nocduro%2Frustref/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nocduro","download_url":"https://codeload.github.com/nocduro/rustref/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nocduro%2Frustref/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271385980,"owners_count":24750509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","rocket","rust","tera"],"created_at":"2025-01-16T11:53:57.860Z","updated_at":"2025-08-20T21:08:39.065Z","avatar_url":"https://github.com/nocduro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rustref.com - Rust documentation redirects\nSource code for https://rustref.com - a shorthand for navigating to [Rust](https://rust-lang.org) documentation.\n\nExamples:\n```\nstd.rustref.com -\u003e standard libary documentation\ncook.rustref.com -\u003e rust cookbook\nex.rustref.com -\u003e rust by example\n...\n```\n\nBuilt with [Rocket](https://rocket.rs) 🚀\n\n## Overview\nWhen a request to `*.rustref.com/**` (that is not `www`), a Cloudflare page rule transforms the request to: `https://rustref.com/redirect/*/**` which then contacts the Rocket server (or uses the cached value in Cloudflare if available).\nThe Rocket server then sends a 302 response code with the redirect domain to Cloudflare.\nCloudflare will cache this value for 7 days in their proxy, and also set the cache header for the client to expire in 8 days.\nThis should hopefully make subsequent lookups faster, no matter where you are in the world. \n\nRedirect information is stored in the `redirects.toml` file in this repository, and the Rocket server converts it into a HashMap for fast lookups. \n\nThe redirects in the HashMap are updated whenever `redirects.toml` in the master branch is changed.\n\nUnfortunately Cloudflare does not offer wildcard proxied CNAME dns records, so the Rocket server makes a new CNAME record for each `short` field in `redirects.toml`.\nI think normally people would use a bunch of Page rules with Cloudflare so an origin server isn't needed, but Cloudflare only offers 3 free page rules per domain, and I'm cheap.\n\nThis is my first website with an actual server/backend, so if I'm doing something wrong, let me know!\n\nCSS ~~copied~~ inspired by http://neverssl.com\n\n## Hosting/architecture\nBrowser -\u003e Cloudflare (free tier) -\u003e Google Cloud Platform free tier (US Central) -\u003e [Caddy](https://caddyserver.com) -\u003e Rocket server\n\n## Contributing\nModify `redirects.toml` with a new redirect (in alphabetic order) then make a pull request. \nCI (not setup yet!) will check that the links are valid, and when merged to master a webhook will tell the server to update its redirect HashMap, and clear Cloudflare's cache.\n\nIf there is an official site like this, let me know and I can redirect all traffic there.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnocduro%2Frustref","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnocduro%2Frustref","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnocduro%2Frustref/lists"}