rust-lang / rust-lang/mdBook

Expose `mdbook` as a Library

Open
#2,954 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-enhancement
Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

Problem

Howdy, I would like to include the mdbook binary in some tooling and due to https://github.com/rust-lang/cargo/issues/9096 not yet being stabilized, getting access to the mdbook binary is pretty tricky after the 0.5.0 release and requires additional infrastructure or extra complex scripting to make sure it's available.

Proposed Solution

Would it be acceptable by the maintainers to make src/main.rs into a library where the only public function is main?

Notes

This used to work prior to the 0.5.0 release but now the existing tooling would require a nightly toolchain.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading src/main.rs and the 0.5.0 release context described in the issue, then inspect how the mdBook binary is currently exposed. Determine the library entry point and verify that the existing binary remains usable; done means tooling can access mdBook through a library with only main public.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.