CPython demo

Builds the CPython 3.14.6 interpreter with badc and runs a slice of the standard library test suite. The interpreter exercises the bytecode evaluator, the object and memory model, Unicode, and the parser.

Layout

smoke.py configures --without-mimalloc --without-remote-debug; its docstring carries the first error each knob produces today. In short: mimalloc’s per-thread heap table is a thread-local pointer initialized with the address of a global, which badc rejects, and the remote-debugging code needs process_vm_readv on Linux and libproc.h on macOS. --with-ensurepip has no effect on what badc compiles.

CI builds and tests every target with build.py – a matrix over macOS, Linux x64/arm64, and Windows x64/arm64; each lane builds and runs natively. smoke.py and bench.py cover the differential benchmark, which still needs a make-built reference.

Running

python3 demos/python/setup.py                                # once, to fetch the source
python3 demos/python/build.py --target=macos-aarch64 --test  # build + run the test slice
python3 demos/python/build.py --target=windows-x64 --link    # build + link only
python3 demos/python/bench.py                                # parity + timings vs the reference

cargo build --release --features full must have produced target/release/badc first. bench.py reuses the reference interpreter built by smoke.py under .cache/.

^ To the top