Skip to content

Extract cor estructs and enums into a library, for use by preprocessors and output generators #2492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hoijui opened this issue Nov 23, 2024 · 1 comment
Labels
C-enhancement Category: Enhancement or feature request

Comments

@hoijui
Copy link

hoijui commented Nov 23, 2024

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:
pawurb/mdbook-reading-time#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

@hoijui hoijui added the C-enhancement Category: Enhancement or feature request label Nov 23, 2024
@ehuss
Copy link
Contributor

ehuss commented Nov 23, 2024

Thanks for the report! I believe this is mostly a duplicate of #1234, so closing in favor of that. It is a relatively high priority item for me.

@ehuss ehuss closed this as not planned Won't fix, can't repro, duplicate, stale Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement or feature request
Projects
None yet
Development

No branches or pull requests

2 participants