Skip to content

bruno-medeiros/RustDemoService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

143 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Demo

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 build to generate the types
  • snippets - various code snippets to illustrate Rust features and idioms

Notes

Building

  • TypeScript client (from OpenAPI spec): just generate-ts-client
  • OpenAPI spec (from Rust server code): just generate-openapi
  • Smithy types (Gradle): just generate-smithy

Code quality

  • Formatting: cargo +nightly fmt -- --config-path=.rustfmt.toml
  • Linting: cargo clippy --all-targets -- --deny warnings
  • Frontend lint: cd frontend && npm run lint

Starting the app

  1. Start dependencies (Postgres, Kafka):

    docker compose -f docker-compose.yml up -d
  2. Run the catalog service (listens on http://localhost:3030):

    cd catalog-svc/catalog-svc; cargo run -p catalog-svc --bin catalog-svc
  3. Install dependencies and start the dev server:

    cd frontend && npm install && npm run dev

    The dev server starts at http://localhost:5173 by default. It expects the backend to be running on port 3030.

TODO:

About

Learning project for Rust ecosystem and Kubernetes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors