Bug 1372743: Add updating Cargo.lock file in 'toolkit/library/rust' using 'cargo update' as step in the docs to add a rust crate. draft
authorPaul Ellenbogen <pe5@cs.princeton.edu>
Tue, 13 Jun 2017 16:35:06 -0700
changeset 594235 c947fa83edd234905d82cbe0740a4757fd17eb51
parent 593475 91134c95d68cbcfe984211fa3cbd28d610361ef1
child 633357 733bfb727a30829cadd2bf936bb5edf271c17d58
push id63958
push userbmo:pe5@cs.princeton.edu
push dateWed, 14 Jun 2017 18:18:18 +0000
bugs1372743
milestone56.0a1
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
build/docs/rust.rst
--- 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