Skip to content

Homebrew ready#4

Merged
pdx-daniel merged 3 commits intodevelopfrom
homebrew-ready
Sep 26, 2025
Merged

Homebrew ready#4
pdx-daniel merged 3 commits intodevelopfrom
homebrew-ready

Conversation

@pdx-daniel
Copy link
Owner

Pull Request: PCRE v1 → PCRE2 Migration with Zig 0.14+ Support

Overview

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

Why This Change

  • Homebrew Compatibility: PCRE v1 is EOL, PCRE2 is required for modern distros
  • Zig Modernization: Support current Zig versions (≥0.14)
  • Build Simplification: Remove unnecessary complexity while maintaining functionality

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

Key Features

  • Zero Breaking Changes: All existing code works unchanged
  • Flexible Linking: -Dvendored-pcre option (defaults to true)
  • Cross-Platform: Works on macOS, Linux, Windows, WASM
  • Performance: Maintained ~11.89 MB/s processing speed

Test Results

  • C Tests: 21/21 passing
  • Python Tests: 8/8 passing
  • All Build Targets: Working across platforms
  • Performance: No regression in benchmark tests

Build Options

# Default (vendored PCRE2)
zig build

# System PCRE2 (for package maintainers)
zig build -Dvendored-pcre=false

# WASM build
zig build -Dwasm=true

Files Changed

  • Major additions: PCRE2 source tree, regex wrapper
  • Major removals: Legacy PCRE v1, build complexity

Ready for merge ✅ - All tests passing, no breaking changes.

- 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 merged commit 8e05807 into develop Sep 26, 2025
18 checks passed
@pdx-daniel pdx-daniel deleted the homebrew-ready branch September 26, 2025 16:34
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