feat(mdbook): allow default configuration (#4207)

## Summary

- make the `book` attribute optional for the `mdbook` rule
- generate an empty `book.toml` so mdBook uses its documented default
configuration
- add a build test covering a book with only `src/SUMMARY.md` and
chapter sources

This addresses #4194. The issue discussion asked for a PR that
demonstrates mdBook can run without a user-provided `book.toml`; an
empty configuration parses to mdBook's defaults, including `src` as the
source directory. I kept the generated file in the package staging tree
so the existing input mapping and `mdbook_server` provider continue to
use the same config path. Let me know what you think.

## Validation

- `git diff --check` passed
- inspected mdBook 0.4.44 configuration defaults: an empty TOML file
loads `src` as the source directory
- Bazel execution was not available in this Windows environment, so the
new build target is left for the repository CI matrix

---------

Signed-off-by: ahmadalguydi <ahmadalgaidy@hotmail.com>
4 files changed
tree: 73bc3eb4b3ae613770de9a1e79ba8484ce110b00
  1. .bazelci/
  2. .bcr/
  3. .github/
  4. cargo/
  5. crate_universe/
  6. docs/
  7. examples/
  8. extensions/
  9. ffi/
  10. nix/
  11. rust/
  12. test/
  13. tools/
  14. util/
  15. .bazelignore
  16. .bazelrc
  17. .clang-format
  18. .clippy.toml
  19. .envrc
  20. .gitattributes
  21. .gitignore
  22. .pre-commit-config.yaml
  23. .prettierrc.toml
  24. .rustfmt.toml
  25. .typos.toml
  26. ARCHITECTURE.md
  27. AUTHORS
  28. BUILD.bazel
  29. CODEOWNERS
  30. COMPATIBILITY.md
  31. CONTRIBUTING.md
  32. CONTRIBUTORS
  33. LICENSE.txt
  34. MODULE.bazel
  35. README.md
  36. version.bzl
  37. WORKSPACE.bazel
README.md

Rust Rules

  • Postsubmit Build status

Overview

This repository provides rules for building Rust projects with Bazel.

Starter repo

The fastest way to try this in an empty project is to click the green “Use this template” button on https://github.com/bazel-starters/rust.

Community

General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust.

Documentation

Please refer to the full documentation.