Latest update
Codex wrote a Python bytecode compiler that matches CPython byte for byte, and uv's creator says it's 3-4x faster
First seen on X 2 days ago@charliermarsh ♥ 1,20615 views
Charlie Marsh, whose company Astral makes the Python package manager uv, said on Nov. 10 that he had OpenAI's Codex build a CPython bytecode compiler in Rust called serc. "It emits byte-for-byte identical output on the top 10,000 PyPI packages, 2-4x faster than the CPython implementation," he wrote (about 1,200 likes).
The GitHub repo says serc matches CPython on real codebases such as Django, Airflow and Transformers across CPython 3.12 to 3.15 and optimization levels 0 to 2, while compiling whole projects 3-4x faster than CPython's compileall. Airflow drops from 324 ms to 79 ms and Transformers from 832 ms to 288 ms. Install it with `cargo install serc-cli --locked` and run `serc compile <path>`. Marsh noted it can produce bytecode without installing CPython, for example inside a Docker build.
The repo says only the README was human-edited; all code changes, PR summaries and other docs were written by GPT in Codex, and it warns the experimental compiler may emit incorrect bytecode. Astral will publish agent-authored experiments like this under a new astral-experiments org, and Marsh said it may ship as an opt-in feature in uv.
One reply pointed out that CPython, acting as the oracle, did most of the work. Marsh agreed it "works great as long as you have an oracle." The same day Anthropic said about 1,000 Fable 5.2 agents built an operating system in eight days, another case of agents rewriting large codebases against an existing reference.
“I had Codex build a CPython bytecode compiler in Rust (`serc`).”
