nikhilr612 / freya

A register-based process virtual machine in Rust
MIT License
0 stars 0 forks source link

Remove unnecessary dependencies #5

Open nikhilr612 opened 2 months ago

nikhilr612 commented 2 months ago

The crate pretty_env_logger was added ad-hoc for momentary logging needs. A custom, non-fancy logger can be used since in most cases detailed logging within the crate is not required as much as clear, structured reporting to the user. Colors and formatting can be achieved by leveraging colored, or termcolor crates. Moreover, certain tertiary dependencies like atty have introduced security alerts. The dependencies need to be culled after careful consideration.

nikhilr612 commented 2 months ago

Current dependency tree

freya v0.2.7
├── clap v4.5.4
│   ├── clap_builder v4.5.2
│   │   ├── anstream v0.6.14
│   │   │   ├── anstyle v1.0.7
│   │   │   ├── anstyle-parse v0.2.4
│   │   │   │   └── utf8parse v0.2.1
│   │   │   ├── anstyle-query v1.0.3
│   │   │   │   └── windows-sys v0.52.0
│   │   │   │       └── windows-targets v0.52.5
│   │   │   │           └── windows_x86_64_msvc v0.52.5
│   │   │   ├── anstyle-wincon v3.0.3
│   │   │   │   ├── anstyle v1.0.7
│   │   │   │   └── windows-sys v0.52.0 (*)
│   │   │   ├── colorchoice v1.0.1
│   │   │   ├── is_terminal_polyfill v1.70.0
│   │   │   └── utf8parse v0.2.1
│   │   ├── anstyle v1.0.7
│   │   ├── clap_lex v0.7.0
│   │   └── strsim v0.11.1
│   └── clap_derive v4.5.4 (proc-macro)
│       ├── heck v0.5.0
│       ├── proc-macro2 v1.0.84
│       │   └── unicode-ident v1.0.6
│       ├── quote v1.0.36
│       │   └── proc-macro2 v1.0.84 (*)
│       └── syn v2.0.66
│           ├── proc-macro2 v1.0.84 (*)
│           ├── quote v1.0.36 (*)
│           └── unicode-ident v1.0.6
├── glob v0.3.1
├── libloading v0.8.3
│   └── windows-targets v0.52.5 (*)
├── log v0.4.22
├── memmap2 v0.9.4
├── paste v1.0.15 (proc-macro)
├── pretty_env_logger v0.4.0
│   ├── env_logger v0.7.1
│   │   ├── atty v0.2.14
│   │   │   └── winapi v0.3.9
│   │   ├── humantime v1.3.0
│   │   │   └── quick-error v1.2.3
│   │   ├── log v0.4.22
│   │   ├── regex v1.10.5
│   │   │   ├── aho-corasick v1.1.3
│   │   │   │   └── memchr v2.7.4
│   │   │   ├── memchr v2.7.4
│   │   │   ├── regex-automata v0.4.7
│   │   │   │   ├── aho-corasick v1.1.3 (*)
│   │   │   │   ├── memchr v2.7.4
│   │   │   │   └── regex-syntax v0.8.4
│   │   │   └── regex-syntax v0.8.4
│   │   └── termcolor v1.4.1
│   │       └── winapi-util v0.1.8
│   │           └── windows-sys v0.52.0 (*)
│   └── log v0.4.22
└── threadpool v1.8.1
    └── num_cpus v1.16.0

clap and env_logger are bringing in the most dependencies down the line. regex is also an unnecessary secondary dependency

nikhilr612 commented 1 month ago

On the matter of coloured text output, anstream, and yansi seem like good candidates.