코딩Coding/Rust★cargo★compiler

MUST know Rust Cargo❤️ plugins(cargo-modules)

내인생PLUS 2022. 5. 21. 22:37
728x90

https://rustrepo.com/repo/regexident-cargo-modules

 

A cargo plugin for showing a tree-like overview of a crate's modules. | RustRepo

cargo-modules Synopsis A cargo plugin for showing an overview of a crate's modules. Motivation With time, as your Rust projects grow bigger and bigger

rustrepo.com

 

https://github.com/rustsec/rustsec

 

GitHub - rustsec/rustsec: Audit Cargo.lock files for dependencies with security vulnerabilities

Audit Cargo.lock files for dependencies with security vulnerabilities - GitHub - rustsec/rustsec: Audit Cargo.lock files for dependencies with security vulnerabilities

github.com

 

 

https://rustsec.org/

 

About RustSec › RustSec Advisory Database

The RustSec Advisory Database is a repository of security advisories filed against Rust crates published via https://crates.io maintained by the Rust Secure Code Working Group. RustSec Tools cargo-audit - audit Cargo.lock files for crates with security vul

rustsec.org


MUST❤️ know Rust Cargo plugins

 

https://youtu.be/T7JBLghJtNU

 

 

Install 하는 방법

cargo install cargo-audit

 

cargo install cargo-modules

 

cargo install cargo-make

Windows만 되는듯 tarpulin

cargo install cargo-tarpaulin
cargo tarpaulin

 

 

cargo modules generate tree

crate testrust




cargo add rand@0.7
    Updating 'https://github.com/rust-lang/crates.io-index' index
      Adding rand v0.7 to dependencies




cargo upgrade rand
    Updating 'https://github.com/rust-lang/crates.io-index' index
testrust:
    Upgrading rand v0.7 -> v0.8.5

 

cargo watch -x run
[Running 'cargo run']
    Updating crates.io index
   Compiling ppv-lite86 v0.2.16
   Compiling getrandom v0.2.6
   Compiling rand_core v0.6.3
   Compiling rand_chacha v0.3.1
   Compiling rand v0.8.5
   Compiling testrust v0.1.0 (/Users/globalyoung/Documents/Project/Github/rust_project/testrust)
warning: unused variable: `my_number`
  --> src/main.rs:14:9
  ..
  ...
  ...

 

 

 

cargo watch -c -q -w ./src -x run
warning: unused variable: `my_number`
  --> src/main.rs:14:9
   |
14 |     let my_number = give_8();
   |         ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_number`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: `testrust` (bin "testrust") generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target/debug/testrust`
8

 

cargo test 보다 60프로 이상 빠르다고 함

cargo nextest run

 

반응형