Table of Contents
In Part 1, we compared uv and Pixi basics. Now, let's explore Pixi's strengths: task runner (alternative to my use of justfiles), uv integration, and pixi.toml for advanced setups like data science or Python + Mojo.
Pixi Uses uv Under the Hood
Pixi delegates PyPI resolution to uv as a library—combining conda's binaries with uv's speed for Python. This makes Pixi a natural extension if you like uv but need more.
Pixi's Task Runner vs. Just
I use justfiles for complex, documented tasks across projects. Pixi's tasks are similar but integrated.
Similarities:
- Declarative commands with dependencies.
- Parameters, platform-specific runs.
- Cross-platform execution.
Differences:
- Just: Standalone
justfile, rich scripting (backticks, conditionals). - Pixi: In
pixi.toml, auto-runs in reproducible env; caching via inputs/outputs.
Examples: Simple test chain works similarly. For env-heavy tasks, Pixi ensures deps without manual activation.
If using just universally, keep it and call pixi run from just. For Pixi projects, built-in tasks simplify—great for teams or mixed langs.
pixi.toml for Data Science (and Mixed) Workflows
pixi.toml declares everything: deps, tasks, environments.
Sample for Python data science + Mojo potential:
[project]
name = "ml-project"
platforms = ["linux-64", "osx-arm64", "win-64"] # Cross-platform
[dependencies]
python = ">=3.11"
numpy = "*"
pandas = "*"
pytorch = "*" # Conda binaries
[pypi-dependencies]
seaborn = "*"
[tasks]
notebook = "jupyter lab"
prep = { cmd = "python preprocess.py", inputs = ["data/raw"], outputs = ["data/processed"] }
train = { cmd = "python train.py", depends-on = ["prep"] }
[feature.mojo]
dependencies = { mojo = "*" } # When adding Mojo
Features allow modular envs (e.g., dev with Jupyter).
For Python/Mojo: Add Mojo via conda channel; tasks handle mixed runs.
Pixi's cross-platform focus (including platform-specific overrides) reduces "works on my machine" issues.
Conclusion
uv + just serves Python-only projects well. As I explore mixed projects, Pixi's integration, leveraging uv while adding tasks and multi-lang support—makes sense. Try Pixi on a small mixed repo; it might consolidate your toolchain.