{
  "id": 45335,
  "title": "I ported Picomatch to Rust. It passed 1,977 tests and lost the benchmark by 18x",
  "url": "https://urgent.news/2026/08/02/i-ported-picomatch-to-rust-it-passed-1-977-tests-and-lost-the",
  "topic": "culture",
  "section": "Culture",
  "published": "2026-08-02T14:09:38.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/lubuseb/i-ported-picomatch-to-rust-it-passed-1977-tests-and-lost-the-benchmark-by-18x-19fa"
  },
  "original_language": "en",
  "account": null,
  "summary": "This article discusses the process of porting the popular JavaScript library Picomatch to Rust and the challenges encountered during the process. Picomatch is a dependency-free glob matcher used across the JavaScript ecosystem, and the port was attempted as a 72-hour project. The Rust implementation was able to pass 1,977 tests, but it performed significantly slower than the original JavaScript version, taking about 18.2 times longer to match patterns. The author faced difficulties in verifying the accuracy of the port due to the complexity of the library, which includes features such as globstars, nested extglobs, braces, negation, captures, callbacks, Bash and minimatch options, Windows separators, JavaScript regex flags, UTF-16 indexes, and inputs designed to make a parser or regex engine suffer. Despite initial success, further differential testing revealed additional issues, such as handling of the Latin long s character. To address this, the author pinned Node 24.18.0 and derived the complete legacy Canonicalize table for the Basic Multilingual Plane, which helped improve the accuracy of the Rust implementation.",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}