You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Howdy, I would like to include the mdbook binary in some tooling and due to rust-lang/cargo#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.
Can you say more about what your usecase is? Almost everything should be available via mdbook-driver. That is the library that is intended for high-level usage.
Activity
ehuss commentedon Nov 20, 2025
Can you say more about what your usecase is? Almost everything should be available via mdbook-driver. That is the library that is intended for high-level usage.
UebelAndre commentedon Nov 20, 2025
I maintain https://bazelbuild.github.io/rules_rust/rust_mdbook.html which are Bazel rules that wrap
mdbook. Currentlymdbookis built from source by default using additional infra in the same repository. Because there is no library in the currentmdbookcrate, I get hit by rust-lang/cargo#9096 and now need to re-implement the entry-point on my own. I had a similar issue withwasm-bindgenwasm-bindgen/wasm-bindgen#4653UebelAndre commentedon Nov 22, 2025
I'd also be happy to do the work to make this happen. I'd just need a maintainer to give the go-ahead. I understand, however, it's an odd scenario.
UebelAndre commentedon Mar 25, 2026
@ehuss friendly ping on this. Happy to do any work/investigations 😄