You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Track Python-compatible regex rules in ddns-rs #729
The Python client evaluates regex: address rules with Python re, while ddns-rs currently uses Rust's regex crate. Rust intentionally rejects Python features such as look-around and backreferences, so an existing Python configuration may require changes before it can be reused by the Rust client.
The Rust MVP now documents this boundary and returns an explicit compatibility error, but syntax-level parity should be evaluated separately from the initial implementation.
Proposed Solution (解决方案或思路)
Track a dedicated compatibility design and implementation:
inventory Python regex: patterns used in documentation, tests, and reported user configurations
define the required Python re compatibility subset
evaluate a safe Rust-native implementation or translation strategy, including look-around and backreferences
reject patterns with unsafe or unsupported behavior deterministically
add shared Python/Rust conformance fixtures and process-level tests
update the compatibility matrix once a supported approach is selected
The solution must preserve the standalone Rust binary, avoid invoking Python, and consider ReDoS/backtracking risks before accepting a backtracking regex engine.
Alternatives Considered (考虑过的其他方案)
Keep Rust regex syntax as the permanent contract. This is the current safe MVP behavior but requires users to migrate some patterns.
Add fancy-regex. It supports more constructs but is not a complete Python re implementation and introduces backtracking/performance risks.
Invoke Python for matching. Rejected because it breaks the standalone Rust deployment goal.
Additional Context (补充说明)
Follow-up to PR #728 and its regex compatibility review thread. This issue is intentionally separated so the MVP PR can keep a small, predictable dependency and security surface while the compatibility trade-off is evaluated independently.
Activity