Grumpy is a Python-to-Go transcompiler and runtime designed as a near drop-in replacement for CPython 2.7 that compiles Python source to Go, then to native code. Instead of executing Python bytecode in a VM, Grumpy translates modules into Go code that calls a Go runtime library emulating Python semantics, which can yield performance and deployment benefits in Go ecosystems. The approach integrates with Go’s toolchain, enabling static binaries and potentially easier distribution in environments where Go is already standard. Its runtime implements core Python object and execution models, though the API is not compatible with CPython’s C-API, and extension coverage is incomplete compared to CPython. Grumpy was ultimately archived and is read-only, but the repository remains a valuable reference on alternative Python execution strategies and the trade-offs of VM-less designs. Documentation in the repo and wiki outline architecture, limitations, and examples of compiled output.
Features
- Python-to-Go source transcompilation with no Python VM
- Go runtime library that emulates Python’s object model
- Leverages Go toolchain for static builds and deployment
- Near drop-in CPython 2.7 compatibility for many programs
- Command-line tools to compile modules and packages
- Educational reference for VM-less Python execution