Skip to content

Commit 49a718d

Browse files
authored
Fix links in documentation targeting github (#3414)
Relative paths don't work in the deployed documentation since they end up in URLs such as https://bazelbuild.github.io/examples/bzlmod/all_crate_deps Not sure if there is a better way, but for now this at least fixes the links.
1 parent f21e479 commit 49a718d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crate_universe/extensions.bzl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This doc describes using crate_universe with bzlmod.
66
77
If you're using a WORKSPACE file, please see [the WORKSPACE equivalent of this doc](crate_universe.html).
88
9-
There are some examples of using crate_universe with bzlmod in the [example folder](../examples/bzlmod).
9+
There are some examples of using crate_universe with bzlmod in the [example folder](https://github.com/bazelbuild/rules_rust/examples/bzlmod).
1010
1111
# Table of Contents
1212
@@ -32,7 +32,7 @@ bazel_dep(name = "rules_rust", version = "0.60.0")
3232
You find the latest version on the [release page](https://github.com/bazelbuild/rules_rust/releases).
3333
3434
35-
After adding `rules_rust` in your MODULE.bazel, set the following to begin using `crate_universe`:
35+
After adding `rules_rust` in your `MODULE.bazel, set the following to begin using `crate_universe`:
3636
3737
```python
3838
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
@@ -53,7 +53,7 @@ There are three different ways to declare dependencies in your MODULE.
5353
5454
One of the simpler ways to wire up dependencies would be to first structure your project into a Cargo workspace.
5555
The crates_repository rule can ingest a root Cargo.toml file and generate Bazel dependencies from there.
56-
You find a complete example in the in the [example folder](../examples/bzlmod/all_crate_deps).
56+
You find a complete example in the in the [example folder](https://github.com/bazelbuild/rules_rust/examples/bzlmod/all_crate_deps).
5757
5858
```python
5959
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
@@ -144,7 +144,7 @@ For more details about repin, [please refer to the documentation](https://bazelb
144144
In cases where Rust targets have heavy interactions with other Bazel targets ([Cc](https://docs.bazel.build/versions/main/be/c-cpp.html), [Proto](https://rules-proto-grpc.com/en/4.5.0/lang/rust.html),
145145
etc.), maintaining Cargo.toml files may have diminishing returns as things like rust-analyzer
146146
begin to be confused about missing targets or environment variables defined only in Bazel.
147-
In situations like this, it may be desirable to have a "Cargo free" setup. You find an example in the in the [example folder](../examples/bzlmod/hello_world_no_cargo).
147+
In situations like this, it may be desirable to have a "Cargo free" setup. You find an example in the in the [example folder](https://github.com/bazelbuild/rules_rust/examples/bzlmod/hello_world_no_cargo).
148148
149149
crates_repository supports this through the packages attribute,
150150
as shown below.
@@ -227,9 +227,9 @@ Only a cargo workspace needs updating whenever the underlying Cargo.toml file ch
227227
In some cases, it is require that all external dependencies are vendored, meaning downloaded
228228
and stored in the workspace. This helps, for example, to conduct licence scans, apply custom patches,
229229
or to ensure full build reproducibility since no download error could possibly occur.
230-
You find a complete example in the in the [example folder](../examples/bzlmod/all_deps_vendor).
230+
You find a complete example in the in the [example folder](https://github.com/bazelbuild/rules_rust/examples/bzlmod/all_deps_vendor).
231231
232-
For the setup, you need to add the skylib in addition to the rust rules to your MODUE.bazel.
232+
For the setup, you need to add the skylib in addition to the rust rules to your `MODULE.bazel`.
233233
234234
```python
235235
module(

0 commit comments

Comments
 (0)