{"id":14155482,"url":"https://github.com/prefix-dev/rattler-build","last_synced_at":"2026-01-07T10:15:49.743Z","repository":{"id":153581294,"uuid":"532922814","full_name":"prefix-dev/rattler-build","owner":"prefix-dev","description":"rattler-build is a universal package builder for Windows, macOS and Linux","archived":false,"fork":false,"pushed_at":"2024-10-29T18:25:41.000Z","size":9879,"stargazers_count":210,"open_issues_count":132,"forks_count":45,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-10-29T20:18:33.400Z","etag":null,"topics":["conda","hacktoberfest","mamba","package-management"],"latest_commit_sha":null,"homepage":"https://prefix-dev.github.io/rattler-build","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/prefix-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-09-05T13:53:30.000Z","updated_at":"2024-10-29T18:24:42.000Z","dependencies_parsed_at":"2023-05-19T19:45:34.429Z","dependency_job_id":"9b116cde-7613-4c36-9be8-c4a756ce3dc4","html_url":"https://github.com/prefix-dev/rattler-build","commit_stats":{"total_commits":349,"total_committers":20,"mean_commits":17.45,"dds":"0.41547277936962745","last_synced_commit":"406686ca62af83b54ce6c5251d1335ed795b41f4"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prefix-dev%2Frattler-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prefix-dev%2Frattler-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prefix-dev%2Frattler-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prefix-dev%2Frattler-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prefix-dev","download_url":"https://codeload.github.com/prefix-dev/rattler-build/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228821405,"owners_count":17977166,"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":["conda","hacktoberfest","mamba","package-management"],"created_at":"2024-08-17T08:03:27.279Z","updated_at":"2026-01-07T10:15:49.737Z","avatar_url":"https://github.com/prefix-dev.png","language":"Rust","funding_links":[],"categories":["hacktoberfest"],"sub_categories":[],"readme":"\u003ch1\u003e\n  \u003ca href=\"https://prefix.dev/tools/rattler-build\"\u003e\n    \u003cimg alt=\"banner\" src=\"https://github.com/user-attachments/assets/456f8ef1-1c7b-463d-ad88-de3496b05db2\"\u003e\n  \u003c/a\u003e\n\u003c/h1\u003e\n\n\u003ch1 align=\"center\"\u003e\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\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/prefix-dev/rattler-build/rust.yml?style=flat-square\u0026branch=main\n[build]: https://github.com/prefix-dev/rattler-build/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[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\n\u003c/h1\u003e\n\n# rattler-build: a fast conda-package builder\n\nThe `rattler-build` tooling and library creates cross-platform relocatable\nbinaries / packages from a simple recipe format. The recipe format is heavily\ninspired by `conda-build` and `boa`, and the output of a regular `rattler-build`\nrun is a package that can be installed using [https://github.com/prefix-dev/pixi](`pixi`), [https://github.com/mamba-org/mamab](`mamba`), or [https://conda.org](`conda`).\n\n`rattler-build` is a standalone binary written from scratch in Rust, and does not have any dependencies on `conda-build` or Python.\n\n![](https://github.com/prefix-dev/rattler-build/assets/885054/98377399-aae4-45a5-a4e9-982a3c7b2d50)\n\n### Installation\n\nYou can grab a prerelease version of `rattler-build` from the [Github\nReleases](https://github.com/prefix-dev/rattler-build/releases/).\n\nIt is (of course) also available from conda-forge:\n\n```bash\npixi global install rattler-build\n# or with micromamba\nmicromamba install rattler-build -c conda-forge\n```\n\n### Distro Packages\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/rattler-build.svg)](https://repology.org/project/rattler-build/versions)\n\n#### Homebrew\n\nYou can install `rattler-build` via Homebrew:\n\n```\nbrew install rattler-build\n```\n\n#### Arch Linux\n\n`rattler-build` is available on Arch Linux in the [extra repository](https://archlinux.org/packages/extra/x86_64/rattler-build/):\n\n```\npacman -S rattler-build\n```\n\n#### Alpine Linux\n\n`rattler-build` is available for [Alpine Edge](https://pkgs.alpinelinux.org/packages?name=rattler-build\u0026branch=edge). It can be installed via [apk](https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper) after enabling the [testing repository](https://wiki.alpinelinux.org/wiki/Repositories).\n\n```shell\napk add rattler-build\n```\n\n#### Dependencies\n\nCurrently `rattler-build` needs some dependencies on the host system which are\nexecuted as subprocess. We plan to reduce the number of external dependencies\nover time by writing what we need in Rust to make `rattler-build` fully\nself-contained.\n\n* `install_name_tool` is necessary on macOS to rewrite the `rpath` of shared\n  libraries and executables to make it relative\n* `patchelf` is required on Linux to rewrite the `rpath` and `runpath` of shared\n  libraries and executables\n* `git` is required to checkout Git repositories.\n* `msvc` on Windows because we cannot ship the MSVC compiler on conda-forge\n  (needs to be installed on the host machine)\n\n### Documentation\n\nWe have extensive documentation for `rattler-build`. You can find the [book\nhere](https://prefix-dev.github.io/rattler-build).\n\n### GitHub Action\n\nThere is a GitHub Action for `rattler-build`. It can be used to install `rattler-build` in CI/CD workflows and run a build command. Please check out the [GitHub Action documentation](https://github.com/prefix-dev/rattler-build-action) for more information.\n\n### Usage\n\n`rattler-build` comes with two commands: `build` and `test`.\n\nThe `build` command takes a `--recipe recipe.yaml` as input and produces a\npackage as output. The `test` subcommand can be used to test existing packages\n(tests are shipped with the package).\n\nThere is also a [terminal user interface (TUI)](https://prefix-dev.github.io/rattler-build/latest/tui/) that can help with building multiple packages and easily viewing logs.\n\n### The recipe format\n\n\u003e **Note** You can find all examples below in the [`examples`](https://github.com/prefix-dev/rattler-build/tree/main/examples)\n\u003e folder and run them with `rattler-build`.\n\nA simple example recipe for the `xtensor` header-only C++ library:\n\n```yaml\ncontext:\n  name: xtensor\n  version: 0.24.6\n\npackage:\n  name: ${{ name|lower }}\n  version: ${{ version }}\n\nsource:\n  url: https://github.com/xtensor-stack/xtensor/archive/${{ version }}.tar.gz\n  sha256: f87259b51aabafdd1183947747edfff4cff75d55375334f2e81cee6dc68ef655\n\nbuild:\n  number: 0\n  script:\n    - if: win\n      then: |\n        cmake -G \"Ninja\" -D BUILD_TESTS=OFF -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% %SRC_DIR%\n        ninja install\n      else: |\n        cmake ${CMAKE_ARGS} -G \"Ninja\" -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=$PREFIX $SRC_DIR -DCMAKE_INSTALL_LIBDIR=lib\n        ninja install\n\nrequirements:\n  build:\n    - ${{ compiler('cxx') }}\n    - cmake\n    - ninja\n  host:\n    - xtl \u003e=0.7,\u003c0.8\n  run:\n    - xtl \u003e=0.7,\u003c0.8\n  run_constraints:\n    - xsimd \u003e=8.0.3,\u003c10\n\ntests:\n  - script:\n    - if: unix or emscripten\n      then:\n        - test -d ${PREFIX}/include/xtensor\n        - test -f ${PREFIX}/include/xtensor/xarray.hpp\n        - test -f ${PREFIX}/share/cmake/xtensor/xtensorConfig.cmake\n        - test -f ${PREFIX}/share/cmake/xtensor/xtensorConfigVersion.cmake\n    - if: win\n      then:\n        - if not exist %LIBRARY_PREFIX%\\include\\xtensor\\xarray.hpp (exit 1)\n        - if not exist %LIBRARY_PREFIX%\\share\\cmake\\xtensor\\xtensorConfig.cmake (exit 1)\n        - if not exist %LIBRARY_PREFIX%\\share\\cmake\\xtensor\\xtensorConfigVersion.cmake (exit 1)\n\nabout:\n  homepage: https://github.com/xtensor-stack/xtensor\n  license: BSD-3-Clause\n  license_file: LICENSE\n  summary: The C++ tensor algebra library\n  description: Multi dimensional arrays with broadcasting and lazy computing\n  documentation: https://xtensor.readthedocs.io\n  repository: https://github.com/xtensor-stack/xtensor\n\nextra:\n  recipe-maintainers:\n    - some-maintainer\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003e\n    A recipe for the `rich` Python package (using `noarch`)\n  \u003c/summary\u003e\n\n```yaml\ncontext:\n  version: \"13.4.2\"\n\npackage:\n  name: \"rich\"\n  version: ${{ version }}\n\nsource:\n  - url: https://pypi.io/packages/source/r/rich/rich-${{ version }}.tar.gz\n    sha256: d653d6bccede5844304c605d5aac802c7cf9621efd700b46c7ec2b51ea914898\n\nbuild:\n  # Thanks to `noarch: python` this package works on all platforms\n  noarch: python\n  script:\n    - python -m pip install . -vv\n\nrequirements:\n  host:\n    - pip\n    - poetry-core \u003e=1.0.0\n    - python 3.10.*\n  run:\n    # sync with normalized deps from poetry-generated setup.py\n    - markdown-it-py \u003e=2.2.0\n    - pygments \u003e=2.13.0,\u003c3.0.0\n    - python 3.10.*\n    - typing_extensions \u003e=4.0.0,\u003c5.0.0\n\ntests:\n  - python:\n      imports:\n        - rich\n      pip_check: true\n\nabout:\n  homepage: https://github.com/Textualize/rich\n  license: MIT\n  license_file: LICENSE\n  summary: Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal\n  description: |\n    Rich is a Python library for rich text and beautiful formatting in the terminal.\n\n    The Rich API makes it easy to add color and style to terminal output. Rich\n    can also render pretty tables, progress bars, markdown, syntax highlighted\n    source code, tracebacks, and more — out of the box.\n  documentation: https://rich.readthedocs.io\n  repository: https://github.com/Textualize/rich\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eA recipe for the `curl` library\u003c/summary\u003e\n\n```yaml\ncontext:\n  version: \"8.0.1\"\n\npackage:\n  name: curl\n  version: ${{ version }}\n\nsource:\n  url: http://curl.haxx.se/download/curl-${{ version }}.tar.bz2\n  sha256: 9b6b1e96b748d04b968786b6bdf407aa5c75ab53a3d37c1c8c81cdb736555ccf\n\nbuild:\n  number: 0\n\nrequirements:\n  build:\n    - ${{ compiler('c') }}\n    - if: win\n      then:\n        - cmake\n        - ninja\n    - if: unix\n      then:\n        - make\n        - perl\n        - pkg-config\n        - libtool\n  host:\n    - if: linux\n      then:\n        - openssl\n\nabout:\n  homepage: http://curl.haxx.se/\n  license: MIT/X derivate (http://curl.haxx.se/docs/copyright.html)\n  license_file: COPYING\n  summary: tool and library for transferring data with URL syntax\n  description: |\n    Curl is an open source command line tool and library for transferring data\n    with URL syntax. It is used in command lines or scripts to transfer data.\n  documentation: https://curl.haxx.se/docs/\n  repository: https://github.com/curl/curl\n```\n\nFor this recipe, two additional script files (`build.sh` and `build.bat`) are\nneeded.\n\n**`build.sh`**\n\n```bash\n#!/bin/bash\n\n# Get an updated config.sub and config.guess\ncp $BUILD_PREFIX/share/libtool/build-aux/config.* .\n\nif [[ $target_platform =~ linux.* ]]; then\n    USESSL=\"--with-openssl=${PREFIX}\"\nelse\n    USESSL=\"--with-secure-transport\"\nfi;\n\n./configure \\\n    --prefix=${PREFIX} \\\n    --host=${HOST} \\\n    ${USESSL} \\\n    --with-ca-bundle=${PREFIX}/ssl/cacert.pem \\\n    --disable-static --enable-shared\n\nmake -j${CPU_COUNT} ${VERBOSE_AT}\nmake install\n\n# Includes man pages and other miscellaneous.\nrm -rf \"${PREFIX}/share\"\n```\n\n**`build.bat`**\n\n```cmd\nmkdir build\n\ncmake -GNinja ^\n      -DCMAKE_BUILD_TYPE=Release ^\n      -DBUILD_SHARED_LIBS=ON ^\n      -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^\n      -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^\n      -DCURL_USE_SCHANNEL=ON ^\n      -DCURL_USE_LIBSSH2=OFF ^\n      -DUSE_ZLIB=ON ^\n      -DENABLE_UNICODE=ON ^\n      %SRC_DIR%\n\nIF %ERRORLEVEL% NEQ 0 exit 1\n\nninja install --verbose\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprefix-dev%2Frattler-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprefix-dev%2Frattler-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprefix-dev%2Frattler-build/lists"}