Skip to content

feat(EMIT-01): emit deterministic Python ES modules - #30

Merged
ellainng merged 3 commits into
mainfrom
feat/EMIT-01-es-modules
Oct 20, 2026
Merged

ellainng merged 3 commits into
mainfrom
feat/EMIT-01-es-modules

Conversation

@ellainng

Copy link
Copy Markdown
Member

Approved single-module Python now compiles to deterministic ES modules through the validated front-end IR. A dependency-selected helper closure preserves Python integers, Unicode code points, tuples, truthiness, evaluation order, definition-time defaults and source-located errors. Module initialization remains in source order.

The in-memory artifact includes source maps, explicit exports/imports/notices, compiler/profile identities and complete output hashes/sizes. The createModule factory gives browser adapters a text sink and explicit typed input boundary. The shared text_metrics example executes under emitted JavaScript without an interpreter or server fallback.

Validation: 60 Python tests, including CPython/Node output/error/side-effect parity, Unicode/surrogate distinctions, recursion/defaults, negative boundaries, deterministic manifests and Node source-map consumption. Wheel/sdist built with the declared uv backend. Existing package 0.1.0 is not republished; local modules and browser host integration remain their following tasks.

Depends on #29. Closes #13 after merging to main.

@ellainng
ellainng changed the base branch from feat/PARSE-02-compiler-front-end to main October 20, 2026 17:23
@ellainng
ellainng merged commit b948382 into main Oct 20, 2026
3 checks passed
@ellainng
ellainng deleted the feat/EMIT-01-es-modules branch October 20, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EMIT-01: Emit deterministic JavaScript for the approved subset

1 participant