{"id":13484787,"url":"https://github.com/rust-lang/reference","last_synced_at":"2025-05-14T03:12:05.073Z","repository":{"id":37514870,"uuid":"83575374","full_name":"rust-lang/reference","owner":"rust-lang","description":"The Rust Reference","archived":false,"fork":false,"pushed_at":"2025-05-06T22:14:12.000Z","size":5273,"stargazers_count":1371,"open_issues_count":301,"forks_count":530,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-05-06T22:33:18.826Z","etag":null,"topics":["documentation","reference","rust","rust-lang"],"latest_commit_sha":null,"homepage":"https://doc.rust-lang.org/nightly/reference/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","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,"zenodo":null}},"created_at":"2017-03-01T16:21:06.000Z","updated_at":"2025-05-06T22:14:15.000Z","dependencies_parsed_at":"2023-10-15T20:08:11.773Z","dependency_job_id":"0e0e66c6-7da6-4aac-9dd4-d510f55dcb31","html_url":"https://github.com/rust-lang/reference","commit_stats":null,"previous_names":["rust-lang-nursery/reference"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Freference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Freference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Freference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-lang%2Freference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-lang","download_url":"https://codeload.github.com/rust-lang/reference/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254059521,"owners_count":22007771,"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","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":["documentation","reference","rust","rust-lang"],"created_at":"2024-07-31T17:01:33.613Z","updated_at":"2025-05-14T03:12:00.063Z","avatar_url":"https://github.com/rust-lang.png","language":"Rust","readme":"# The Rust Language Reference\n\nThis document is the primary reference for the Rust programming\nlanguage.\n\nThis document is not normative. It may include details that are specific\nto `rustc` itself, and should not be taken as a specification for the\nRust language. We intend to produce such a document someday, but this is\nwhat we have for now.\n\n## Dependencies\n\n- Nightly Rust\n- [mdbook](https://rust-lang.github.io/mdBook/)\n\n## Installing dependencies\n\nFirst, ensure that you have a recent copy of the nightly Rust compiler\ninstalled, as this is needed in order to run the tests:\n\n```sh\nrustup toolchain install nightly\n```\n\nNow, ensure you have `mdbook` installed, as this is needed in order to\nbuild the Reference:\n\n```sh\ncargo install --locked mdbook\n```\n\n## Building\n\nTo build the Reference, first clone the project:\n\n```sh\ngit clone https://github.com/rust-lang/reference.git\n```\n\n(Alternatively, if you don't want to use `git`, [download][] a ZIP file\nof the project, extract it using your preferred tool, and rename the\ntop-level directory to `reference`.)\n\n[download]: https://github.com/rust-lang/reference/archive/refs/heads/master.zip\n\nNow change your current directory to the working directory:\n\n```sh\ncd reference\n```\n\nTo test all of the code examples in the Reference, run:\n\n```sh\nmdbook test\n```\n\nFor authors, consider using the server functionality which supports automatic reload.\n\nTo build the Reference locally (in `build/`) and open it in a web\nbrowser, run:\n\n```sh\nSPEC_RELATIVE=0 mdbook build --open\n```\n\nThis will open a browser with a websocket live-link to automatically reload whenever the source is updated.\n\nYou can also use mdbook's live webserver option, which will automatically rebuild the book and reload your web browser whenever a source file is modified:\n\n```sh\nSPEC_RELATIVE=0 mdbook serve --open\n```\n\n### `SPEC_RELATIVE`\n\nThe `SPEC_RELATIVE=0` environment variable makes links to the standard library go to \u003chttps://doc.rust-lang.org/\u003e instead of being relative, which is useful when viewing locally since you normally don't have a copy of the standard library.\n\nThe published site at \u003chttps://doc.rust-lang.org/reference/\u003e (or local docs using `rustup doc`) does not set this, which means it will use relative links which supports offline viewing and links to the correct version (for example, links in \u003chttps://doc.rust-lang.org/1.81.0/reference/\u003e will stay within the 1.81.0 directory).\n\n### `SPEC_DENY_WARNINGS`\n\nThe `SPEC_DENY_WARNINGS=1` environment variable will turn all warnings generated by `mdbook-spec` to errors. This is used in CI to ensure that there aren't any problems with the book content.\n\n### `SPEC_RUST_ROOT`\n\nThe `SPEC_RUST_ROOT` can be used to point to the directory of a checkout of \u003chttps://github.com/rust-lang/rust\u003e. This is used by the test-linking feature so that it can find tests linked to reference rules. If this is not set, then the tests won't be linked.\n","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-lang%2Freference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-lang%2Freference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-lang%2Freference/lists"}