Code Monkey home page Code Monkey logo

rust_example_app's Introduction

Rust example application

This application serves as introduction into Rust programming language. It shows good and bad approaches. Aplication is stores data into Postgres + converts data to numpy format and stores them into files. Application can be handled via gRPC api. Application also support monitoring of random data into Prometheus and Jaeger.

Prerequisites

Postgres

  • docker run --name rust-example-app-db -p 5431:5432 --restart=unless-stopped -e POSTGRES_HOST_AUTH_METHOD=trust -d postgres:15.0

Jaeger

  • docker run -d -p 6831:6831/udp -p 6832:6832/udp -p 16686:16686 jaegertracing/all-in-one:latest

Prometheus

  • download Prometheus from [https://prometheus.io/download/]
  • copy prometheus.yml into dir where prometheus app is downloaded
  • run Prometheus app ./prometheus
  • localhost:9090
  • search e.g. for response_time_bucket

Run app

  • cargo run --release

Cargo interesting tools

  • cargo clippy - check for common mistakes and opportunities for improvement
  • cargo fmt - format your code automatically
  • cargo tree - display your dependency tree so you can see where you can try to reduce compile times
  • cargo flamegraph - profile your code and show the result as a flamegraph in a browser
  • mold (Linux only) - a much faster alternative to the default ld linker

rust_example_app's People

Contributors

kafkapre avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.