ralexstokes / mev-rs

a gateway to a network of block builders
Other
420 stars 77 forks source link

Add version, commit, feature info to binary version output #260

Open ralexstokes opened 6 months ago

lean-apple commented 1 month ago

Hello @ralexstokes, I would like to work on this issue to get familiar with the repo.

Can you confirm me the expect result when launching the command cargo run --bin mev -- --version would be for example :

mev Version:  0.3.0
Commit:   0cd0d13
Features: boost, build, relay

or more information are expected ?

ralexstokes commented 1 month ago

@lean-apple would love a PR here :)

I'd aim to mirror how reth does this: https://github.com/paradigmxyz/reth/blob/2fba3c027b7396db868b162e16635197cd584822/crates/node/core/src/version.rs#L15

so there's a short version with just the repo version and commit

and a long version with more info

it looks like vergen is a popular crate for this

lean-apple commented 1 month ago

@lean-apple would love a PR here :)

I'd aim to mirror how reth does this: https://github.com/paradigmxyz/reth/blob/2fba3c027b7396db868b162e16635197cd584822/crates/node/core/src/version.rs#L15

so there's a short version with just the repo version and commit

and a long version with more info

it looks like vergen is a popular crate for this

I open a PR, could you assign-me the task ?