惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
雷峰网
雷峰网
博客园_首页
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
小众软件
小众软件
D
Docker
P
Proofpoint News Feed
B
Blog
Vercel News
Vercel News
B
Blog RSS Feed
U
Unit 42
月光博客
月光博客
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
Y
Y Combinator Blog
I
InfoQ
Recent Announcements
Recent Announcements

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I built my own package manager in Rust while building a L...
ChirallyActive · 2026-06-28 · via DEV Community

ChirallyActive

A few months ago I decided to build a Linux distribution entirely from scratch using LFS (Linux From Scratch) and BLFS. Every package — GCC, glibc, systemd, XFCE — compiled by hand. No shortcuts.

About halfway through I ran into a problem: there's no package manager for LFS systems. You're just supposed to compile everything manually forever.

So I built one.

What is Chiral?

Chiral is a cross-distro binary package manager written in Rust. It works on any Linux system — including custom LFS/BLFS distros, Arch, Debian, and anything in between.

The key idea: instead of being tied to one distro's repos, Chiral uses a 3-way fallback chain:

1. Your own GitHub packages/ repo
         ↓ not found?
2. Debian stable repos
         ↓ not found?
3. Arch Linux repos

If a package exists anywhere in that chain, Chiral finds it and installs it.

Install in one line

curl -L https://github.com/Amaterus1125/Chiral-CrossDistro-Package-Manager/releases/latest/download/chiral -o chiral
chmod +x chiral
sudo mv chiral /usr/local/bin/chiral

100% static musl binary. No Rust, no dependencies, runs on any Linux including a fresh LFS system with nothing installed.

How dependency resolution works

When you run chiral install gtk3, it:

  1. Queries the Arch Linux API for gtk3's full dependency list
  2. Walks the entire tree recursively using BFS
  3. Checks each dep against your system before downloading
  4. Builds a topological install order so deepest deps go first
  5. Installs everything in order, gtk3 last
gtk3
 ├── glib2       ← installed 1st
 ├── cairo
 │    └── pixman ← installed before cairo
 ├── pango
 └── gdk-pixbuf2

The smart part: before downloading anything, Chiral checks if a dep is already on your system via pacman, dpkg, pkg-config, ldconfig, PATH, rustup, and direct filesystem scanning. It works alongside existing package managers without conflicting.

Commands

chiral install <package>   # install with full dep resolution
chiral remove  <package>   # clean remove — tracks every file
chiral update  <package>   # update one package
chiral upgrade             # update everything
chiral search  <query>     # search available packages
chiral list                # list installed packages
chiral info    <package>   # version, source, files
chiral deps    <package>   # dry run — see what would install
chiral self-update         # update chiral itself

chiral info even works on packages not installed by Chiral:

chiral info rust
# Package : rust
# Status  : not managed by chiral
# Version : 1.93.1
# Source  : rustup (installed outside chiral)

The technical bits

Dependency resolution uses BFS to walk the full tree, then Kahn's algorithm for topological sort. Circular deps are detected and broken automatically.

File tracking DB records every installed file path so chiral remove is perfectly clean:

[steam=3.5.0-1|arch]
/usr/local/bin/steam
/usr/local/lib/steam/...

Self-updatingsudo chiral self-update hits the GitHub releases API, compares versions, downloads the new static binary and replaces itself.

Auto-sync — a GitHub Actions workflow runs every Sunday, checks Arch and Debian for newer versions of packages in the repo, repacks them and commits automatically. The package repo updates itself.

Root vs user mode — runs system-wide as root (/usr/local) or per-user as a regular user (~/.local). No configuration needed.

Why I built this

LFS teaches you how Linux actually works by making you build it yourself. But once you've built it, you're stuck installing everything by hand forever. There's no package manager for a system you assembled from scratch.

I wanted one. So I built it in Rust, made it work on any Linux regardless of what's installed, and gave it the ability to pull packages from three different sources so it can find almost anything.

The name comes from chirality in chemistry — molecules that are mirror images of each other. The two UI modes (Dextro and Levo) reflect this. Dextro is the default orange helix animation. Levo is a DNA sequencer animation that shows base pairs (A═T, G≡C) scrolling as packages install.

What's next

  • Orphan detection (chiral autoremove)
  • Conflict detection
  • KDE support on my custom distro

GitHub: Chiral Package Manager

Built by one person while building a Linux distro from scratch. If you're doing LFS/BLFS or want a package manager that works everywhere, give it a try.