CodeSampleX

Ejemplo

winnow 1.0.4: Port a pre-1.0 winnow parser to winnow 1.0, where the alt and tuple arity caps were lowered below what the changelog claims, the Result/ModalResult pair had already replaced PResult back in 0.7.0, dec_uint silently refuses leading zeros on every version, and 0.7.14 added a built-in Pratt parser

Muestra verificada para cargo winnow 1.0.4: Port a pre-1.0 winnow parser to winnow 1.0, where the alt and tuple arity caps were lowered below what the…

sha256:b350c4d0906c65d969286b7014ce1d602e577b7c34f46b9fbb965f77f6481f6f

Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido. Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas. MIT-0

Evidencia de ejecución

El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.

Base de evidencia
Contrato firmado aprobado
Recibos de verificación
2
Claves de firma que lo compilaron
2
Entorno declarado rust 1 linux x64 rust 1 rust cargo

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
rust 1 · linux alpine/x64 · docker ed25519:a2ec939a4c60e243 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · cargo@1
2026-08-14
rust 1 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · cargo@1
2026-08-18

Caso

MIGRATION
Objetivo
Port a pre-1.0 winnow parser to winnow 1.0, where the alt and tuple arity caps were lowered below what the changelog claims, the Result/ModalResult pair had already replaced PResult back in 0.7.0, dec_uint silently refuses leading zeros on every version, and 0.7.14 added a built-in Pratt parser
Paquetes
Símbolos
  • winnow::combinator::alt
  • winnow::combinator::seq
  • winnow::combinator::expression
  • winnow::combinator::cut_err
  • winnow::combinator::separated
  • winnow::combinator::repeat
  • winnow::ascii::dec_uint
  • winnow::token::literal
  • winnow::ModalResult
  • winnow::Result
Entorno
rust 1
Creado
2026-08-14T20:45:25Z

Contrato

  1. assert the pre-1.0 spellings that did NOT change still hold: literal for tag, take for recognize, the count range first in repeat and separated, the stream advanced through &mut, parse_peek returning (remaining, output), and parse reporting the offset where it stopped
  2. assert alt accepts at most 9 branches on 1.0 so a 12-keyword lexer must nest or pass an array, and both spellings agree on every keyword
  3. assert alt takes the first matching branch rather than the longest, so reordering the same two branches changes which one wins
  4. assert a tuple used as a sequence holds at most 11 parsers, so an 11-parser timestamp works and a 13-parser one needs seq! with ignored _ fields
  5. assert dec_uint stops at a leading zero, yielding 0 and leaving the remaining digits, while digit1 with parse_to accepts zero padding
  6. assert winnow::Result and ModalResult parse identically and glob-importing the crate shadows core Result, but only ErrMode implements ModalError, so cut_err needs the modal form and stops alt falling through to a catch-all
  7. assert the built-in expression Pratt parser honours binding power, left and right associativity, and an operator that returns an error

Archivos

  • Cargo.lock
  • Cargo.toml
  • csx.json
  • src/main.rs

Descargar el artefacto de código fuente (tar.gz)

Seeder de origen

anonymous