Open cedoor opened 1 week ago
Are rustfmt and Clippy good enough?
Sure, these are tools that are in official rust-toolchain, they "define" a standard for formatting & linting
Does Rust provide commands to generate a test coverage report?
Rust itself no, but there's a separate binary crate called cargo-tarpaulin. I used it. It outputs test coverage + compatible with other tools (such as codecov)
Is there any tool to generate static documentation websites from the code?
Built-in cargo doc
. Or you can also use good static generators such as mdbook, etc.
Is there any other cool tool we should use?
Maybe cargo-deny
- it analyzes if there're same dependencies used many times between crates. Also cargo audit
- it checks if there're vulnerable dependencies in the project
Any other suggestions?
@cedoor
@curryrasul answer to each question is pretty solid - nothing to add here, the suggested readings for testing are lit.
I agree with previous answers.
I think cargo built in features got us covered for most of our needs: rustfmt
clippy
cargo doc
...
For conventional commits, I don't know it but we can give https://docs.cocogitto.io/ a try. I don't see it having a feature to interactively create conventional commits though. We can also stick to cz
(assuming devs will have it installed globally)
Additionally:
nextest
which is faster and has a nicer printer than cargo test
.dprint
just
need | tool |
---|---|
formatting | rustfmt (with dprint exec plugin) |
linting | cargo clippy |
docs | cargo doc |
tests runner | cargo nestest |
ci | github action |
tasks runner | just / make ? |
It looks great! I'm excited about it.
This may be helpful: https://blessed.rs/crates
Thank you all @sripwoud @0xjei @curryrasul @vplasencia!
I think @sripwoud's table is great.
PR: https://github.com/privacy-scaling-explorations/zk-kit.rust/pull/2. Let's continue this discussion there.
The repository has been initialized with a minimal structure:
The current tools used to test, format, and analyze code statically are Rust's default ones:
It's important to keep it minimal, but there should be some requirements we're trying to meet in all zk-kit repos:
main
branch is updated (CI workflow).git commit
command to assist developers in adhering to the conventional commits guidelines.In this issue, the goal is to determine the best tools to use for items 3, 4, 5, 6, and 7.
Q1: Are rustfmt and Clippy good enough? Q2: Does Rust provide commands to generate a test coverage report? Q3: Do you know any tool similar to https://cz-git.qbb.sh? (maybe Cocogitto ?) Q4: Is there any tool to generate static documentation websites from the code? Q5: Is there any other cool tool we should use? Q6: Any other suggestions?
@sripwoud @curryrasul @0xjei @vplasencia