Rust-Based Formatter Oxfmt Enters Beta

A new JavaScript/TypeScript code formatter named Oxfmt, built in Rust, has entered its beta phase. The tool is compatible with Prettier and promises significant performance improvements, claiming to be 30 times faster than Prettier and 3 times faster than Biome. The formatter aims to reduce developer and continuous integration wait times, particularly in large monorepos.

- Oxfmt is part of the larger Oxc (The JavaScript Oxidation Compiler) toolchain, a suite of high-performance JavaScript/TypeScript tools being written in Rust. This ecosystem includes a linter (Oxlint), parser, and minifier, all built on shared components to ensure speed and consistency. - The project's primary goal is performance combined with Prettier compatibility, aiming for a smooth migration path for existing projects. The beta release now passes 100% of Prettier's JavaScript and TypeScript conformance tests, and the team actively submits pull requests to Prettier to resolve any remaining formatting inconsistencies. - While benchmarks show Oxfmt is significantly faster than Prettier and Biome, it uses more memory than Biome. Official benchmarks for memory usage show Prettier at 223.9 MB, Oxfmt at 152.9 MB, and Biome at 62.2 MB on one test. - The beta version incorporates features that often require separate plugins in the Prettier ecosystem. This includes built-in sorting for Tailwind CSS classes, import statements, and fields within `package.json`. - Even before the beta, Oxfmt has seen adoption in several major open-source projects. Users include `vuejs/core`, `vercel/turborepo`, `getsentry/sentry-javascript`, and `huggingface/huggingface.js`. - The Oxc toolchain is developed by VoidZero, an organization that also includes the teams behind Vite, Vitest, and Rolldown (Vite's future bundler). - The roadmap for Oxfmt's stable release includes support for the Prettier plugin ecosystem and improved formatting for frameworks like Vue, Svelte, and Astro.

Get your own daily briefing

Scout delivers personalized news, insights, and conversations tailored to your role and industry.

Download on the App Store

Shared from Scout - Be the smartest in the room.