Skip to content

aurelien-clu/template-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

template-rust

Rust log pretty_env_logger tracing thiserror

A small rust template with workspace & logging setup.

cargo workspace

./Cargo.toml values are reused across crates/.

More about workspace configuration here.

crates

Github Workflow

TODO

  • cargo-nextest
  • clippy
  • cargo-outdated
  • cargo-audit
  • ignores modifications other than crates/ & Cargo.toml & Cargo.lock

Run

make all

# or

cargo fmt
cargo test
cargo build --release --bin server
cargo build --release --bin client
./target/release/server
RUST_LOG=TRACE ./target/release/client

# or run with:
cargo run --bin server
RUST_LOG=TRACE cargo run --bin client

terminal

We get:

  • logs from log
    • domain: guessing: x...

  • logs & instrumentation from tracing
    • function{x=4}

  • concise logging for the client
    • TRACE client > trace

Additional non exhaustive libraries

https://github.com/rust-unofficial/awesome-rust

Command line

Database

Misc

Serialization and deserialization

Web

https://www.arewewebyet.org/

Client

Front

Server