Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

rattler-build

> DevOps
Open source

rattler-build is a universal Conda package builder for Windows, macOS and Linux (like conda-build but faster)

369 stars0 likes1 views
WebsiteGitHub

About

rattler-build is a universal Conda package builder for Windows, macOS and Linux (like conda-build but faster)

License Build Status Project Chat Pixi Badge

Rattler-Build: a fast conda-package builder

The Rattler-Build tooling and library creates cross-platform relocatable binaries / packages from a simple recipe format. The recipe format is heavily inspired by conda-build and boa, and the output of a regular rattler-build run is a package that can be installed using pixi, mamba, or conda.

Rattler-Build is a standalone binary written from scratch in Rust, and does not have any dependencies on conda-build or Python.

Installation

You can grab a prerelease version of rattler-build from the Github Releases.

It is (of course) also available from conda-forge:

bash
pixi global install rattler-build
# or with micromamba
micromamba install rattler-build -c conda-forge

Distro Packages

Homebrew

You can install rattler-build via Homebrew:

bash
brew install rattler-build

Arch Linux

Rattler-Build is available on Arch Linux in the extra repository:

pacman -S rattler-build

Alpine Linux

Rattler-Build is available for Alpine Edge. It can be installed via apk after enabling the testing repository.

bash
apk add rattler-build

Dependencies

Currently Rattler-Build needs some dependencies on the host system which are executed as subprocess. We plan to reduce the number of external dependencies over time by writing what we need in Rust to make Rattler-Build fully self-contained.

  • install_name_tool is necessary on macOS to rewrite the rpath of shared libraries and executables to make it relative
  • patchelf is required on Linux to rewrite the rpath and runpath of shared libraries and executables
  • git is required to checkout Git repositories.
  • msvc on Windows because we cannot ship the MSVC compiler on conda-forge (needs to be installed on the host machine)

Documentation

We have extensive documentation for Rattler-Build. You can find the book here.

GitHub Action

There 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 for more information.

Usage

Rattler-Build comes with two commands: build and test.

The build command takes a --recipe recipe.yaml as input and produces a package as output. The test subcommand can be used to test existing packages (tests are shipped with the package).

There is also a terminal user interface (TUI) that can help with building multiple packages and easily viewing logs.

Playground

Want to try Rattler-Build recipes without installing anything? The online playground lets you edit recipes, tweak variant configurations, and see evaluated output — all in the browser.

The recipe format

Note You can find all examples below in the examples folder and run them with rattler-build.

A simple example recipe for the xtensor header-only C++ library:

…

yaml context: version: "13.4.2"

package: name: "rich" version: ${{ version }}

source:

  • url: https://pypi.io/packages/source/r/rich/rich-${{ version }}.tar.gz sha256: d653d6bccede5844304c605d5aac802c7cf9621efd700b46c7ec2b51ea914898

build:

Thanks to noarch: python this package works on all platforms

noarch: python script: - python -m pip install . -vv

requirements: host: - pip - poetry-core >=1.0.0 - python 3.10.* run: # sync with normalized deps from poetry-generated setup.py - markdown-it-py >=2.2.0 - pygments >=2.13.0,=4.0.0,

A recipe for the curl library

…

For this recipe, two additional script files (build.sh and build.bat) are needed.

build.sh

bash
#!/bin/bash

# Get an updated config.sub and config.guess
cp $BUILD_PREFIX/share/libtool/build-aux/config.* .

if [[ $target_platform =~ linux.* ]]; then
    USESSL="--with-openssl=${PREFIX}"
else
    USESSL="--with-secure-transport"
fi;

./configure \
    --prefix=${PREFIX} \
    --host=${HOST} \
    ${USESSL} \
    --with-ca-bundle=${PREFIX}/ssl/cacert.pem \
    --disable-static --enable-shared

make -j${CPU_COUNT} ${VERBOSE_AT}
make install

# Includes man pages and other miscellaneous.
rm -rf "${PREFIX}/share"

build.bat

cmd
mkdir build

cmake -GNinja ^
      -DCMAKE_BUILD_TYPE=Release ^
      -DBUILD_SHARED_LIBS=ON ^
      -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
      -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
      -DCURL_USE_SCHANNEL=ON ^
      -DCURL_USE_LIBSSH2=OFF ^
      -DUSE_ZLIB=ON ^
      -DENABLE_UNICODE=ON ^
      %SRC_DIR%

IF %ERRORLEVEL% NEQ 0 exit 1

ninja install --verbose

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustcondaconda-buildmambapackage-management

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理