File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,26 @@ integrated development environments (IDEs) have built-in support for Rust. You
142
142
can always find a fairly current list of many editors and IDEs on [ the tools
143
143
page] [ tools ] on the Rust website.
144
144
145
+ ### Working Offline with This Book
146
+
147
+ In several examples, we will use Rust packages beyond the standard library. To
148
+ work through those examples, you will either need to have an internet connection
149
+ or to have downloaded those dependencies ahead of time. To download the
150
+ dependencies ahead of time, you can run the following commands. (We’ll explain
151
+ what ` cargo ` is and what each of these commands does in detail later.)
152
+
153
+ ``` console
154
+ $ cargo new get-dependencies
155
+ $ cd get-dependencies
156
+
157
+ ```
158
+
159
+ This will cache the downloads for these packages so you will not need to
160
+ download them later. Once you have run this command, you do not need to keep the
161
+ ` get-dependencies ` folder. If you have run this command, you can use the
162
+ ` --offline ` flag with all ` cargo ` commands in the rest of the book to use these
163
+ cached versions instead of attempting to use the network.
164
+
145
165
[ otherinstall ] : https://forge.rust-lang.org/infra/other-installation-methods.html
146
166
[ install ] : https://www.rust-lang.org/tools/install
147
167
[ msvc ] : https://rust-lang.github.io/rustup/installation/windows-msvc.html
You can’t perform that action at this time.
0 commit comments