I ran cargo install mdbook-reading-time, and while this utility just parses JSON, counts words and multiplies that number with an other one, it had to download and compile over 250 dependencies to do that. I imagine the situation is similar with most pre-processors and output generators, as most will probably want to use the parsing and serializing code that already comes with mdbook (if they are written in Rust).
When listing mdbook as a dependency in such projects, one can disable the default features, yet the big bulk of the tool will still be included.
This wastes human life time (waiting for the compilation), energy, storage space and network bandwidth.
Extract the structs and enums that are required for the JSON parsing and serializing of the data sent to and from pre-processors and output generators into a separate library.
Problem
I ran
cargo install mdbook-reading-time
, and while this utility just parses JSON, counts words and multiplies that number with an other one, it had to download and compile over 250 dependencies to do that. I imagine the situation is similar with most pre-processors and output generators, as most will probably want to use the parsing and serializing code that already comes with mdbook (if they are written in Rust).When listing mdbook as a dependency in such projects, one can disable the default features, yet the big bulk of the tool will still be included.
This wastes human life time (waiting for the compilation), energy, storage space and network bandwidth.
related: https://github.com/pawurb/mdbook-reading-time/issues/1
Proposed Solution
Extract the structs and enums that are required for the JSON parsing and serializing of the data sent to and from pre-processors and output generators into a separate library.
Notes
No response