forked from Velfi/ChicagoRustMeetup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
366 lines (355 loc) · 12.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
>
<title>The Rust Ecosystem: What To Know After "Hello, World!"</title>
<link
rel="stylesheet"
href="css/reveal.css"
>
<link
rel="stylesheet"
href="css/theme/rust.css"
>
<!-- Theme used for syntax highlighting of code -->
<link
rel="stylesheet"
href="lib/css/a11y-dark.css"
>
<link
href="https://fonts.googleapis.com/css?family=UnifrakturMaguntia"
rel="stylesheet"
>
<!-- Printing and PDF exports -->
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<!-- Title -->
<section>
<section data-markdown>
<textarea data-template>
# The Rust Ecosystem
```rust
// What to Know After
println!("Hello, World!");
```
</textarea>
</section>
<section>
Rust has some amazing tools!
</section>
</section>
<!-- Rustup -->
<section>
<h2>Rustup</h2>
<section>The Rust toolchain installer</section>
<section data-markdown>
<textarea data-template>
* `curl https://sh.rustup.rs -sSf | sh`
* Install rustup (unless you're on Windows)
* `rustup update`
* Update Rust versions
* `rustup self update`
* Update rustup itself
* `rustup install <channel>`
* Install a specific Rust channel
</textarea>
</section>
<section>
<h3>WTF are channels?</h3>
<table>
<tr>
<td><b>stable</b></td>
<td>Won't change, should be bug-free <i>(default)</i></td>
</tr>
<tr>
<td><b>beta</b></td>
<td>Won't change, but might have bugs</td>
</tr>
<tr>
<td><b>nightly</b></td>
<td>Contains experimental features that might be removed or changed</td>
</tr>
</table>
</section>
</tr>
<section>
<p>Installation Instructions:</p>
<a href="https://rustup.rs/">https://rustup.rs</a>
<p>Github Repository:</p>
<a href="https://github.com/rust-lang-nursery/rustup.rs">https://github.com/rust-lang-nursery/rustup.rs</a>
</section>
</section>
<!-- Cargo -->
<section>
<h2>Cargo</h2>
<section>Rust's dependency manager and build helper</section>
<section>
<h3>Two main responsibilities:</h3>
<ul>
<li>Fetch and build project dependencies</li>
<li>Act as a wrapper to <code>rustc</code> and pass the correct parameters for your project</li>
</ul>
</section>
<section data-markdown>
<textarea data-template>
* `cargo new <project name>` create a new project
* `--lib` *(default)*
* `--bin`
</textarea>
</section>
<section>
<p>Dependencies are managed in your <code>Cargo.toml</code> file.</p>
<p>The <code>Cargo.lock</code> file allows for reproducible builds.
It's created automatically, so don't edit it by hand.</p>
</section>
<section data-markdown>
<textarea data-template>
* `cargo build`
* build your project
* `cargo run`
* build and run your project *(only for `--bin` projects)*
* Both commands support
* `--debug` *(default)*
* `--release`
</textarea>
</section>
<section>
<h3>Cargo can also manage:</h3>
<ul>
<li>The running of tests</li>
<li>Building and running examples</li>
<li>Managing build scripts</li>
<li>Publishing to <a href="https://crates.io/">Crates.io</a></li>
</ul>
</section>
<section>
<p>The Cargo Book:</p>
<a href="https://doc.rust-lang.org/cargo">https://doc.rust-lang.org/cargo</a>
</section>
</section>
<!-- Crates.io -->
<section>
<h2>Crates.io</h2>
<section>
Rust's crate registry
<p class="fragment"><i>In Rust, packages are called crates.</i></p>
</section>
<section>
<ul>
<li>Great, if you have an idea of what you're looking for.</li>
<li>Contains links to documentation for most crates.</li>
<li>Lists popular crates, new crates.</li>
<li>Allows browsing by category.</li>
</ul>
</section>
<section>
<h3>Crates.rs</h3>
<p>An opinionated alternative to <a href="https://crates.io/">Crates.io</a> that's great for browsing:</p>
<a href="https://crates.rs/">https://crates.rs/</a>
</section>
</section>
<!-- rustfmt -->
<section>
<h2>rustfmt</h2>
<section>
The official formatter for Rust code
<p class="fragment">Available as part of <code>cargo</code> <br> since Rust 1.24</p>
</section>
<section data-markdown>
<textarea data-template>
* `rustup component add rustfmt-preview` to install
* `cargo fmt` to run
* configured by creating a `rustfmt.toml` file in your project directory
</textarea>
</section>
<section>
<h3>It might get confused in a couple of situations:</h3>
<ul>
<li>Macros</li>
<li>Incorrect / non-compiling code</li>
<li>Any Rust code in a doc comment</li>
<li>Non-ASCII unicode</li>
</ul>
</section>
</section>
<!-- Clippy -->
<section>
<h2>Clippy</h2>
<section>A collection of lints to catch common mistakes and help you write more idiomatic Rust</section>
<section>Clippy is now part of <code>cargo</code>!</section>
<section data-markdown>
<textarea data-template>
* `rustup component add clippy-preview` to install
* `cargo clippy` to run
</textarea>
</section>
<section>
<p>Find a list of ALL current lints here:</p>
<a href="https://rust-lang-nursery.github.io/rust-clippy/">https://rust-lang-nursery.github.io/rust-clippy/</a>
</section>
</section>
<!-- Rust Language Server -->
<section>
<h2>RLS</h2>
<section>
The Rust Language Server
<p class="fragment">Rust lang support for your IDE</p>
</section>
<section data-markdown>
<textarea data-template>
install with:
`rustup component add rls-preview rust-analysis rust-src`
</textarea>
</section>
<section>
<h3>Includes:</h3>
<ul>
<li>Syntax Highlighting</li>
<li>Snippets</li>
<li>Build Tasks</li>
<li>Error Checking</li>
<li>Go To Definition</li>
<li>Find Implementations</li>
<li>And more...</li>
</ul>
</section>
<section>
<p>Mostly depends on the Rust compiler</p>
<p>Falls back to Racer for situations where the compiler is too slow</p>
</section>
<section>
<p>More info:</p>
<a href="https://github.com/rust-lang-nursery/rls">https://github.com/rust-lang-nursery/rls</a>
<a href="https://github.com/racer-rust/racer">https://github.com/racer-rust/racer</a>
</section>
</section>
<!-- IntelliJ Rust -->
<section>
<h2>IDE recommendations</h2>
<section>
<ul>
<li>Visual Studio Code with the <code>rust</code> extension</li>
<li>IntelliJ Rust</li>
<li>Corrosion, an Eclipse based IDE for Rust</li>
</ul>
</section>
<section>
<a href="https://github.com/rust-lang-nursery/rls-vscode">https://github.com/rust-lang-nursery/rls-vscode</a><br>
<a href="https://intellij-rust.github.io/">https://intellij-rust.github.io/</a><br>
<a href="https://github.com/eclipse/corrosion">https://github.com/eclipse/corrosion</a>
</section>
</section>
<!-- Rust Playground -->
<section>
<h2>Rust playground</h2>
<section>An open source web-based REPL for Rust</section>
<section>
<ul>
<li>Includes <code>rustfmt</code> and <code>clippy</code></li>
<li>Allows you to compile in <code>--release</code> or <code>--debug</code> mode</li>
<li>Supports <code>stable</code>, <code>beta</code>, and <code>nightly</code> channels</li>
<li>Allows for easy sharing and demonstration of Rust code snippets</li>
<li>Allows you to view generated assembly, LLVM IR, MIR, and WASM code</li>
</ul>
</section>
<section>
<p>Play with it here:</p>
<a href="https://play.rust-lang.org/">https://play.rust-lang.org/</a>
</section>
</section>
<!-- Compiler Explorer -->
<section>
<h2>Compiler Explorer</h2>
<section>
A featureful way to explore the assembly code generated by compiling a Rust program
<p class="fragment">Great for when you really want to make a program as performant as possible</p>
<p class="fragment">Includes two example programs, pre- and post-optimization</p>
</section>
<section>
<p>See it here:</p>
<a href="https://godbolt.org/">https://godbolt.org/</a>
<p><small><i>Don't forget to switch it to Rust mode</i></small></p>
</section>
</section>
<!-- The Book -->
<section>
<h2 style="font-size: 1.9em;">The Rust<br> Programming Language</h2>
<section>
<p class="fragment"><b>a.k.a "TRPL"</b></p>
<p class="fragment"><b>a.k.a "The Book"</b></p>
</section>
<section>
<p>The best way to learn Rust!</p>
<p class="fragment">It contains almost anything you could want to know about the language!</p>
</section>
<section>
<p>Read the whole thing right now:</p>
<a href="https://doc.rust-lang.org/book/2018-edition">https://doc.rust-lang.org/book/2018-edition</a>
</section>
</section>
<!-- The Rustonomicon -->
<section>
The Rustonomicon
<section
data-background-color="#000"
style="color: white"
>
<p>However...</p>
<p class="fragment">there exists a dark counterpart to <br>The Book</p>
<p class="fragment">known as</p>
<p
class="fragment"
style="font-family: 'UnifrakturMaguntia'; font-size: 7rem"
>The Rustonomicon</p>
</section>
<section>
All about <code>unsafe</code> Rust
</section>
<section>
<p>You should be pretty familiar with safe Rust first</p>
<p class="fragment">It deals with some of the more unstable aspects of Rust</p>
</section>
<section>
It teaches you how to implement <code>std::vec::Vec</code>
</section>
<section>
<p>Unlock the dark secrets of Rust:</p>
<a href="https://doc.rust-lang.org/nomicon/">https://doc.rust-lang.org/nomicon/</a>
</section>
</section>
<!-- Q&A -->
<section>
Zelda will now answer your questions
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
Reveal.initialize({
dependencies: [
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/notes/notes.js', async: true },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function () { hljs.initHighlightingOnLoad(); } }
]
});
</script>
</body>
</html>