Skip to content

Conversation

pdx-daniel
Copy link

@pdx-daniel pdx-daniel commented Sep 26, 2025

Description

Click here to view only the non-vendored PCRE/PCRE2 changes.

Migrates FastFEC from end-of-life PCRE v1 to PCRE2 while adding Zig 0.14+ support and cleaning up the build system to fix Homebrew installs.

Resolves:

What Changed

  • Added PCRE2: Vendored PCRE2 10.42 source tree in src/pcre2/
  • Thin Wrapper: Created src/regex.h and src/regex.c to maintain API compatibility
  • Build Updates: Modernized build.zig for Zig 0.14+ with flexible PCRE2 linking
  • Removed Legacy: Deleted old PCRE v1 source tree
  • Benchmarking Script: Adds shell benchmarking script to provide canonical benchmarking

Test Steps

  • C Tests: 21/21 passing
  • Python Tests: 8/8 passing
  • All Build Targets: Working across platforms
  • Performance: No regression in benchmark tests; Maintained ~11.89 MB/s processing speed

- Add complete PCRE2 10.42 source tree in src/pcre2/
- Includes all headers, source files, and build configuration
- No functional changes, pure vendor import
- Delete src/pcre/ directory and all PCRE v1 files
- No functional impact, just cleanup before PCRE2 migration
- Add thin regex wrapper and switch headers/types/flags
- Support vendored PCRE2 with toggle; default to vendored
- Produce wasm to zig-out/lib and adjust CI Windows artifact path
- Restore missing Python/CI files and benchmarking script

Notes:
- Preserves behavior; all C tests (21/21) and Python tests (8/8) pass
- CI release and wheels workflows tested across platforms
@pdx-daniel pdx-daniel requested a review from a team as a code owner September 26, 2025 16:43
@anthonyjpesce anthonyjpesce requested a review from Copilot October 8, 2025 18:44
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates FastFEC from the deprecated PCRE v1 library to the modern PCRE2 v10.42 while adding Zig 0.14+ support. This resolves compatibility issues with Homebrew installations and end-of-life dependencies.

Key changes:

  • Upgraded from PCRE v1 to PCRE2 v10.42
  • Added Zig 0.14+ compatibility to the build system
  • Created a thin compatibility wrapper to maintain API compatibility

Reviewed Changes

Copilot reviewed 54 out of 92 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/pcre2/pcre2_chartables.c Updated character tables with PCRE2 structure and comments
src/pcre2/pcre2_auto_possess.c New PCRE2 auto-possessification module
src/pcre2/pcre2.h Main PCRE2 public header with comprehensive API
src/pcre2/config.h PCRE2 build configuration file
src/pcre2/LICENCE Updated PCRE2 license with current terms
src/pcre/ucp.h Removed old PCRE v1 Unicode property header
src/pcre/pcreposix.h Removed old PCRE v1 POSIX compatibility header
src/pcre/pcreposix.c Removed old PCRE v1 POSIX compatibility implementation
src/pcre/pcredemo.c Removed old PCRE v1 demonstration program
src/pcre/pcrecpparg.h Removed old PCRE v1 C++ argument handling
src/pcre/pcrecpp_internal.h Removed old PCRE v1 C++ internal definitions
src/pcre/pcrecpp.h Removed old PCRE v1 C++ wrapper
src/pcre/pcre_version.c Removed old PCRE v1 version reporting
src/pcre/pcre_tables.c Removed old PCRE v1 character tables

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


/* This set of tables was written in the C locale. */

/* The pcre2_ftables program (which is distributed with PCRE2) can be used
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'pcre2_ftables' to 'pcre2_dftables'.

Suggested change
/* The pcre2_ftables program (which is distributed with PCRE2) can be used
/* The pcre2_dftables program (which is distributed with PCRE2) can be used

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant