From 55095c6e3161a3728d9f35d99ab2b3172d3a8762 Mon Sep 17 00:00:00 2001 From: Paul Ellenbogen Date: Tue, 13 Jun 2017 16:35:06 -0700 Subject: [PATCH] Bug 1372743: Add updating Cargo.lock file in 'toolkit/library/rust' using 'cargo update' as step in the docs to add a rust crate. r=rillian MozReview-Commit-ID: KDasHNTCKrq --HG-- extra : rebase_source : dfb7be3ff99ee1316c8fb19ca9d4456731f05e4a --- build/docs/rust.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/docs/rust.rst b/build/docs/rust.rst index 4d742746b288..84e6aa4ebf39 100644 --- a/build/docs/rust.rst +++ b/build/docs/rust.rst @@ -14,7 +14,10 @@ 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 `_. -You'll also need to add an ``extern crate`` reference to `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 `_. This ensures that the Rust code will be linked properly into libxul as well as the copy of libxul used for gtests.