1
0
Fork 0
A Rust application template with Tokio (async runtime), Figment (config parser), Tracing (advanced logging), and Eyre (error handling)
Find a file Use this template
2023-07-14 00:31:47 +02:00
src First release 2023-07-14 00:00:21 +02:00
.gitignore First release 2023-07-14 00:00:21 +02:00
Cargo.lock First release 2023-07-14 00:00:21 +02:00
Cargo.toml First release 2023-07-14 00:00:21 +02:00
config.example.toml First release 2023-07-14 00:00:21 +02:00
LICENSE Maybe screaming isn't so bad 2023-07-14 00:07:25 +02:00
README.md Add instructions 2023-07-14 00:31:47 +02:00
rust-toolchain.toml First release 2023-07-14 00:00:21 +02:00
rustfmt.toml First release 2023-07-14 00:00:21 +02:00

rust-tokio-service-template

How to use

  1. Clone the repository

    git clone --depth 1 https://src.honbra.com/honbra/rust-tokio-service-template.git my-app
    
  2. Go into the local copy

    cd my-app
    
  3. Delete the .git folder (you don't need the commit history for a template)

    rm -rf .git
    
  4. Initialize a new Git repository (optional)

    git init
    
  5. Change the app name in Cargo.toml and src/main.rs

    Cargo.toml
    - name = "rust-tokio-service-template"
    + name = "my-app"
    
    src/main.rs
    - set_up_tracing("rust_tokio_service_template").context("Failed to set up tracing")?;
    + set_up_tracing("my_app").context("Failed to set up tracing")?;
    
  6. Do your thing, write some code, commit cybercrime

    # I can't show you how to commit cybercrime, sorry
    
  7. Run your app

    cargo run
    

License

This template is licensed under the Unlicense. More information can be found in the LICNSE file.