A variant of Python designed to be statically compilable while retaining useful dynamic features, with both an interpreter and a compiler.
SPy is a variant of Python specifically designed to be statically compilable while retaining many of Python's dynamic features. It consists of an interpreter for development and a compiler for speed, targeting native executables, WASI, and Emscripten. The project aims to provide Python's developer experience with the performance benefits of compiled languages.
Python developers seeking improved performance through static compilation, language implementers interested in Python semantics, and those exploring WebAssembly as a compilation target.
SPy offers a unique blend of Python's dynamic usability with static compilation capabilities, enabling faster execution without sacrificing developer ergonomics. Its integration with WebAssembly and support for multiple targets make it versatile for various deployment scenarios.
SPy language
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Compiles SPy code to native executables, WASI, or Emscripten targets, offering significant speed improvements over standard Python interpretation for optimized execution.
Includes an interpreter for rapid testing and development, maintaining Python-like interactivity as emphasized in the README for a smooth development experience.
Uses redshift to convert SPy AST into a statically compilable form while preserving dynamic semantics, enabling a hybrid approach that bridges dynamic and static features.
Integrates WebAssembly as both a compilation target and runtime component, supporting diverse environments like browsers and edge computing through WASI and Emscripten.
The README admits documentation is 'very scarce,' relying on blog posts and talks, which hinders learning and troubleshooting for new users.
Installation requires an editable pip install and manual building of the libspy runtime library with make, adding friction compared to standard Python tooling.
Based on blog posts and a roadmap, SPy is unstable and likely to have breaking changes, making it unsuitable for production or critical applications.