{"id":49313439,"url":"https://github.com/tamnd/gocopy","last_synced_at":"2026-04-26T14:00:59.095Z","repository":{"id":353952017,"uuid":"1221509157","full_name":"tamnd/gocopy","owner":"tamnd","description":"Pure-Go compiler from Python 3.14 source to a CPython-compatible .pyc. No cgo, no embedded CPython at runtime.","archived":false,"fork":false,"pushed_at":"2026-04-26T12:27:45.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-26T13:14:43.318Z","etag":null,"topics":["bytecode","compiler","cpython","go","golang","no-cgo","pure-go","py-compile","pyc","python","python-compiler","python314"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tamnd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-26T10:03:54.000Z","updated_at":"2026-04-26T12:27:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tamnd/gocopy","commit_stats":null,"previous_names":["tamnd/gocopy"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/tamnd/gocopy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Fgocopy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Fgocopy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Fgocopy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Fgocopy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tamnd","download_url":"https://codeload.github.com/tamnd/gocopy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamnd%2Fgocopy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32299644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bytecode","compiler","cpython","go","golang","no-cgo","pure-go","py-compile","pyc","python","python-compiler","python314"],"created_at":"2026-04-26T14:00:58.418Z","updated_at":"2026-04-26T14:00:59.089Z","avatar_url":"https://github.com/tamnd.png","language":"Go","readme":"\u003ch1 align=\"center\"\u003egocopy\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003ePure-Go compiler from Python 3.14 source to a CPython-compatible \u003ccode\u003e.pyc\u003c/code\u003e.\u003c/b\u003e\u003cbr\u003e\n  \u003csub\u003eTargeting \u003ca href=\"https://github.com/tamnd/gopapy\"\u003egopapy\u003c/a\u003e for parsing. No CPython at runtime.\u003c/sub\u003e\n\u003c/p\u003e\n\n---\n\n`gocopy` reads Python 3.14 source and writes a `.pyc` that is byte-for-byte\nidentical to the output of `python3.14 -m py_compile`. Same magic, same flags,\nsame validation field, same marshal stream, same constant ordering, same line\ntable, same exception table.\n\nThe intended parser is `github.com/tamnd/gopapy`, which is already 100%\nAST-compatible with CPython 3.14, so gocopy will never have to second-guess\nthe AST it consumes. v0.0.x uses an internal token scanner sized to the\nshapes shipped so far; the gopapy swap lands once gopapy cuts a v1.0.0. The\nmarshal writer is the inverse of [goipy](https://github.com/tamnd/goipy)'s\nreader: same wire format, opposite direction.\n\nThis is the bootstrap branch. Track scope and progress in\n[`docs/COVERAGE.md`](docs/COVERAGE.md). For a tour of the pipeline see\n[`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md).\n\n## Quick start\n\n```sh\ngo build ./cmd/gocopy\n: \u003e /tmp/empty.py\n./gocopy compile /tmp/empty.py -o /tmp/empty.pyc\npython3.14 -c \"import marshal, struct\nwith open('/tmp/empty.pyc','rb') as f: f.read(16); print(marshal.loads(f.read()))\"\n# \u003ccode object \u003cmodule\u003e at 0x..., file \"/tmp/empty.py\", line 1\u003e\n```\n\n`gocopy compile FILE.py` defaults to `__pycache__/FILE.cpython-314.pyc`,\nmatching CPython's `py_compile`.\n\n## Stability\n\nLibrary API and CLI flags are not frozen until v0.2.0. After v0.2.0:\n\n- **CLI surface stable.** `gocopy compile FILE.py [-o OUT.pyc]\n  [--mode timestamp|hash|unchecked-hash] [--source-date-epoch N]`.\n- **Library entry points stable.** `compiler.Compile`, `marshal.Marshal`,\n  `pyc.WriteFile`, `bytecode.CodeObject`'s exported field set.\n- **Module path is `github.com/tamnd/gocopy/v1`.** Future breaking changes\n  move to `/v2`, so the import path itself enforces the contract.\n\nInternal helpers under `internal/` are exempt and may move freely.\n\n## Tests\n\n```sh\ngo test ./...        # unit tests across bytecode, compiler, marshal, pyc\ntests/run.sh         # end-to-end byte-diff against python3.14 -m py_compile\n```\n\n`tests/run.sh` requires `python3.14` on PATH; it diffs gocopy's output\nagainst `python3.14 -m py_compile`'s output for every fixture under\n`tests/fixtures/`.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamnd%2Fgocopy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftamnd%2Fgocopy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamnd%2Fgocopy/lists"}