rg-optimized
Made by JeffUpgrade an already-installed ripgrep to a from-source build with PCRE2, native CPU SIMD (AVX2 etc.), and fat LTO. Use when the user has stock rg but needs PCRE2 features (lookahead, lookbehind, possessive quantifiers, atomic groups via rg -P), sees "PCRE2 is not available", wants faster ripgrep via target-cpu=native + release-lto, or is building ripgrep from master with all features. NOT for installing rg from scratch.
Works With
Quality and Utility come from canonical skill metadata. Community ratings appear separately as stars when subscriber reviews exist.
Subscribe to download
Public previews are available, but downloads, CLI sync, and premium content require an active subscription.
Sign In to Subscribe- Full skill content with deterministic versioning
- CLI sync + local search index
- Access to Jeffrey’s premium library
Save to your account
Saved skills live in your cloud list. Run jsm sync on each machine to pull them locally.
What's New with this Skill
1Updates, enhancements, and release notes for this skill.
New: rg-optimized, build ripgrep from source with PCRE2 and native CPU optimizations
Stock ripgrep ships without PCRE2, which means rg -P for lookahead/lookbehind fails with "PCRE2 is not available". The fix is a build from master with --features pcre2 plus RUSTFLAGS="-C target-cpu=native" and the release-lto profile for the fastest local binary.
- PCRE2 enables lookahead and lookbehind in rg -P. Pattern syntax is PCRE2's, not Rust regex's; references/PCRE2-PATTERNS.md has worked examples
- RUSTFLAGS="-C target-cpu=native" plus the release-lto profile (fat LTO, codegen-units = 1) produces the fastest local binary at the cost of portability
- Verification line: rg --version must show features:+pcre2. If it doesn't, the build skipped PCRE2 and the binary won't help
- Decision tree: "PCRE2 is not available" → build. Pattern syntax error → check PCRE2 syntax. Works fine → no action needed. Most invocations don't need this
- Build dependencies per platform: libpcre2-dev and pkg-config on Debian/Ubuntu, pcre2-devel and pkg-config on Fedora/RHEL, pcre2 and pkg-config via Homebrew on macOS, pcre2 and pkgconf on Arch. Nightly Rust is required
Two reasons to do this. First: rg -P (PCRE2 mode) supports lookahead and lookbehind; the default Rust regex engine doesn't. Most agent workflows that need to find "X but not when followed by Y" hit this. Second: native CPU optimizations and link-time optimization combine to a noticeably faster binary on the box you actually use, at the cost of portability.