doc: Document how to build with Rust dependencies in offline-mode.

* CLOSES #22907: https://bugs.torproject.org/22907
This commit is contained in:
Isis Lovecruft 2017-11-28 22:39:53 +00:00
parent b230860608
commit bb4993395c
No known key found for this signature in database
GPG Key ID: B8938BC5E86C046F
2 changed files with 20 additions and 19 deletions

3
changes/bug22907 Normal file
View File

@ -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.

View File

@ -60,30 +60,28 @@ or specifying a local directory.
**Using a local dependency cache** **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
To specify a local directory:
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.)
You'll need the following Rust dependencies (as of this writing): You'll need the following Rust dependencies (as of this writing):
libc==0.2.22 libc==0.2.22
To get them, do: We vendor our Rust dependencies in a separate repo using
[cargo-vendor](https://github.com/alexcrichton/cargo-vendor). To use them, do:
mkdir path_to_dependencies_directory git submodule init
cd path_to_dependencies_directory git submodule update
git clone https://github.com/rust-lang/libc
cd libc To specify the local directory containing the dependencies, (assuming you are in
git checkout 0.2.22 the top level of the repository) configure tor with:
cargo package
cd .. TOR_RUST_DEPENDENCIES='path_to_dependencies_directory' ./configure --enable-rust
ln -s libc/target/package/libc-0.2.22 libc-0.2.22
(Note that RUST_DEPENDENCIES must be the full path to the directory; it cannot
be relative.)
Assuming you used the above `git submodule` commands and you're in the topmost
directory of the repository, this would be:
TOR_RUST_DEPENDENCIES=`pwd`/src/ext/rust/crates ./configure --enable-rust
Identifying which modules to rewrite Identifying which modules to rewrite