Closed dalance closed 6 months ago
Hi @dalance,
Thanks for the descriptive issue!
- Export
Preprocessor
struct forgettext
The bootstrap process of rust-lang/rust uses the originalrustbook
binary to build docs. It usesmdbook
crate as a library and the normal mdbook plugin system is not used. So exportingPreprocessor
struct which can be integrated torustbook
at compile time is required.
So far, we have not paid much attention to the library interface of mdbook-i18n-helpers, but I'm not against making it usable as a library. @kdarkhan has been making similar changes to enable us to do fuzz testing against the binaries.
The latest Rust by Example has a Japanese translation resource based on mdbook-i18n-helpers. But it is not built because rust-lang/rust has the original mdbook build process which doesn't contain mdbook-i18n-helpers.
In my investigation, I found that the following changes are required to build it.
Export
Preprocessor
struct forgettext
The bootstrap process of rust-lang/rust uses the originalrustbook
binary to build docs. It usesmdbook
crate as a library and the normal mdbook plugin system is not used. So exportingPreprocessor
struct which can be integrated torustbook
at compile time is required.Fix "hidden lifetime parameters in types are deprecated" In the
rustbook
build, the following error is occured, it should be fixed.regex
to1.9.4
regex 1.9.5
requiresmemchr 2.6.0
, but it is blocked by https://github.com/rust-lang/rust/issues/109797.I opened https://github.com/rust-lang/rust/pull/124731. It refers my forked mdbook-i18n-helpers https://github.com/dalance/mdbook-i18n-helpers/tree/export_preprocessor now.
How about the above changes?