{"id":50975326,"url":"https://github.com/prefix-dev/rattler-book","last_synced_at":"2026-06-19T07:02:14.631Z","repository":{"id":346794620,"uuid":"1171817008","full_name":"prefix-dev/rattler-book","owner":"prefix-dev","description":"A book and a simple lua package manager","archived":false,"fork":false,"pushed_at":"2026-04-22T19:14:15.000Z","size":7257,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-19T04:00:10.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://prefix-dev.github.io/rattler-book/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prefix-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-03T16:34:15.000Z","updated_at":"2026-06-17T12:26:47.000Z","dependencies_parsed_at":"2026-03-26T16:03:07.103Z","dependency_job_id":null,"html_url":"https://github.com/prefix-dev/rattler-book","commit_stats":null,"previous_names":["prefix-dev/rattler-book"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prefix-dev/rattler-book","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prefix-dev%2Frattler-book","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prefix-dev%2Frattler-book/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prefix-dev%2Frattler-book/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prefix-dev%2Frattler-book/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prefix-dev","download_url":"https://codeload.github.com/prefix-dev/rattler-book/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prefix-dev%2Frattler-book/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34520433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"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":[],"created_at":"2026-06-19T07:02:08.961Z","updated_at":"2026-06-19T07:02:14.615Z","avatar_url":"https://github.com/prefix-dev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Entangled badge](https://img.shields.io/badge/entangled-Use%20the%20source!-%2300aeff)](https://entangled.github.io/)\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"book/src/assets/paxton-moon.png\" alt=\"The Rattler Book\" width=\"400\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eThe Rattler Book\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eBuilding a package manager with \u003ca href=\"https://github.com/conda/rattler\"\u003eRattler\u003c/a\u003e\u003c/strong\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://prefix-dev.github.io/rattler-book/\"\u003eRead the book online\u003c/a\u003e | \u003ca href=\"https://github.com/prefix-dev/rattler-book\"\u003eGitHub Repository\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nThis repository contains **The Rattler Book** — a hands-on guide to building conda-compatible package management tools in Rust using the [Rattler](https://github.com/conda/rattler) framework. The book walks you through creating **moonshot**, a minimal Lua package manager, from scratch.\n\n## What you'll learn\n\nThe book covers the full lifecycle of a package manager:\n\n1. **Parsing** dependency specs from a project manifest\n2. **Fetching** repodata from conda channels via `rattler_repodata_gateway`\n3. **Solving** dependencies using the resolvo SAT solver\n4. **Installing** packages with hard-linking from cache\n5. **Activating** environments for shell sessions or command execution\n6. **Building** new conda packages with a Lua-based build system\n\n## Book chapters\n\n| # | Chapter | Topic |\n|---|---------|-------|\n| 1 | What Is a Package Manager? | Core concepts and terminology |\n| 2 | Setting Up the Project | Scaffolding with Rattler crates |\n| 3 | The `init` Command | Creating a project manifest |\n| 4 | The `search` Command | Querying conda channels |\n| 5 | The `add` Command | Adding packages to the manifest |\n| 6 | The `lock` Command | Dependency resolution and lock files |\n| 7 | The `install` Command | Downloading and linking packages |\n| 8 | The `shell-hook` Command | Shell activation scripts |\n| 9 | The `run` Command | Running commands in an environment |\n| 10 | The `build` Command | Building `.conda` packages |\n\nPlus deep-dive chapters on the conda package format, run exports, virtual packages, networking, the resolvo SAT solver, the build script API, the full Rattler crate ecosystem, and adapting moonshot to your own language.\n\n## The moonshot CLI\n\nThe worked example — **moonshot** — is a fully functional Lua package manager:\n\n```bash\nshot init                    # Create a new project\nshot search lua              # Search for packages\nshot add lua \"\u003e=5.4\"         # Add a package to the manifest\nshot lock                    # Resolve dependencies and write the lock file\nshot install                 # Install packages into the environment\nshot shell-hook              # Print a shell activation script\nshot run lua my_script.lua   # Run a command in the environment\nshot build                   # Build a .conda package\n```\n\n## Repository structure\n\n```\nbook/                    # The Rattler Book (mkdocs documentation)\nsrc/                     # moonshot source code (Rust)\nexamples/                # Example Lua packages (moonjson, mooncolor, moontemplate, hello-moon)\n```\n\n## Getting started\n\nRead the book online at **[prefix-dev.github.io/rattler-book](https://prefix-dev.github.io/rattler-book/)**, or build it locally:\n\n```bash\npixi run book-serve\n```\n\nTo build the moonshot CLI:\n\n```bash\npixi run build\n```\n\nOr without pixi (requires Rust 1.82+):\n\n```bash\ncargo build\n```\n\n## License\n\nThis project is part of the [prefix-dev](https://github.com/prefix-dev) ecosystem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprefix-dev%2Frattler-book","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprefix-dev%2Frattler-book","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprefix-dev%2Frattler-book/lists"}