pnpm v12 Rust Rewrite: 90% Faster Installs, Seamless Upgrade for Monorepos
pnpm v12 has been fully rewritten in Rust, delivering up to 90% faster installation times while maintaining full backward compatibility with pnpm v11 commands, flags, settings, and lockfile format, and introduces a new Rust-based registry service pnpr for even greater performance.
pnpm v12: Complete Rust Rewrite with Major Performance Gains
The popular JavaScript package manager pnpm, known for its fast download speeds, has been completely rewritten in Rust for version 12. The maintainers claim installation times are reduced by up to 90% compared to previous versions.
Zero-Friction Upgrade Promise
Lead maintainer Zoltan Kochan emphasizes that upgrading should not feel like a migration. pnpm 11 commands, flags, settings, and lockfile format are all preserved, and documentation covers both versions. Kochan states: "Upgrading shouldn't feel like a migration. pnpm 11's commands, flags, settings, and lockfile format are all preserved, and the documentation covers both versions."
Benchmark Results
In the project's own benchmarks, installing an uncached sample package takes:
pnpm 12: 5.19 seconds
pnpm 11: 8.22 seconds
npm: 47.7 seconds
Additionally, the team built a new registry service called pnpr in Rust. Using pnpr as the backend reduces the same installation to just 3.37 seconds.
Codebase Composition
Since development began in April, the new Rust core binary eliminates much of the overhead from handling filesystem operations via Node.js. According to GitHub statistics, the new version consists of 65.9% Rust code and 33.5% TypeScript.
Why Rust for Package Installation?
Sarah Gooding, VP of Communications at security provider Socket, explains in a blog post: "Package installation primarily involves fetching metadata and tarballs, unpacking files, resolving the dependency graph, and linking packages into node_modules, making it a natural target for native code and parallelism."
Comparison with Other Tools
Kochan notes that the project previously benchmarked pnpm against Bun and Yarn, but those results were removed due to issues during testing. Nevertheless, she maintains that in some scenarios the software can reduce installation time by up to 90%.
Background: pnpm's Evolution
Origins and Design
Developer Rico Sta. Cruz created pnpm in 2016 as a faster alternative to npm (Node Package Manager), the de facto standard for JavaScript. GitHub acquired the open-source npm registry and codebase in 2020.
npm downloads all required dependencies to the user's computer regardless of duplication, making it known for slow execution and high disk usage. pnpm's key innovation is content-addressable storage: if the same library is needed for 100 different applications, pnpm downloads it only once, and only downloads another copy when a different version is specified.
Like npm, pnpm relies on the official npm registry, but many users find it performs better. Developers also appreciate pnpm's YAML-based lockfile, which describes the package dependency tree and is easier to read.
Market Position
The 2025 State of JavaScript survey shows pnpm is by far the most popular JavaScript monorepo package manager. Other contenders include Nx, Lerna, Yalc, Turborepo, and npm's built-in workspaces. Among 10,251 surveyed developers, approximately 38% (3,840) use pnpm.
Rust Adoption Across the JavaScript Ecosystem
Rewriting applications in Rust has become a trend in the web ecosystem, driven by Rust's speed and lack of garbage collection. Recent examples include:
Bun framework undergoing an AI-driven Rust rewrite
Tailwind CSS v4 gaining a new Rust engine called Oxide
Vite framework running faster due to Rolldown, a Rust-built JavaScript bundler
Industry Reactions
Darcy Clarke, CEO of JavaScript package management platform vlt, wrote in an X post regarding pnpm's Rust rewrite: "This is somewhat an indictment of the poor Node developer experience." Kochan responded: "Rewriting pnpm in Rust was much faster than migrating to ESM (ECMAScript Modules)," strongly agreeing with Clarke's observation.
Upgrade Instructions
The software's GitHub page still points to the last major version pnpm 11.25, so existing users must update to the v12 branch by running:
pnpm self-update next-12Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
