The fourth corner of the polyglot primitive stack. Python code imports core
the way Go code imports core/go: same primitive names, same import paths,
different syntax surface.
runtime/contains a bootstrap Tier 1 interpreter that validates the CorePy module contract, import shape, and Python-style list/dict type mapping without waiting on the gpython dependency.runtime/tier2/contains the CPython subprocess runner used for the Tier 2 escape hatch, with timeout, stdout/stderr streaming, and structured exit results.- Tier 1 registers small stdlib-shaped shadows for common imports
(
json,os,os.path,subprocess,logging,hashlib,base64, andsocket) so gpython scripts can use familiar import names while still calling Core-backed primitives. corepy run -tier2-fallbackretries scripts in Tier 2 CPython when Tier 1 reports an unsupported import, preserving the explicit two-tier boundary.corepy replopens a stateful Tier 1 line session for quick primitive experiments without leaving the CorePy runtime.bindings/contains Go-backed bindings for the RFC v1 module surface:core.echo,core.fs,core.json,core.medium,core.options,core.path,core.process,core.config,core.data,core.service,core.log,core.err,core.strings,core.array,core.registry,core.info,core.entitlement,core.action,core.task,core.i18n, the firstcore.mathsurface, plus initial RFC coverage forcore.cache,core.crypto,core.dns, andcore.scm, and importable planned stubs forcore.api,core.ws,core.store,core.container,core.agent, andcore.mcp(mean,median,variance,stdev, sorting, scaling, signal helpers, and thecore.math.kdtree/core.math.knn/core.math.signalimport paths).py/core/contains the Python package surface for the RFC v1 modules, including docstrings, concrete fallbacks for CPython validation, and module-level helpers that mirror the Tier 1 binding shape.
GOWORK=off go mod tidy
GOWORK=off go vet ./...
GOWORK=off go test ./...
GOWORK=off go test -tags gpython ./...
python3 -m unittest discover -s py/tests -v| Path | Purpose |
|---|---|
bindings/ |
Go-side primitive bindings and type conversion helpers |
runtime/ |
Tier 1 bootstrap interpreter and integration tests |
py/core/ |
Python package surface for core.* modules |
py/tests/ |
Python package validation |
examples/ |
Example CorePy programs |
/home/claude/Code/core/plans/code/core/py/RFC.md