From 8cedb937151d4e6d7fddc4b59d8843dab5f0fd87 Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Mon, 16 Dec 2024 08:30:48 -0800 Subject: [PATCH] Updated rules_rust_mdbook docs (#3108) A miss from https://github.com/bazelbuild/rules_rust/pull/3105 --- docs/src/rust_mdbook.md | 13 ++++++------- extensions/mdbook/defs.bzl | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/docs/src/rust_mdbook.md b/docs/src/rust_mdbook.md index 60c45b978f..86efd45bb5 100644 --- a/docs/src/rust_mdbook.md +++ b/docs/src/rust_mdbook.md @@ -12,16 +12,15 @@ Bazel rules for [mdBook](https://github.com/rust-lang/mdBook). ## Setup +### bzlmod + ```python -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +bazel_dep(name = "rules_rust_mdbook", version = "{SEE_RELEASE_NOTES}") +``` -# See releases for urls and checksums -http_archive( - name = "rules_mdbook", - integrity = "{integrity}", - urls = ["https://github.com/abrisco/rules_mdbook/releases/download/{version}/rules_mdbook-{version}.tar.gz"], -) +### WORKSPACE +```python load("@rules_rust_mdbook//:repositories.bzl", "mdbook_register_toolchains", "rules_mdbook_dependencies") rules_mdbook_dependencies() diff --git a/extensions/mdbook/defs.bzl b/extensions/mdbook/defs.bzl index 1f693583fc..8eb2318361 100644 --- a/extensions/mdbook/defs.bzl +++ b/extensions/mdbook/defs.bzl @@ -10,16 +10,15 @@ Bazel rules for [mdBook](https://github.com/rust-lang/mdBook). ## Setup +### bzlmod + ```python -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +bazel_dep(name = "rules_rust_mdbook", version = "{SEE_RELEASE_NOTES}") +``` -# See releases for urls and checksums -http_archive( - name = "rules_mdbook", - integrity = "{integrity}", - urls = ["https://github.com/abrisco/rules_mdbook/releases/download/{version}/rules_mdbook-{version}.tar.gz"], -) +### WORKSPACE +```python load("@rules_rust_mdbook//:repositories.bzl", "mdbook_register_toolchains", "rules_mdbook_dependencies") rules_mdbook_dependencies()