ppt-rs
The Rust library for generating PowerPoint presentations that actually works.
While other Rust crates for PPTX generation are incomplete, broken, or abandoned, ppt-rs generates valid, production-ready PowerPoint files that open correctly in PowerPoint, LibreOffice, Google Slides, and other Office applications.
🎯 Convert Markdown to PowerPoint in seconds - Write your slides in Markdown, get a professional PPTX file. No PowerPoint needed.
Why ppt-rs?
- 🚀 Markdown to PPTX - Write slides in Markdown, get PowerPoint files. Perfect for developers.
- ✅ Actually works - Generates valid PPTX files that open in all major presentation software
- ✅ Complete implementation - Full ECMA-376 Office Open XML compliance
- ✅ Type-safe API - Rust's type system ensures correctness
- ✅ Simple & intuitive - Builder pattern with fluent API
Quick Start
Markdown to PowerPoint (Recommended)
The easiest way to create presentations: write Markdown, get PowerPoint.
1. Create a Markdown file:
- -
- --
- -
2. Convert to PPTX:
# Auto-generates slides.pptx
# Or specify output
# With custom title
That's it! You now have a valid PowerPoint file that opens in PowerPoint, Google Slides, LibreOffice, and more.
Library
use ;
use fs;
Features
Core Capabilities
- Slides - Multiple layouts (title-only, two-column, blank, etc.)
- Text - Titles, bullets, formatting (bold, italic, colors, sizes)
- Tables - Multi-line cells, styling, positioning
- Shapes - 100+ shape types (flowcharts, arrows, geometric, decorative)
- Charts - Bar, line, pie charts with multiple series
- Images - Embed and position images
- Reading - Parse and modify existing PPTX files
Markdown Format
The Markdown format is simple and intuitive:
# Heading→ Creates a new slide with that title- Bullet→ Adds a bullet point (also supports*and+)- Empty lines are ignored
- Each
#heading starts a new slide
Example:
- -
- --
- -
Convert with: pptcli md2ppt presentation.md → presentation.pptx
Installation
Add to Cargo.toml:
[]
= "0.1"
Examples
Tables
use ;
let table = new
.add_simple_row
.add_simple_row
.build;
let slides = vec!;
Charts
use ;
let chart = new
.categories
.add_series
.build;
Shapes
use ;
let shape = new
.with_fill
.with_text;
What Makes This Different
Unlike other Rust PPTX crates that:
- ❌ Generate invalid files that won't open
- ❌ Have incomplete implementations
- ❌ Are abandoned or unmaintained
- ❌ Lack proper XML structure
ppt-rs:
- ✅ Generates valid PPTX files from day one
- ✅ Actively maintained with comprehensive test coverage
- ✅ Complete XML structure following ECMA-376 standard
- ✅ Production-ready - used in real projects
Technical Details
- Format: Microsoft PowerPoint 2007+ (.pptx)
- Standard: ECMA-376 Office Open XML
- Compatibility: PowerPoint, LibreOffice, Google Slides, Keynote
- Architecture: Layered design with clear separation of concerns
See ARCHITECTURE.md for detailed documentation.
License
Apache-2.0
Contributing
Contributions welcome! See TODO.md for current priorities.