Bug 1372743: Add updating Cargo.lock file in 'toolkit/library/rust' using 'cargo update' as step in the docs to add a rust crate.
MozReview-Commit-ID: KDasHNTCKrq
--- a/build/docs/rust.rst
+++ b/build/docs/rust.rst
@@ -9,17 +9,20 @@ Rust code is built using ``cargo`` in th
straightforward to take an existing Rust crate and integrate it
into Firefox.
Linking Rust Crates into libxul
===============================
Rust crates that you want to link into libxul should be listed in the
``dependencies`` section of `toolkit/library/rust/shared/Cargo.toml <https://dxr.mozilla.org/mozilla-central/source/toolkit/library/rust/shared/Cargo.toml>`_.
-You'll also need to add an ``extern crate`` reference to `toolkit/library/rust/shared/lib.rs <https://dxr.mozilla.org/mozilla-central/source/toolkit/library/rust/shared/lib.rs>`_.
+After adding your crate, execute ``cargo update -p gkrust-shared`` in
+``toolkit/library/rust`` to update the Cargo.lock file. You'll also
+need to add an ``extern crate`` reference to
+`toolkit/library/rust/shared/lib.rs <https://dxr.mozilla.org/mozilla-central/source/toolkit/library/rust/shared/lib.rs>`_.
This ensures that the Rust code will be linked properly into libxul as well
as the copy of libxul used for gtests.
Linking Rust Crates into something else
=======================================
There currently is not any Rust code being linked into binaries other than
libxul. If you would like to do so, you'll need to create a directory with