Skip to content

Examples

Arttu Jantunen edited this page Nov 2, 2026 · 1 revision

The repository's examples/ folder has three projects to try parityrun on. Run these from a clone of the repository.

notes: an LLM call as part of the contract

examples/notes is a tiny notes service that titles each note with an LLM:

parityrun --project examples/notes/parityrun_project.py record      # golden/notes/recording.json
parityrun --project examples/notes/parityrun_project.py check       # 100 % parity against itself

Change the system prompt in notes_service.py and run check again: the prompts comparison fails and shows the difference.

guestbook: a PHP site and its ports

examples/guestbook is a PHP site (forms, a CSRF cookie, redirects, HTML pages) with ports to JavaScript, TypeScript and Rust that match it to 100 %:

parityrun --project examples/guestbook/parityrun_project.py record              # php
parityrun --project examples/guestbook/parityrun_project.py check --impl js     # node
parityrun --project examples/guestbook/parityrun_project.py check --impl ts     # node 23.6+
parityrun --project examples/guestbook/parityrun_project.py check --impl rust   # cargo build --release in rust/ first
parityrun --project examples/guestbook/parityrun_project.py capture             # browse it yourself

cart: a PHP library and its ports

examples/cart is a PHP library (functions, a class, exceptions, printed output) with ports to JavaScript, TypeScript and Rust, each with its shim, that match it to 100 %:

parityrun --project examples/cart/parityrun_project.py record              # php
parityrun --project examples/cart/parityrun_project.py check --impl js     # node
parityrun --project examples/cart/parityrun_project.py check --impl ts     # node 23.6+
parityrun --project examples/cart/parityrun_project.py check --impl rust   # cargo (check builds it)
parityrun --project examples/cart/parityrun_project.py routes              # its API, and what the scenarios call

See Libraries for how a library is called and ported.

Clone this wiki locally