Shapeshift

Shapeshift

Record the original. Replay on the port. Count what matches.

A port of a library to another language is only as good as its agreement with the original. Shapeshift records real calls to the Python original, replays every one on the port, groups the calls that differ, and reports the match rate.

Ports proved
3
Recorded calls replayed
72,574
Calls that match
72,574

How a port is proved

  1. Record

    Run the original's tests, or any workload, with chosen functions wrapped. Each call's arguments and its result or exception type go to a tape, one JSON line per call.

  2. Replay

    Send each recorded call to the port, one JSON line in and one out. The port can be written in any language.

  3. Cluster

    Group the calls that differ by function and kind (wrong value, wrong exception, not implemented, crash), biggest group first. Each group is one piece of work.

  4. Measure

    The match rate is the share of recorded calls the port answers the same way. A port is listed here only when every counted call matches.

Each port also keeps a holdout or random tape that was never used to fix anything, so the rate is not only a measure of the cases the port was tuned on. A clean replay is evidence, not a guarantee: it proves the recorded inputs, and each port's page lists what its tapes do not cover.

The ports

The same list, for programs: /ports.json.

Check a port yourself

Every port keeps its tapes in its repository, so anyone can replay them. The checker, Shapeshifter, is public under the Apache-2.0 licence and needs Python 3.11 or newer:

pip install "shapeshifter[record] @ git+https://github.com/Pushkal-Gupta/shapeshifter"

Then replay a tape on a port's adapter, for example shapeshifter replay calls.jsonl -- ./adapter. Each port's page has its exact commands. Source and documentation: github.com/Pushkal-Gupta/shapeshifter.

Want a library ported?

Tell us which Python library you need in TypeScript, Go or Rust. The request opens as a public GitHub issue; nothing is sent from this site.

Request a port