Rusty API
Rusty API is a secure and lightweight Rust library for building backend APIs. It features HTTPS, password-protected routes, rate limiting, and more, making it ideal for rapid API development.
Features
- Password-Protected Routes: Easily secure specific routes with passwords.
- HTTPS Support: Built-in support for secure communication using Rustls.
- Rate Limiting: Prevent abuse with configurable rate limits.
- CORS Configuration: Flexible CORS settings for cross-origin requests.
- Actix Web Integration: Built on top of Actix Web for high performance.
Installation
Add rusty-api to your Cargo.toml:
[]
= "0.1.8"
Usage
Setting Up Your API
Here's an example of how to use rusty-api to create an API with public and password-protected routes:
use rusty_api;
async
async
Generating Self-Signed Certificates
To enable HTTPS, generate self-signed certificates:
Running the API
Run your API with:
Projects Using This Package
Here are some projects that use rusty-api for their API's. Want to add your project? See Contributing below!
| Project | Description | Links |
|---|---|---|
| ServerWatch | A lightweight system monitoring tool that collects metrics and exposes them via a secure HTTPS endpoint. Built for Raspberry Pi and other Linux systems. | GitHub | Website |
| Your Project Here | Have a project using this package? Submit a PR to add it! | See Contributing below! |
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
License
This project is licensed under the MIT License.