[tor-commits] [tor/master] doc: Document how to build with Rust dependencies in offline-mode.

nickm at torproject.org nickm at torproject.org
Mon Dec 4 19:12:08 UTC 2017


commit bb4993395c9ad41a7a6ce70319f0240a951f0e65
Author: Isis Lovecruft <isis at torproject.org>
Date:   Tue Nov 28 22:39:53 2017 +0000

    doc: Document how to build with Rust dependencies in offline-mode.
    
     * CLOSES #22907: https://bugs.torproject.org/22907
---
 changes/bug22907                  |  3 +++
 doc/HACKING/GettingStartedRust.md | 32 +++++++++++++++-----------------
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/changes/bug22907 b/changes/bug22907
new file mode 100644
index 000000000..ff6ab8375
--- /dev/null
+++ b/changes/bug22907
@@ -0,0 +1,3 @@
+  o Documentation:
+    - Add documentation on how to build tor with Rust dependencies without
+      requiring being online.  Closes ticket 22907; bugfix on tor-0.3.0.3-alpha.
diff --git a/doc/HACKING/GettingStartedRust.md b/doc/HACKING/GettingStartedRust.md
index 181535122..3d0038831 100644
--- a/doc/HACKING/GettingStartedRust.md
+++ b/doc/HACKING/GettingStartedRust.md
@@ -60,30 +60,28 @@ or specifying a local directory.
 
 **Using a local dependency cache**
 
-**NOTE**: local dependency caches which were not *originally* created via
-  `--enable-cargo-online-mode` are broken. See https://bugs.torproject.org/22907
+You'll need the following Rust dependencies (as of this writing):
 
-To specify a local directory:
+    libc==0.2.22
 
-    RUST_DEPENDENCIES='path_to_dependencies_directory' ./configure --enable-rust
+We vendor our Rust dependencies in a separate repo using
+[cargo-vendor](https://github.com/alexcrichton/cargo-vendor).  To use them, do:
 
-(Note that RUST_DEPENDENCIES must be the full path to the directory; it cannot
-be relative.)
+    git submodule init
+    git submodule update
 
-You'll need the following Rust dependencies (as of this writing):
+To specify the local directory containing the dependencies, (assuming you are in
+the top level of the repository) configure tor with:
 
-    libc==0.2.22
+    TOR_RUST_DEPENDENCIES='path_to_dependencies_directory' ./configure --enable-rust
+
+(Note that RUST_DEPENDENCIES must be the full path to the directory; it cannot
+be relative.)
 
-To get them, do:
+Assuming you used the above `git submodule` commands and you're in the topmost
+directory of the repository, this would be:
 
-    mkdir path_to_dependencies_directory
-    cd path_to_dependencies_directory
-    git clone https://github.com/rust-lang/libc
-    cd libc
-    git checkout 0.2.22
-    cargo package
-    cd ..
-    ln -s libc/target/package/libc-0.2.22 libc-0.2.22
+    TOR_RUST_DEPENDENCIES=`pwd`/src/ext/rust/crates ./configure --enable-rust
 
 
  Identifying which modules to rewrite





More information about the tor-commits mailing list