Stability
Learn how lla's plugin system maintains ABI stability through Protocol Buffers and FFI layers. Understand how plugins can remain compatible across different lla versions and Rust compiler versions through careful API design and message-based communication patterns.
Building for Longevity: ABI Stability
At the heart of lla's plugin ecosystem lies a thoughtfully designed ABI (Application Binary Interface) stability system. This foundation ensures your plugins remain reliable across lla versions and Rust compiler updates, providing a stable platform for extending lla's capabilities.
Core Architecture
Message-Based Foundation
We've chosen Protocol Buffers as our communication backbone, creating a robust bridge between lla and its plugins:
This approach delivers three key benefits:
- Freedom from Rust ABI constraints
- Language-neutral communication
- Version resilience
Cross-Language Communication
Our FFI layer speaks a universal language through C-compatible types:
Version Intelligence
Every plugin carries its identity:
The system actively verifies version compatibility during loading, preventing unexpected behavior.
Data Interchange
Rich Metadata Exchange
File information flows through a carefully structured Protocol Buffer format:
Extensible Design
Plugins can enrich entries with their own insights:
Implementation Intelligence
Smart Plugin Loading
Our system leverages libloading
for dynamic plugin management:
- Isolated plugin environments
- Message-based communication
- Safe memory boundaries
Type Safety Guarantees
We ensure reliability through:
- Rigorous Protocol Buffer schemas
- FFI-compatible type systems
- Clear conversion pathways
Creating Plugins
Building a plugin? Here's your path to success:
-
Start with our FFI macros:
-
Implement core functionality:
-
Handle data transformations:
You can use our plugin utils which abstracts away the verbosity of the plugin interface implementation. View the other plugins for more examples.