Write Expressive, Deploy Native - The official website for PTD
PTD.dev is the official website for Polyglot Transpilation Development - a paradigm where expressive programming languages (Ruby, Python, JavaScript) are transpiled to fast native code (Rust, Swift, C#) using AI.
This website itself is built with PTD: Developed locally with Ruby/Sinatra for rapid iteration, deployed in production as transpiled Rust for blazing-fast performance.
# Clone the repository
git clone https://github.com/ai-ptd-dev/ptd.dev.git
cd ptd.dev
# Install dependencies
bundle install
# Start development server
./bin/server
# Visit http://localhost:4567Polyglot Transpilation Development enables developers to:
- Write in comfortable languages - Ruby, Python, JavaScript
- AI transpiles to native code - Rust for systems, Swift for iOS, C# for Windows
- Deploy with native performance - 250x faster, 90% less memory
- No runtime overhead - No garbage collector, no JIT
| Metric | Ruby/Python/JS | Transpiled to Rust | Improvement |
|---|---|---|---|
| Startup Time | 2-3 seconds | 10ms | 250x faster |
| Memory Usage | 150MB | 15MB | 90% reduction |
| Binary Size | 50MB + deps | 1.5MB | 97% smaller |
| Request/sec | 3,000 | 1,000,000+ | 300x more |
- Language: Ruby 3.4+ with Sinatra
- Templates: ERB with hot reload
- Tools: Full Ruby ecosystem
- Experience: Fast iteration, easy debugging
- Language: Rust with Actix Web
- Templates: Compiled templates
- Binary: Single static executable
- Performance: 250x faster startup, 90% less RAM
ptd.dev/
├── src/
│ ├── server.rb # Sinatra application (dev)
│ └── utils/ # Content management
├── views/ # ERB templates
├── content/
│ ├── pages/ # Static pages
│ ├── blog/ # Blog posts
│ └── docs/ # Documentation
├── public/ # Static assets
├── spec/ # RSpec tests
└── bin/ # CLI tools
# Start development server with auto-reload
./bin/server --rerun
# Generate a new blog post
./bin/generate-post "Your Post Title"
# Run tests
bundle exec rspec
# Run linting
bundle exec rubocop -AUse the generator for consistent structure:
./bin/generate-post "Rust is the New Assembly"
# Creates: content/blog/20250915164001_rust-is-the-new-assembly.md
# URL: /blog/2025/09/15/rust-is-the-new-assemblyCreate HTML files in content/pages/:
---
title: "Page Title"
description: "SEO description"
---
<h1>Your Content</h1># Run all tests
bundle exec rspec
# Run with coverage
COVERAGE=true bundle exec rspec
# Run specific test
bundle exec rspec spec/app_spec.rbCurrent test coverage: 96% (120/125 tests passing)
# Development (Ruby/Sinatra)
bundle exec rackup config.ru
# Transpile to Rust
ptd transpile src/ --target rust --framework actix
# Production (Rust)
./ptd-dev-server
# Starts in 10ms, uses 15MB RAM# Set production environment
export RACK_ENV=production
# Install production dependencies
bundle install --without development test
# Start with Puma
bundle exec puma -C config/puma.rb| Repository | Description | Language | Target |
|---|---|---|---|
| ptd-ruby-cli | Ruby CLI boilerplate | Ruby | Rust |
| ptd-python-cli | Python CLI boilerplate | Python | Rust |
| ptd-node-cli | Node CLI boilerplate | JavaScript | Rust |
| ptd.dev | This website | Ruby/Sinatra | Rust |
"Rust is the New Assembly" - Read our manifesto on why Rust has become the universal compilation target, replacing assembly as the foundation for modern transpilation.
We welcome contributions! Areas of interest:
- Content - Blog posts about transpilation experiences
- Examples - Real-world PTD use cases
- Tools - Improve the transpilation pipeline
- Documentation - Help others understand PTD
MIT License - Use freely in your projects
Created by Sebastian Buza to demonstrate that developers shouldn't have to choose between productivity and performance.
- PTD Organization
- Live Website (when deployed)
- Creator's GitHub
Remember: This website you're reading about? It's developed in Ruby for developer happiness, but runs in production as Rust for user happiness. That's the power of PTD! 🚀