Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fitzy1321/rust-api-examples
Testing out various Rust API Frameworks
https://github.com/fitzy1321/rust-api-examples
actix-web axum rocket rust rust-api rust-lang rust-roc
Last synced: 19 days ago
JSON representation
Testing out various Rust API Frameworks
- Host: GitHub
- URL: https://github.com/fitzy1321/rust-api-examples
- Owner: fitzy1321
- License: unlicense
- Created: 2024-06-05T05:27:58.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-01T19:45:14.000Z (4 months ago)
- Last Synced: 2024-10-16T23:53:26.106Z (about 1 month ago)
- Topics: actix-web, axum, rocket, rust, rust-api, rust-lang, rust-roc
- Language: Rust
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust API Examples
Testing out various Rust API Frameworks
- actix-web
- axum
- rocketrequirements for apis
- json request/response schemas
- orm / sql / NoSql / DB ?
- OpenAPI Spec Generator + OpenAPI UI
- logging (preferrably struct logs)## Todo
- concurrency / async implementations ? (tokio vs other setups?)
- llvm-cov for coverage
- docker ?
- aws linux base image?
- alpine image?
- what is the smallest docker base image?## Run Locally
Need cargo and/or docker
```sh
## Build images
docker build -t actix-web:latest actix-web-api/.
docker build -t axum:latest axum-api/.
docker build -t rocket:latest rocket-api/.
``````sh
## Run images with ports exposed
docker run -it --rm -p 8000:8000 rocket:latest
```## Benchmarking
```sh
# Need wrk package
brew install wrk# Run against apis
wrk -t4 -d30s --latecy http://127.0.0.1:8080
```## New Idea
Build standard todo app crud api.
Standardize endpoints and I/O contracts for APIs.
Make Docker images for all APIs.
Deploy to k3p4 Raspberry Pi Cluster (k3s host).
Use Ansible to automate setup and deployments.
???
PROFIT! 🤣