This is the single source of truth for priorities and next steps.
- Goal: build beautiful CLI apps with Python syntax, shipped as tiny, fast binaries.
- Runtime: PocketPy + runtime Zig modules + Zig loader for universal binaries.
- Compatibility status:
tests/compat_report_pocketpy.mdshows 50/52 targeted modules at 100% parity (2 have no baseline on older CPython versions). Refresh withpython3 tests/compat_runner.py --report. - PocketPy vendor patches are tracked under
pocketpy/patches/and verified viapython3 scripts/verify-pocketpy-patches.py --check-upstream.
- Native modules cover TUI (charm/input/ui), terminal + ANSI, and a growing stdlib set (copy, fnmatch, typing, csv, datetime, json, subprocess, signal, logging, etc.).
- Loader and CLI already build and run universal binaries;
cli/src/test_cmd.zigandtests/compat_runner.pyprovide compatibility tooling. - Stubs exist in
stubs/andcli/src/stubs/; there is a generator script inscripts/generate_stubs.py. - CPython tests are vendored under
tests/cpython/and are used to track parity.
- PocketPy is now the default and only runtime.
- MicroPython has been removed from the project.
tests/compat_runner.pydefaults to PocketPy.
- Keep Zig-only modules as the standard and avoid Python fallback modules.
- Targeted stdlib parity is now at 100% for the current module set (see
tests/compat_report_pocketpy.md). - Maintain parity by re-running
python3 tests/compat_runner.py --reportafter runtime changes.
- Align stubs with the PocketPy import surface and regenerate with a single command.
- Update templates/examples to reference the PocketPy runtime and current modules.
- Add CI target for PocketPy compatibility report generation.
- Keep the compatibility story crisp: document what’s implemented vs intentionally missing, and keep
tests/compat_report_pocketpy.mdcurrent. - Only after module coverage feels good: consolidate stub generation and make it a predictable workflow (one command, single source of truth).
- Add CI targets for Vision + compatibility report generation.
- Keep cross-target builds working: ensure
ucharm build --target <target>continues to fetch/run the correctpocketpy-ucharmruntime.- In a source checkout,
ucharm buildcan build missing target runtimes locally via Zig (no release assets required).
- In a source checkout,
- Maintain the Vision “nice-to-have” surface (
toml/tomllib,http.client,secrets,hmac,dataclasses,xml.etree,sqlite3, and archive helpers). - Keep the suite honest by expanding tests when behavior changes.
- Decide the canonical stub source (Zig annotations or
stubs/) and wirescripts/generate_stubs.pyor a CLI command to regenerate them. - Update templates and docs to reference the canonical stubs and correct import paths.
- Add a CI step that runs
python3 tests/compat_runner.py --reportand uploads the report as an artifact. - Add a CI step that runs
python3 scripts/verify-pocketpy-patches.py --check-upstream. - Validate cross-target build support (
ucharm build --targetsand a sample--targetbuild). - Consider producing all
pocketpy-ucharmtarget runtimes from one host via Zig cross-compilation (may remove the need for a matrix).
- Tree-shaking or module selection for smaller binaries.
ucharm dev(watch mode / hot reload).- Networking and formats:
http.client,toml,yaml,gzip,zipfile,tarfile. - Security:
secrets,hmac. - Concurrency:
threading,queue(PocketPy threading support TBD). - Database:
sqlite3(likely large; consider an optional build flag / separate release flavor).