• Stars
    star
    214
  • Rank 178,032 (Top 4 %)
  • Language
    Rust
  • License
    BSD 3-Clause "New...
  • Created over 2 years ago
  • Updated 4 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Rust crates to work with the Conda ecosystem.

An image of a snake in a box

Rattler: Rust crates for fast handling of conda packages

License Build Status Project Chat docs main

Rattler is a library that provides common functionality used within the conda ecosystem (what is conda & conda-forge?). The goal of the library is to enable programs and other libraries to easily interact with the conda ecosystem without being dependent on Python. Its primary use case is as a library that you can use to provide conda related workflows in your own tools.

Rattler is written in Rust and tries to provide a clean API to its functionalities (see: Components). With the primary goal in mind we aim to provide bindings to different languages to make it easy to integrate Rattler in non-rust projects.

Rattler is actively used within the https://prefix.dev backend.

Showcase

This repository also contains a binary (use cargo run to try) that shows some of the capabilities of the library. This is an example of installing an environment containing cowpy and all its dependencies from scratch (including Python!):

Installing an environment

Give it a try!

Before you begin, make sure you have the following prerequisites:

Follow these steps to clone, compile, and run the rattler project:

# Clone the rattler repository along with its submodules:
git clone --recursive https://github.com/mamba-org/rattler.git
cd rattler

# Set up an environment with the required dependencies for compiling rattler and libsolv:
micromamba create -f environment.yml
micromamba activate rattler-env

# Compile and execute rattler to create a JupyterLab instance:
cargo run --release --bin rattler create jupyterlab

The above command will execute the rattler executable in release mode. It will download and install an environment into the .prefix folder that contains jupyterlab and all the dependencies required to run it (like python)

Run the following command to start jupyterlab:

# on windows
.\.prefix\Scripts\jupyter-lab.exe

# on linux or macOS
 ./.prefix/bin/jupyter-lab

Voila! You have a working installation of jupyterlab installed on your system! You can of course install any package you want this way. Try it!

Contributing 😍

We would love to have you contribute! See the CONTRIBUTION.md for more info. For questions, requests or a casual chat, we are very active on our discord server. You can join our discord server via this link.

Components

Rattler consists of several crates that provide different functionalities.

  • rattler_conda_types: foundational types for all datastructures used withing the conda eco-system.
  • rattler_package_streaming: provides functionality to download, extract and create conda package archives.
  • rattler_repodata_gateway: downloads, reads and processes information about existing conda packages from an index.
  • rattler_shell: code to activate an existing environment and run programs in it.
  • rattler_solve: a backend agnostic library to solve the package satisfiability problem.
  • rattler_virtual_packages: a crate to detect system capabilities.
  • rattler: functionality to create complete environments from scratch using the crates above.
  • rattler-bin: an example of a package manager using all the crates above (see: showcase)

You can find these crates in the crates folder.

What is conda & conda-forge?

The conda ecosystem provides cross-platform, binary packages that you can use with any programming language. 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. conda is written in Python. The aim of Rattler is to provide all functionality required to work with the conda ecosystem from Rust. Rattler is not a reimplementation of conda. conda is a package management tool. Rattler is a library to work with the conda ecosystem from different languages and applications. For example, it powers the backend of https://prefix.dev.

conda-forge is a community-driven effort to bring new and existing software into the conda ecosystem. It provides tens-of-thousands of up-to-date packages that are maintained by a community of contributors. For an overview of available packages see https://prefix.dev.

More Repositories

1

mamba

The Fast Cross-Platform Package Manager
C++
6,027
star
2

quetz

The Open-Source Server for Conda Packages
Python
262
star
3

gator

Conda environment and package management extension from within Jupyter
TypeScript
254
star
4

boa

The fast conda package builder, based on mamba
Python
248
star
5

micromamba-docker

Rapid builds of small Conda-based containers using micromamba.
Shell
243
star
6

resolvo

Fast package resolver written in Rust (CDCL based SAT solving)
Rust
127
star
7

setup-micromamba

GitHub Action to set up micromamba
TypeScript
86
star
8

provision-with-micromamba

[DEPRECATED] Use setup-micromamba instead
JavaScript
74
star
9

vscode-micromamba

A VSCode extension to generate development environments using micromamba and conda-forge package repository
TypeScript
69
star
10

rhumba

The R package manager that is blazingly fast ⚑. Powered by mamba.
C++
68
star
11

micromamba-releases

Micromamba executables mirrored from conda-forge as Github releases
Python
42
star
12

micromamba-devcontainer

A micromamba-based VS Code development container image.
Shell
34
star
13

setup-mamba

A GitHub action for setting up the Mamba package manager
TypeScript
20
star
14

picomamba

Minimalistic, experimental mamba, compiles to WASM
Python
16
star
15

multisheller

Python
15
star
16

powerloader

C++
15
star
17

minirhumba

Mini installer that contains everything that's necessary to run rhumba
Shell
14
star
18

mamba-navigator

A web UI for exploring Mamba environments
TypeScript
12
star
19

monstructor

The mamba constructor
C++
11
star
20

boa-forge

New style recipes for boa, with features enabled
Python
11
star
21

ansible-role-micromamba

Install micromamba, and optionally create a base conda environment.
9
star
22

quetz-frontend

Quetz Frontend
TypeScript
8
star
23

rattler-server

A server that solves environments using rattler!
Rust
7
star
24

quetz-client

A Python client for Quetz.
Python
5
star
25

build-locally-ansible

Build locally (in the cloud) with Ansible
Jinja
4
star
26

devcontainer-features

Shell
4
star
27

bitfurnace

Cross platform build helpers for conda-forge
Python
3
star
28

conda-specs

A collection of specs, and spec proposals for Mamba packages, recipes and repositories
3
star
29

design

Design resources
3
star
30

cmake-micromamba

Install dependencies using micromamba directly from a CMake script
CMake
2
star
31

quetz-theme

A dark-yellow theme for JupyterLab and Quetz
CSS
2
star
32

libcred

Cross-platform secure credential storage - port of keytar to pure C++ library
C++
2
star
33

conda_oci_mirror

Tools to mirror conda packages to an OCI registry
Python
1
star
34

quetz-plugin-cookiecutter

cookiecutter template for quetz plugins
Python
1
star