Skip to content

Polyglot FFI Roadmap

Vision: The universal FFI bindings generator for polyglot projects


Overview

Polyglot FFI aims to eliminate FFI boilerplate by automatically generating type-safe, memory-safe bindings between programming languages. Our goal is to support multiple source and target languages with excellent developer experience.

Current Version: v0.5.1


Completed Milestones

v0.1 - Foundation

Internal Validation (Battle-Tested Locally): October 2025

Core Features:

  • OCaml .mli parser for primitive types
  • Python wrapper generation
  • OCaml ctypes bindings generation
  • C stub generation with memory safety
  • CLI with init and generate commands
  • Basic error handling
  • 44% test coverage baseline

Deliverable: Working OCaml→Python bindings for simple functions


v0.2 - Type System

Internal Validation (Battle-Tested Locally): October 2025

Complex Types:

  • Option types ('a option)
  • List types ('a list)
  • Tuple types ('a * 'b)
  • Record types (parsed, partial generation)
  • Variant types (parsed, partial generation)

Type System:

  • Type registry architecture
  • Extensible type mappings
  • Custom type converters
  • Multi-language support (OCaml, Python, C, Rust types)

Testing:

  • 86 tests (+42 from v0.1)
  • 65% coverage (+21%)
  • Complex type scenarios

Deliverable: Can handle 90% of OCaml types


v0.3 - Developer Experience

Internal Validation (Battle-Tested Locally): October 2025

New Commands:

  • watch - Auto-regenerate on file changes
  • check - Validate project configuration and dependencies
  • clean - Remove generated files safely

Configuration:

  • polyglot.toml configuration file support
  • Auto-discovery of .mli files
  • Per-language configuration
  • Custom type mappings in config

Developer Experience:

  • Rich CLI output with colors
  • Progress indicators for long operations
  • Detailed error messages with suggestions
  • Dry-run mode for preview
  • Force regeneration option

Deliverable: Improved DX


v0.4 - Production Release (Q4 2025)

Released: October 2025

Testing & Quality:

  • 285 tests (+199 from v0.3)
  • 88% coverage (+23%)
  • Integration tests for all CLI commands
  • End-to-end workflow tests

Documentation:

  • Complete MkDocs documentation site
  • API reference with mkdocstrings
  • 3 working examples (beginner to intermediate)
  • Architecture documentation
  • Contributing guidelines
  • 7 man pages for all commands

Polish:

  • Shell completion (Bash, Zsh, Fish)
  • Performance optimization (~15,000 gen/sec)
  • Better identifier sanitization
  • Config template fixes

CI/CD & Publishing:

  • GitHub Actions workflows (test, docs, release)
  • Automated releases on tag
  • Documentation deployment to GitHub Pages
  • PyPI package builds successfully
  • Security scanning (bandit, safety)

Open Source:

  • Code of Conduct (Contributor Covenant v3.0)
  • Security policy
  • Issue templates (4 types)
  • Pull request template
  • CODEOWNERS file

Deliverable: Ready for public release on PyPI


Current Focus: v0.4.0 Release

Immediate Tasks

Goal: First PyPI release

  • [x] Final testing and verification
  • [x] Documentation review and polish
  • [x] Package building and validation
  • [x] Create v0.4.0 release tag
  • [x] Publish to PyPI
  • [x] Deploy documentation
  • [x] Announce release

Success Metrics:

  • Package available on PyPI
  • Documentation live at polyglotffi.com
  • Can install with pip install polyglot-ffi

Planned Milestones

v0.5.0 - Record & Variant Support (Q4 2025)

Target: October-December 2025

Advanced Type Generation:

  • [ ] Complete record type generation
  • [ ] OCaml record type definitions
  • [ ] Python dataclass generation
  • [ ] C struct generation
  • [ ] Memory management for nested records
  • [ ] Complete variant type generation
  • [ ] OCaml variant types
  • [ ] Python enum/union types
  • [ ] C tagged unions
  • [ ] Pattern matching helpers

Type System Enhancements:

  • [ ] Polymorphic types ('a)
  • [ ] Constrained types
  • [ ] Recursive types
  • [ ] Type aliases

Testing:

  • [ ] Record type test suite
  • [ ] Variant type test suite
  • [ ] Complex nested type tests
  • [ ] Memory safety validation

Deliverable: Full support for OCaml's rich type system


v0.6.0 - Rust Target Support (Q4 2025)

Target: TBD (Late 2025)

Rust Generator:

  • [ ] Rust FFI bindings generation
  • [ ] extern "C" declarations
  • [ ] Rust type mappings
  • [ ] unsafe blocks with safety guarantees
  • [ ] Cargo.toml generation

Bidirectional Support:

  • [ ] OCaml → Rust bindings
  • [ ] Rust → Python bindings
  • [ ] Type conversions

Build Integration:

  • [ ] Cargo build system support
  • [ ] Cross-compilation support
  • [ ] Dependency management

Documentation:

  • [ ] Rust examples
  • [ ] Type mapping guide for Rust
  • [ ] Build system integration guide

Deliverable: Full support for Rust bindings


v1.0.0 - Stable Release (Q1 2026)

Target: January-March 2026

Stability:

  • [ ] API stability guarantees
  • [ ] Comprehensive upgrade guides
  • [ ] Long-term support (LTS) commitment
  • [ ] Performance benchmarks published

Multi-Language Matrix:

  • [ ] OCaml ↔ Python (complete)
  • [ ] OCaml ↔ Rust (complete)
  • [ ] Python → OCaml (reverse direction)
  • [ ] Rust → OCaml (reverse direction)

Enterprise Features:

  • [ ] Large project support (multi-module)
  • [ ] Incremental generation
  • [ ] Build cache
  • [ ] Parallel generation

Testing & Quality:

  • [ ] 95%+ code coverage
  • [ ] 500+ tests
  • [ ] Cross-platform CI (Linux, macOS, Windows)
  • [ ] Performance regression tests

Documentation:

  • [ ] Video tutorials
  • [ ] Interactive examples
  • [ ] Migration guides
  • [ ] Best practices guide

Deliverable: Stable, production-ready v1.0


v1.5.0 - Go Support (Q2 2026)

Target: April-June 2026

Go Generator:

  • [ ] Go FFI bindings generation
  • [ ] cgo integration
  • [ ] Go type mappings
  • [ ] Go module generation

Language Support:

  • [ ] OCaml → Go
  • [ ] Python → Go
  • [ ] Rust → Go
  • [ ] Go → all (reverse)

Build Integration:

  • [ ] Go modules support
  • [ ] go.mod generation
  • [ ] Cross-platform builds

Deliverable: Full Go language support


v2.0.0 - Advanced Features (2026)

Target: Q1-Q2 2026

Plugin System:

  • [ ] Plugin architecture
  • [ ] Community plugin support
  • [ ] Custom generator plugins
  • [ ] Custom parser plugins
  • [ ] Plugin marketplace/registry

Developer Tools:

  • [ ] Interactive REPL mode
  • [ ] Language Server Protocol (LSP)
  • [ ] VS Code extension
  • [ ] JetBrains plugin
  • [ ] Syntax highlighting

Advanced Types:

  • [ ] GADTs (Generalized Algebraic Data Types)
  • [ ] Module functors
  • [ ] First-class modules
  • [ ] Polymorphic variants
  • [ ] Object types

Performance:

  • [ ] Parallel generation
  • [ ] Incremental compilation
  • [ ] Smart caching
  • [ ] Memory optimization

Deliverable: Advanced tooling and type support


Future Exploration (Post v2.0)

Additional Language Targets

Priority: Community-Driven

  • [ ] Java/Kotlin via JNI
  • [ ] Java class generation
  • [ ] Kotlin extension functions
  • [ ] Gradle integration

  • [ ] C++ with modern features

  • [ ] C++17/20 support
  • [ ] Smart pointers
  • [ ] Template support
  • [ ] CMake integration

  • [ ] JavaScript/TypeScript via WASM

  • [ ] WebAssembly target
  • [ ] TypeScript definitions
  • [ ] npm package generation
  • [ ] Node.js native modules

  • [ ] C#/.NET via P/Invoke

  • [ ] C# class generation
  • [ ] .NET Core support
  • [ ] NuGet packages

  • [ ] Swift for iOS/macOS

  • [ ] Swift bindings
  • [ ] Objective-C bridge
  • [ ] SwiftPM integration

Advanced Features

Priority: Based on User Demand

  • [ ] Async/Await Support
  • [ ] Async FFI boundaries
  • [ ] Future/Promise conversion
  • [ ] Event loop integration

  • [ ] Memory Pooling

  • [ ] Custom allocators
  • [ ] Pool-based memory management
  • [ ] Zero-copy optimizations

  • [ ] Serialization

  • [ ] Auto-generate serialization code
  • [ ] JSON/Protobuf/MessagePack
  • [ ] Zero-copy serialization

  • [ ] Distributed Systems

  • [ ] RPC code generation
  • [ ] gRPC support
  • [ ] Network protocol bindings

Ecosystem Integration

Priority: Community Partnerships

  • [ ] Package Manager Integration
  • [ ] Homebrew formula
  • [ ] apt/yum packages
  • [ ] Windows installer
  • [ ] Nix package

  • [ ] Cloud Services

  • [ ] AWS Lambda bindings
  • [ ] Google Cloud Functions
  • [ ] Azure Functions

  • [ ] Build System Plugins

  • [ ] CMake plugin
  • [ ] Bazel rules
  • [ ] Meson integration
  • [ ] Make integration

Technology Roadmap

Short-term (2025)

  • [x] Python 3.8-3.12 support
  • [x] OCaml 4.14+ support
  • [ ] Python 3.13 support
  • [ ] OCaml 5.x support
  • [ ] Rust 1.70+ support

Medium-term (2026)

  • [ ] WASM compilation target
  • [ ] Cloud-native deployment
  • [ ] Container optimization
  • [ ] Performance: 100,000+ gen/sec

Long-term (2027+)

  • [ ] Machine learning optimization
  • [ ] Intelligent type inference
  • [ ] Auto-migration tools
  • [ ] Self-hosting (polyglot-ffi generates its own bindings)

Community Roadmap

Open Source Growth

  • [ ] 100+ GitHub stars
  • [ ] 10+ contributors
  • [ ] Community Slack/Discord
  • [ ] Monthly releases
  • [ ] Quarterly community calls

Documentation & Education

  • [ ] Video tutorial series
  • [ ] Interactive playground
  • [ ] University course materials
  • [ ] Conference talks
  • [ ] Blog post series

Adoption Goals

  • [ ] 50+ production users
  • [ ] 5+ case studies
  • [ ] Industry partnerships
  • [ ] Academic research citations

Success Metrics

Technical Metrics

Metric v0.5.0 (Current) v1.0 Goal v2.0 Goal
Test Coverage 88% 95% 98%
Tests 285 500+ 1000+
Languages 3* 4 6+
Gen Speed 15k/sec 50k/sec 100k/sec
Supported Types 90% 98% 100%

*OCaml, Python, C (Rust types mapped but not generated yet)

Community Metrics

Metric v0.5.0 v1.0 Goal v2.0 Goal
GitHub Stars TBD 100+ 500+
Contributors 1 10+ 25+
Production Users 0 50+ 200+
Weekly Downloads 0 1000+ 5000+

How to Contribute

We welcome contributions to any part of the roadmap! Here's how you can help:

Current Priorities

  1. Testing: Add test cases for edge cases
  2. Documentation: Improve examples and guides
  3. Bug Reports: Help us find and fix issues
  4. Feature Requests: Tell us what you need

Future Features

  • Rust Support: Help implement Rust generator (v0.6.0)
  • Record Types: Complete record type generation (v0.5.0)
  • New Languages: Propose and implement new language targets

Get Involved

  • Issues: https://github.com/chizy7/polyglot-ffi/issues
  • Discussions: https://github.com/chizy7/polyglot-ffi/discussions
  • Contributing: See CONTRIBUTING.md
  • Code of Conduct: CODE_OF_CONDUCT.md

Release Schedule (Projected)

Regular Releases

  • Minor releases (0.x.0): Every 6-8 weeks
  • Patch releases (0.x.y): As needed for bugs
  • Major releases (x.0.0): Every 12-18 months

LTS Support

  • v1.0: 2 years of support
  • v2.0: 3 years of support
  • Security patches: Indefinite for v1.0+

Versioning Policy

We follow Semantic Versioning:

  • Major (x.0.0): Breaking changes
  • Minor (0.x.0): New features, backwards compatible
  • Patch (0.0.x): Bug fixes, backwards compatible

Breaking Changes

  • Announced 3 months in advance
  • Migration guides provided
  • Deprecation warnings in previous release
  • Community feedback period

References & Inspiration

  • PyO3: Rust ↔ Python bindings architecture
  • SWIG: Multi-language wrapper generator
  • ctypes: OCaml FFI foundation
  • bindgen: Rust binding generator
  • JNI: Java native interface patterns

Questions & Feedback

Have ideas for the roadmap? Want to influence priorities?

  • Feature Requests: https://github.com/chizy7/polyglot-ffi/issues/new?template=feature_request.yml
  • Discussions: https://github.com/chizy7/polyglot-ffi/discussions
  • Email: See GitHub profile

Last Updated: October 25, 2025 Next Review: December 2025


Current Focus: Fix bugs in v0.5.0 and publish to PyPI and grow the community!