{"id":14156579,"url":"https://github.com/conda/rattler","last_synced_at":"2026-06-09T23:02:23.771Z","repository":{"id":47404469,"uuid":"432671463","full_name":"conda/rattler","owner":"conda","description":"Rust crates to work with the Conda ecosystem.","archived":false,"fork":false,"pushed_at":"2026-04-28T11:47:19.000Z","size":77798,"stargazers_count":428,"open_issues_count":179,"forks_count":194,"subscribers_count":13,"default_branch":"main","last_synced_at":"2026-04-28T13:28:02.600Z","etag":null,"topics":["conda","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conda.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2021-11-28T09:39:26.000Z","updated_at":"2026-04-28T11:44:30.000Z","dependencies_parsed_at":"2026-01-12T11:04:41.095Z","dependency_job_id":null,"html_url":"https://github.com/conda/rattler","commit_stats":{"total_commits":797,"total_committers":42,"mean_commits":"18.976190476190474","dds":0.7001254705144291,"last_synced_commit":"dada9abe46d2ebc6b351ca569e27505e787d8baf"},"previous_names":["conda-incubator/rattler","mamba-org/rattler","conda/rattler"],"tags_count":1541,"template":false,"template_full_name":null,"purl":"pkg:github/conda/rattler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conda%2Frattler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conda%2Frattler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conda%2Frattler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conda%2Frattler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conda","download_url":"https://codeload.github.com/conda/rattler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conda%2Frattler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32497815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["conda","rust"],"created_at":"2024-08-17T08:06:37.597Z","updated_at":"2026-06-09T23:02:23.765Z","avatar_url":"https://github.com/conda.png","language":"Rust","funding_links":[],"categories":["rust","Rust"],"sub_categories":[],"readme":"\u003ca href=\"https://prefix.dev/tools/rattler/\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/73dee0d8-b372-4462-bce1-f004c5f907b5\" alt=\"banner\"\u003e\n\u003c/a\u003e\n\n# Rattler: Rust crates for fast handling of conda packages\n\n![License][license-badge]\n[![Build Status][build-badge]][build]\n[![Project Chat][chat-badge]][chat-url]\n[![Pixi Badge][pixi-badge]][pixi-url]\n[![docs main][docs-main-badge]][docs-main]\n[![python docs main][py-docs-main-badge]][py-docs-main]\n\n[license-badge]: https://img.shields.io/badge/license-BSD--3--Clause-blue?style=flat-square\n[build-badge]: https://img.shields.io/github/actions/workflow/status/conda/rattler/rust-compile.yml?style=flat-square\u0026branch=main\n[build]: https://github.com/conda/rattler/actions\n[chat-badge]: https://img.shields.io/discord/1082332781146800168.svg?label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2\u0026style=flat-square\n[chat-url]: https://discord.gg/kKV8ZxyzY4\n[docs-main-badge]: https://img.shields.io/badge/rust_docs-main-yellow.svg?style=flat-square\n[docs-main]: https://conda.github.io/rattler\n[py-docs-main-badge]: https://img.shields.io/badge/python_docs-main-yellow.svg?style=flat-square\n[py-docs-main]: https://conda.github.io/rattler/py-rattler\n[pixi-badge]:https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json\u0026style=flat-square\n[pixi-url]: https://pixi.sh\n\nRattler is a library that provides common functionality used within the conda ecosystem ([what is conda \u0026 conda-forge?](#what-is-conda--conda-forge)).\nThe goal of the library is to enable programs and other libraries to easily interact with the conda ecosystem without being dependent on Python.\nIts primary use case is as a library that you can use to provide conda related workflows in your own tools.\n\nRattler is written in Rust and tries to provide a clean API to its functionalities (see: [Components](#components)).\nWith the primary goal in mind we aim to provide bindings to different languages to make it easy to integrate Rattler in non-rust projects.\n\nRattler is actively used by [pixi](https://github.com/prefix-dev/pixi), [rattler-build](https://github.com/prefix-dev/rattler-build), and the https://prefix.dev backend.\n\n## Showcase\n\nThis repository also contains a binary that shows some of the capabilities of the library.\nThis is an example of installing an environment containing `cowpy` and all its dependencies _from scratch_ (including Python!):\n\n![Installing an environment](https://github.com/conda/rattler/assets/4995967/c7946f6e-28a9-41ef-8836-ef4b4c94d273)\n\n## Development: getting started\n\nTo get started developing with Rattler, let's install an environment with `cowpy` and its dependencies.\n\nClone the Rattler repository, and in your terminal, navigate to the root folder of the repository, and execute the following commands (in order):\n\n```bash\ngit submodule update --init\ncargo run --bin rattler --release create cowpy\ncargo run --bin rattler --release run -p .prefix/ cowpy --random\n```\n\n## Python and Javascript bindings\n\nYou can invoke `rattler` from Python or Javascript via our powerful bindings to solve, install and run commands in conda environments. Rattler offers you the fastest and cleanest Python bindings to the conda ecosystem.\n\n### Python\n\nTo install the Python bindings, you can use pip or conda:\n\n```bash\npip install py-rattler\n# or\nconda install -c conda-forge py-rattler\n```\n\nYou can find the extensive documentation for the Python bindings [here](https://conda.github.io/rattler/py-rattler/).\n\n\u003cdetails\u003e\n  \u003csummary\u003eExample usage of rattler from Python\u003c/summary\u003e\nThe Python bindings to rattler are designed to be used with `asyncio`. You can access the raw power of the rattler library to solve environments, install packages, and run commands in the installed environments.\n\n```python\nimport asyncio\nimport tempfile\n\nfrom rattler import solve, install, VirtualPackage\n\nasync def main() -\u003e None:\n    # Start by solving the environment.\n    #\n    # Solving is the process of going from specifications of package and their\n    # version requirements to a list of concrete packages.\n    print(\"started solving the environment\")\n    solved_records = await solve(\n        # Channels to use for solving\n        channels=[\"conda-forge\"],\n        # The specs to solve for\n        specs=[\"python ~=3.12.0\", \"pip\", \"requests 2.31.0\"],\n        # Virtual packages define the specifications of the environment\n        virtual_packages=VirtualPackage.detect(),\n    )\n    print(\"solved required dependencies\")\n\n    # Install the packages into a new environment (or updates it if it already\n    # existed).\n    env_path = tempfile.mkdtemp()\n    await install(\n        records=solved_records,\n        target_prefix=env_path,\n    )\n\n    print(f\"created environment: {env_path}\")\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\u003c/details\u003e\n\n### Javascript\n\nTo use the Javascript bindings, you can install the `@conda-org/rattler` package via npm. rattler is compiled to WebAssembly and can be used in the browser or in Node.js.\n\n```bash\nnpm install @conda-org/rattler\n```\n\nUsing rattler from Javascript is useful to get access to the same version comparison functions as used throughout the conda ecosystem. It is also used as part of [`mambajs`](https://github.com/emscripten-forge/mambajs) which uses the rattler library to solve and install packages from the emscripten-forge channel _in the browser_.\n\n\n## Give it a try!\n\nBefore you begin, make sure you have the following prerequisites:\n- A recent version of [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n- A recent version of [pixi](https://github.com/prefix-dev/pixi)\n\nFollow these steps to clone, compile, and run the rattler project:\n```shell\n# Clone the rattler repository along with its submodules:\ngit clone --recursive https://github.com/conda/rattler.git\ncd rattler\n\n# Compile and execute rattler to create a JupyterLab instance:\npixi run rattler create jupyterlab\n```\n\nThe above command will execute the `rattler` executable in release mode.\nIt will download and install an environment into the `.prefix` folder that contains [`jupyterlab`](https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html) and all the dependencies required to run it (like `python`)\n\nRun the following command to start jupyterlab:\n\n```shell\n# on windows\n.\\.prefix\\Scripts\\jupyter-lab.exe\n\n# on linux or macOS\n ./.prefix/bin/jupyter-lab\n```\n\nVoila!\nYou have a working installation of jupyterlab installed on your system!\nYou can of course install any package you want this way.\nTry it!\n\n## Contributing 😍\n\nWe would love to have you contribute!\nSee the CONTRIBUTION.md for more info. For questions, requests or a casual chat, we are very active on our discord server.\nYou can [join our discord server via this link][chat-url].\n\n\n## Components\n\nRattler consists of several crates that provide different functionalities.\n\n* **rattler_conda_types**: foundational types for all datastructures used within the conda eco-system.\n* **rattler_package_streaming**: provides functionality to download, extract and create conda package archives.\n* **rattler_repodata_gateway**: downloads, reads and processes information about existing conda packages from an index.\n* **rattler_shell**: code to activate an existing environment and run programs in it.\n* **rattler_solve**: a backend agnostic library to solve the package satisfiability problem.\n* **rattler_virtual_packages**: a crate to detect system capabilities.\n* **rattler_index**: create local conda channels from local packages. See the\n  [rattler_index README](crates/rattler_index/README.md) for channel options documentation.\n* **rattler**: functionality to create complete environments from scratch using the crates above.\n* **rattler-lock**: a library to create and parse lockfiles for conda environments.\n* **rattler-networking**: common functionality for networking, like authentication, mirroring and more.\n* **rattler-bin**: an example of a package manager using all the crates above (see: [showcase](#showcase))\n\nYou can find these crates in the `crates` folder.\n\nAdditionally, we provide Python bindings for most of the functionalities provided by the above crates.\nA python package `py-rattler` is available on [conda-forge](https://prefix.dev/channels/conda-forge/packages/py-rattler) and [PyPI](https://pypi.org/project/py-rattler/).\nDocumentation for the python bindings can be found [here](https://conda.github.io/rattler/py-rattler).\n\n## What is conda \u0026 conda-forge?\n\nThe conda ecosystem provides **cross-platform**, **binary** packages that you can use with **any programming language**.\n`conda` is an open-source package management system and environment management system that can install and manage multiple versions of software packages and their dependencies.\n`conda` is written in Python.\nThe aim of Rattler is to provide all functionality required to work with the conda ecosystem from Rust.\nRattler is not a reimplementation of `conda`.\n`conda` is a package management tool.\nRattler is a _library_ to work with the conda ecosystem from different languages and applications.\nFor example, it powers the backend of https://prefix.dev.\n\n`conda-forge` is a community-driven effort to bring new and existing software into the conda ecosystem.\nIt provides _tens-of-thousands of up-to-date_ packages that are maintained by a community of contributors.\nFor an overview of available packages see https://prefix.dev.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconda%2Frattler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconda%2Frattler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconda%2Frattler/lists"}