shields
A high-performance badge rendering engine written in Rust, supporting SVG output and font parsing. This project is designed for developers and services that require fast, customizable, and reliable badge generation, similar to shields.io, but with a focus on performance and extensibility.
Features
- ⚡ High Performance: Built with Rust for maximum speed and efficiency.
- 🖼️ SVG Output: Generates crisp, standards-compliant SVG badges.
- 🔤 Font Parsing: Supports custom font rendering using TTF parsing.
- 🧠 LRU Caching: Efficient in-memory caching for repeated badge requests.
- 🛠️ Extensible API: Easy to integrate and extend for various use cases.
- 🧪 Comprehensive Testing: Includes tests for rendering accuracy and performance.
Installation
Prerequisites
- Rust (edition 2024 or later)
- Cargo package manager (comes with Rust)
Build
Clone the repository and build the project:
Run
To run the badge rendering engine:
Usage Example
Here is a basic example of how to use the shields library in your Rust project:
use BadgeRenderer;
This will generate a badge.svg file with a "build: passing" badge.
Contributing
Contributions are welcome! To get started:
- Fork the repository on GitHub.
- Create a new branch for your feature or bugfix.
- Commit your changes with clear messages.
- Open a pull request describing your changes.
- For issues, please use the GitHub Issues page.
Before submitting a PR, ensure all tests pass:
License
This project is licensed under the MIT License. See the LICENSE file for details.
Community & Contact
- GitHub: https://github.com/Jannchie/shields
- Documentation: https://docs.rs/shields
- Author: Jannchie (jannchie@gmail.com)