Learning project for Rust ecosystem and various related technologies:
-
catalog-svc- standard Rust webapp using Axum and Utoipa to generate a openapi spec + client generation -
catalog-svc-smithy- a variation of the above using Smithy for API generation and server.- use
./gradlew buildto generate the types
- use
-
snippets- various code snippets to illustrate Rust features and idioms
- For cross-crate test-only helpers, prefer a
test-utilscargo feature (instead of#[cfg(test)]) so shared test code can be compiled and reused where needed. See: https://stackoverflow.com/questions/41700543/can-we-share-test-utilities-between-crates
- TypeScript client (from OpenAPI spec):
just generate-ts-client - OpenAPI spec (from Rust server code):
just generate-openapi - Smithy types (Gradle):
just generate-smithy
- Formatting:
cargo +nightly fmt -- --config-path=.rustfmt.toml - Linting:
cargo clippy --all-targets -- --deny warnings - Frontend lint:
cd frontend && npm run lint
-
Start dependencies (Postgres, Kafka):
docker compose -f docker-compose.yml up -d
-
Run the catalog service (listens on
http://localhost:3030):cd catalog-svc/catalog-svc; cargo run -p catalog-svc --bin catalog-svc
-
Install dependencies and start the dev server:
cd frontend && npm install && npm run dev
The dev server starts at
http://localhost:5173by default. It expects the backend to be running on port 3030.
- Job scheduler, Cron scheduler
- Kafka?
- How to bundle frontend code?