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

推荐订阅源

The GitHub Blog
The GitHub Blog
I
InfoQ
U
Unit 42
WordPress大学
WordPress大学
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
月光博客
月光博客
D
Docker
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
V
Visual Studio Blog
博客园 - 聂微东
A
About on SuperTechFans
腾讯CDC
Jina AI
Jina AI
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
博客园 - 【当耐特】
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
M
MIT News - Artificial intelligence

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
portage-cli
Luca Barbato · 2026-06-20 · via DEV Community

Luca Barbato

I'm experimenting with an alternative implementation of portage in Rust.

It is quite different from pkgcraft even if both projects have similar targets.

Main differences:

  • separation of concerns: portage-cli is based on a set of layered crates, that let people reuse specific parts of it. pkgcraft on the other hand is a bit monolithic right now.
  • pure-rust: pkgcraft for correctness wraps bash, portage-repo leverages brush fixing issues as they are found.
  • focus on different tooling: pkgcraft offers already extensive linting support via pkgcruft, portage-cli offers an emerge workalike (em) with a pubgrub-based dependency resolver.

Some numbers

Some comparisons with the current implementations.

metadata regen

All 3 tools are able to do that and we have a script to do that in a simple way.

GENTOO_REPO=/var/db/repos/gentoo \
EM=target/release/em \
PK=../pkgcraft/target/release/pk \
INCLUDE_EGENCACHE=1 \
ITERATIONS=1 \
./benchmarks/scripts/compare-regen.sh 8 16 20 24

tool j run real user sys files
em 8 1 0m18.008s 2m12.733s 0m9.387s 31880
egencache 8 1 5m24.107s 0m0.003s 0m0.004s 31880
pk 8 1 0m48.226s 5m27.982s 1m8.484s 31880
em 16 1 0m10.115s 2m17.674s 0m11.647s 31880
egencache 16 1 4m36.731s 0m0.000s 0m0.007s 31880
pk 16 1 0m28.172s 6m0.818s 1m22.995s 31880
em 20 1 0m9.593s 2m27.314s 0m13.700s 31880
egencache 20 1 4m35.749s 0m0.000s 0m0.006s 31880
pk 20 1 0m23.707s 5m55.650s 1m33.241s 31880
em 24 1 0m9.229s 2m39.258s 0m16.244s 31880
egencache 24 1 4m56.389s 0m0.007s 0m0.000s 31880
pk 24 1 0m23.367s 5m54.775s 1m44.188s 31880

Here we see that the rust implementation are way faster and portage-repo parallel visit via jwalk has an edge.

dependency resolution

Only emerge and em have a resolver wired in and the search support.

RUNS=2 EM=target/release/em ./benchmarks/bench-em-vs-emerge.sh

Benchmark em (mean ± σ) emerge (mean ± σ) speedup (em vs emerge)
firefox -p 0.917 s ± 0.082 s 3.675 s ± 0.000 s 4.01×
libreoffice -p 0.918 s ± 0.026 s 3.953 s ± 0.013 s 4.31×
multi (5 pkgs) -p 1.041 s ± 0.025 s 4.724 s ± 0.196 s 4.54×
gcc -s 0.154 s ± 0.011 s 5.175 s ± 0.006 s 33.63×

Since it is fun to watch, here an example of em dealing with some use changes compared with emerge.

The pubgrub solver wiring covers already plenty of the niceties of emerge, but I need to test it more.

Progress so far

To make updating simpler all the crates are now in the same portage-cli monorepo and most are already released, with few on hold waiting on having all the fixes I prepared for brush landing (help reviewing and polishing very welcome).

Right now it is possible to enjoy a quite faster dependency resolution, cache regeneration and search. There is some essential support for building and merging packages, but it is far from being battle tested.

In the coming weeks I'll try to fill more gaps and make it more functional and hopefully blog more often.