{"id":13467771,"url":"https://github.com/LukeMathWalker/zero-to-production","last_synced_at":"2025-03-26T03:31:06.079Z","repository":{"id":37632627,"uuid":"289662083","full_name":"LukeMathWalker/zero-to-production","owner":"LukeMathWalker","description":"Code for \"Zero To Production In Rust\", a book on API development using Rust.","archived":false,"fork":false,"pushed_at":"2024-09-01T09:52:06.000Z","size":1175,"stargazers_count":5992,"open_issues_count":20,"forks_count":533,"subscribers_count":79,"default_branch":"main","last_synced_at":"2025-03-26T01:07:16.129Z","etag":null,"topics":["book","rust"],"latest_commit_sha":null,"homepage":"https://www.zero2prod.com","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/LukeMathWalker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2020-08-23T10:18:19.000Z","updated_at":"2025-03-25T10:52:56.000Z","dependencies_parsed_at":"2023-02-01T03:16:02.184Z","dependency_job_id":"c7ae25cd-50ea-4be9-974f-5d996dc5ba94","html_url":"https://github.com/LukeMathWalker/zero-to-production","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeMathWalker%2Fzero-to-production","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeMathWalker%2Fzero-to-production/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeMathWalker%2Fzero-to-production/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeMathWalker%2Fzero-to-production/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LukeMathWalker","download_url":"https://codeload.github.com/LukeMathWalker/zero-to-production/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245584673,"owners_count":20639602,"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":["book","rust"],"created_at":"2024-07-31T15:01:00.330Z","updated_at":"2025-03-26T03:31:06.068Z","avatar_url":"https://github.com/LukeMathWalker.png","language":"Rust","readme":"# Zero To Production In Rust\n\n\u003cdiv align=\"center\"\u003e\u003ca href=\"https://zero2prod.com\" target=\"_blank\"\u003e\u003cimg src=\"https://www.zero2prod.com/assets/img/zero2prod.png\" width=\"75%\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\n[Zero To Production In Rust](https://zero2prod.com) is an opinionated introduction to backend development using Rust.\n\nThis repository serves as supplementary material for [the book](https://zero2prod.com/): it hosts several snapshots of the codebase for our email newsletter project as it evolves throughout the book.\n\n## Chapter snapshots\n\nThe [`main`](https://github.com/LukeMathWalker/zero-to-production) branch shows the project at the end of the book.\n\nYou can browse the project at the end of previous chapters by switching to their dedicated branches:\n\n- [Chapter 3, Part 0](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-03-part0)\n- [Chapter 3, Part 1](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-03-part1)\n- [Chapter 4](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-04)\n- [Chapter 5](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-05)\n- [Chapter 6, Part 0](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-06-part0)\n- [Chapter 6, Part 1](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-06-part1)\n- [Chapter 7, Part 0](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-07-part0)\n- [Chapter 7, Part 1](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-07-part1)\n- [Chapter 7, Part 2](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-07-part2)\n- [Chapter 8](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-08)\n- [Chapter 9](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-09)\n- [Chapter 10, Part 0](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-10-part0)\n- [Chapter 10, Part 1](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-10-part1)\n- [Chapter 10, Part 2](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-10-part2)\n- [Chapter 10, Part 3](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-10-part3)\n- [Chapter 11](https://github.com/LukeMathWalker/zero-to-production/tree/root-chapter-11)\n\n## Pre-requisites\n\nYou'll need to install:\n\n- [Rust](https://www.rust-lang.org/tools/install)\n- [Docker](https://docs.docker.com/get-docker/)\n\nThere are also some OS-specific requirements.\n\n### Windows\n  \n```bash\ncargo install -f cargo-binutils\nrustup component add llvm-tools-preview\n```\n\n```\ncargo install --version=\"~0.7\" sqlx-cli --no-default-features --features rustls,postgres\n```\n\n### Linux\n\n```bash\n# Ubuntu \nsudo apt-get install lld clang libssl-dev postgresql-client\n# Arch \nsudo pacman -S lld clang postgresql\n```\n\n```\ncargo install --version=\"~0.7\" sqlx-cli --no-default-features --features rustls,postgres\n```\n\n### MacOS\n\n```bash\nbrew install michaeleisel/zld/zld\n```\n\n```\ncargo install --version=\"~0.7\" sqlx-cli --no-default-features --features rustls,postgres\n```\n\n## How to build\n\nLaunch a (migrated) Postgres database via Docker:\n\n```bash\n./scripts/init_db.sh\n```\n\nLaunch a Redis instance via Docker:\n\n```bash\n./scripts/init_redis.sh\n```\n\nLaunch `cargo`:\n\n```bash\ncargo build\n```\n\nYou can now try with opening a browser on http://127.0.0.1:8000/login after\nhaving launch the web server with `cargo run`.\n\nThere is a default `admin` account with password\n`everythinghastostartsomewhere`. The available entrypoints are listed in\n[src/startup.rs](https://github.com/LukeMathWalker/zero-to-production/blob/6bd30650cb8670a146819a342ccefd3d73ed5085/src/startup.rs#L92)\n\n## How to test\n\nLaunch a (migrated) Postgres database via Docker:\n\n```bash\n./scripts/init_db.sh\n```\n\nLaunch a Redis instance via Docker:\n\n```bash\n./scripts/init_redis.sh\n```\n\nLaunch `cargo`:\n\n```bash\ncargo test \n```\n","funding_links":[],"categories":["Rust","后端开发框架及项目"],"sub_categories":["管理面板"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLukeMathWalker%2Fzero-to-production","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLukeMathWalker%2Fzero-to-production","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLukeMathWalker%2Fzero-to-production/lists"}