CodeSampleX

Sample

RegexBuilder enforces memory and nesting limits at compile time via Error::CompiledTooBig and Error::Syntax, and controls octal syntax, quantifier greediness, and Unicode character classes.

sha256:574f036389cec38bb62c26ab576954b8abd760beb1fad5213bd8de7071dee81c

Publication state. LOCAL_PASS passed only on its author's machine; PUBLISHED is public and awaiting independent verification; CROSS_PASS was reproduced by another verifier; MATRIX_PASS passed across environment boundaries; STABLE has sustained independent passes without recent failures. Evidence strength. L0 is source only; L1 resolved dependencies; L2 compiled or loaded; L3 passed its contract; L4 was independently reproduced; L5 passed across different environments. MIT-0

Execution evidence

Declared environment and signed verification runs are separated so you can see exactly what this sample proves.

Evidence basis
Independent cross-verification
Verification receipts
2
Verification level
L4_CROSS_PASS

Declared environment

Execution context
rust
Operating system
linux
Architecture
x64
Runtime
rust
Language
rust
Package manager
cargo

Verification-run environments

rust 1 · linux alpine/x64 · docker PASS
Execution context
rust 1
Operating system
linux alpine · musl
Architecture
x64
Runtime
rust 1
Language
rust
Package manager
cargo
Execution
container · docker

CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-18

rust 1 · linux alpine/x64 · docker PASS
Execution context
rust 1
Operating system
linux alpine · musl
Architecture
x64
Runtime
rust 1
Language
rust
Package manager
cargo
Execution
container · docker

CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-18

Case

HOW
Goal
RegexBuilder enforces memory and nesting limits at compile time via Error::CompiledTooBig and Error::Syntax, and controls octal syntax, quantifier greediness, and Unicode character classes.
Packages
Symbols
  • regex::RegexBuilder
  • regex::Error
Environment
rust
Created
2026-08-18T10:08:33Z

Contract

  1. RegexBuilder::size_limit restricts the compiled regex memory footprint, returning Error::CompiledTooBig with the configured limit when exceeded rather than panicking or truncating the pattern.
  2. RegexBuilder::nest_limit bounds the maximum nesting depth of parentheses, returning Error::Syntax when exceeded.
  3. RegexBuilder rejects octal escape sequences by default with Error::Syntax, but correctly resolves them when octal is explicitly enabled.
  4. RegexBuilder::swap_greed inverts the default greediness of repetition operators, causing + to match lazily.
  5. RegexBuilder::unicode controls whether shorthand character classes like \d match Unicode digits or strictly ASCII digits.

Files

  • Cargo.lock
  • Cargo.toml
  • NOTES.md
  • csx.json
  • src/lib.rs

Download the source artifact (tar.gz)

Origin Seeder

csx-seed

Verification receipts

  • rust 1 · linux alpine/x64 · docker PASS
    CONTAINER_RUN compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS cargo@1
    ed25519:d91480838ac982c9
  • rust 1 · linux alpine/x64 · docker PASS
    CONTAINER_RUN compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS cargo@1
    ed25519:2175b912ea1c23b1