Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fitzypop/rust-api-examples
Testing out various Rust API Frameworks
https://github.com/fitzypop/rust-api-examples
actix-web axum rocket rust rust-api rust-lang rust-roc
Last synced: 3 months ago
JSON representation
Testing out various Rust API Frameworks
- Host: GitHub
- URL: https://github.com/fitzypop/rust-api-examples
- Owner: fitzypop
- License: unlicense
- Created: 2024-06-05T05:27:58.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-01T19:45:14.000Z (5 months ago)
- Last Synced: 2024-09-22T11:32:35.616Z (3 months 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! 🤣