Bug 1748845 - Update source-relative links in rust docs, r=firefox-source-docs-reviewers,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D135384
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
This page explains how to test and debug Rust code in Firefox.
|
||||
|
||||
The [build documentation](../build/buildsystem/rust.html) explains how to add
|
||||
new Rust code to Firefox. The [code documentation](../writing-rust-code)
|
||||
The [build documentation](/build/buildsystem/rust.rst) explains how to add
|
||||
new Rust code to Firefox. The [code documentation](/writing-rust-code/index.md)
|
||||
explains how to write and work with Rust code in Firefox.
|
||||
|
||||
## Testing Mozilla crates
|
||||
@@ -31,7 +31,7 @@ It's also possible to use `RUST_TESTS` in a different `moz.build` file. See
|
||||
`testing/geckodriver/moz.build` and the [geckodriver testing docs] for an
|
||||
example.
|
||||
|
||||
[geckodriver testing docs]: ../testing/geckodriver/Testing.html
|
||||
[geckodriver testing docs]: /testing/geckodriver/Testing.md
|
||||
|
||||
### GTests
|
||||
|
||||
@@ -102,7 +102,7 @@ To restrict logging to child processes, use `RUST_LOG_CHILD` instead of
|
||||
Rust logging can also be forwarded to the [Gecko logger] for capture via
|
||||
`MOZ_LOG` and `MOZ_LOG_FILE`.
|
||||
|
||||
[Gecko logger]: /xpcom/logging.html
|
||||
[Gecko logger]: /xpcom/logging.rst
|
||||
|
||||
- When parsing modules from `MOZ_LOG`, modules containing `::` are considered
|
||||
to be Rust modules. To log everything in a top-level module like
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
This page explains how to write and work with Rust code in Firefox, with an
|
||||
emphasis on interoperation with C++ code.
|
||||
|
||||
The [build documentation](../build/buildsystem/rust.html) explains how to add
|
||||
new Rust code to Firefox. The [test documentation](../testing-rust-code)
|
||||
The [build documentation](/build/buildsystem/rust.rst) explains how to add
|
||||
new Rust code to Firefox. The [test documentation](/testing-rust-code/index.md)
|
||||
explains how to test and debug Rust code in Firefox.
|
||||
|
||||
```{toctree}
|
||||
|
||||
@@ -21,7 +21,7 @@ xpcom = { path = "../../../xpcom/rust/xpcom" }
|
||||
file hierarchy.)
|
||||
|
||||
Next hook it into the build system according to the [build
|
||||
documentation](../build/buildsystem/rust.html).
|
||||
documentation](/build/buildsystem/rust.rst).
|
||||
|
||||
The Rust code will need to import some basic types. `xpcom::interfaces`
|
||||
contains all the usual `nsI` interfaces.
|
||||
@@ -33,7 +33,7 @@ use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use xpcom::{interfaces::nsISupports, RefPtr};
|
||||
```
|
||||
|
||||
The next part declares the implementation.
|
||||
The next part declares the implementation.
|
||||
|
||||
```rust
|
||||
#[derive(xpcom)]
|
||||
@@ -110,11 +110,11 @@ The following XPCOM components are written in Rust.
|
||||
- [bookmark_sync](https://searchfox.org/mozilla-central/source/toolkit/components/places/bookmark_sync),
|
||||
which [merges](https://mozilla.github.io/dogear) bookmarks from Firefox Sync
|
||||
with bookmarks in the Places database.
|
||||
[There's also some docs on how Rust interacts with Sync](../services/sync/rust-engines.html)
|
||||
[There's also some docs on how Rust interacts with Sync](/services/sync/rust-engines.rst)
|
||||
- [webext_storage_bridge](https://searchfox.org/mozilla-central/source/toolkit/components/extensions/storage/webext_storage_bridge),
|
||||
which powers the WebExtension storage.sync API. It's a self-contained example
|
||||
that pulls in a crate from application-services for the heavy lifting, wraps
|
||||
that up in a Rust XPCOM component, and then wraps the component in a JS
|
||||
interface. There's also some boilerplate there around adding a
|
||||
`components.conf` file, and a dummy C++ header that declares the component
|
||||
constructor. [It has some in-depth documentation on how it hangs together](../toolkit/components/extensions/webextensions/webext-storage.html).
|
||||
constructor. [It has some in-depth documentation on how it hangs together](../toolkit/components/extensions/webextensions/webext-storage.rst).
|
||||
|
||||
Reference in New Issue
Block a user