"Pizza: The Secret Recipe for Clean, Tasty Code!" 🍕
Write once in Pizza's simple syntax → transpile to Python, C++, and more.
Pizza is a developer-first transpiler and CLI toolchain that introduces a clean, JavaScript-inspired syntax which compiles into your favorite backend languages — starting with Python. It’s designed to improve readability, reduce boilerplate, and provide a hot-reload-ready dev workflow. Powered by Rust, Pizza runs fast and scales well for future enhancements.
- 🍝 JS-like syntax with optional braces and semicolons
- ⚙️ Built-in CLI (
pizza cook
,pizza bake
,pizza serve
, etc.) - 🧠 Plugin system & macro support (e.g.
repeat
,until
) - 🔁 Hot-reload-ready (planned)
- 🧰 Dev server support (e.g. Flask, FastAPI, etc.)
- 📚 File-based modules with auto import
- 🎨 Themes & starter templates (CLI, FastAPI, Flask)
- 🚀 Fast performance via native Rust binary
- ✅ No need to install Rust — comes as a standalone binary
- 💻 VS Code extension (coming soon)
pizza-project/
├── src/ # .pza source files
│ └── main.pza
├── out/ # Transpiled output (e.g., Python)
│ └── main.py
├── plugins/ # Custom macro/syntax plugins
│ └── repeat.rs
├── templates/ # Starter templates (e.g., CLI, API)
│ └── fastapi.pza
├── dist/ # Production-ready build
├── recipe.json # Project config (replaces pizza.json)
├── README.md
if(5 > 2){
print("Five is greater than two!");
}
repeat(3){
print("Hello!");
}
if 5 > 2:
print("Five is greater than two!")
for _ in range(3):
print("Hello!")
- Parses
.pza
into AST - Transforms AST via macros/plugins
- Transpiles to target language (initially Python)
- Outputs result to
out/
ordist/
folder
All written in high-performance Rust, compiled to a native binary (pizza.exe
or pizza
).
Command | Description |
---|---|
pizza prep |
Initialize a new Pizza project |
pizza cook |
Transpile + run dev build (hot reload in future) |
pizza bake |
Transpile production build only |
pizza serve |
Transpile + run production build |
{
"source": "src",
"output": "out",
"dist": "dist",
"language": "python",
"sourcemaps": true,
"plugins": ["repeat", "until"],
"runner": "fastapi",
"theme": "default",
"templates": ["fastapi", "cli"]
}
Create plugins in the plugins/
folder to transform macro syntax.
// Example Rust-based plugin logic
// Converts `repeat(n){...}` to `for _ in range(n): ...` in Python
fn transform_repeat(node: &ASTNode) -> TranspiledCode {
// Plugin logic here
}
Pizza provides reusable starter templates:
fastapi
→ REST APIflask
→ Web Appcli
→ Command-line App
- Syntax highlighting
- Auto transpile on save
- Macro autocomplete
- Source map error tracing
Pizza ships as a single compiled .exe
or binary, so you don't need to install Rust, Python, or any build tools. Just install pizza.exe
and run:
pizza cook
Pizza takes care of everything under the hood.
- Parser, AST builder
- Transpiler engine
- Plugin system
- CLI tool (Rust)
- Hot Reloading
- VS Code extension
- Playground (Web)
- Multi-language output (C++, JS, etc.)
- Template/plugin registry
- Native GUI (Pizza Studio)
- Fork the repo
- Create a feature branch
- Push your changes
- Open a PR
Read CONTRIBUTING.md
for details.
MIT License. See LICENSE
.
Maduranga Jayasena
Crafting clean code with a crispy crust.
GitHub: @MadurangaDev