|
|
|
@ -93,6 +93,7 @@
|
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<img src="_images/rustlatam-travel.png" alt="" class="stretch"> |
|
|
|
|
|
|
|
|
@ -103,15 +104,20 @@
|
|
|
|
|
</aside> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<img src="_images/several-song-filled-hours-later.jpg" alt="" class="stretch"> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<h2>Workshops</h2> |
|
|
|
|
|
|
|
|
|
<h4 class="fragment">Learning WebAssembly and Rust</h4> |
|
|
|
|
<h4> |
|
|
|
|
<a href="https://rustwasm.github.io/book/game-of-life/implementing.html"> |
|
|
|
|
Learning WebAssembly and Rust |
|
|
|
|
</a> |
|
|
|
|
</h4> |
|
|
|
|
|
|
|
|
|
<aside class="notes"> |
|
|
|
|
No primeiro dia, eu fui no workshop de webassembly. |
|
|
|
@ -140,34 +146,194 @@
|
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<h2>Opening Keynote</h2> |
|
|
|
|
<h2> |
|
|
|
|
<a href="https://nikomatsakis.github.io/rust-latam-2019/#1"> |
|
|
|
|
Opening Keynote |
|
|
|
|
</a> |
|
|
|
|
</h2> |
|
|
|
|
|
|
|
|
|
<h3>Niko Matsakis</h3> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<img class="stretch" src="_images/rustlatam-openingkeynote.jpg" alt=""> |
|
|
|
|
<p>História do Rust</p> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<img class="stretch" src="_images/rustlatam-openingkeynote1.png" alt=""> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<img class="stretch" src="_images/rustlatam-openingkeynote2.png" alt=""> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<img class="stretch" src="_images/rustlatam-openingkeynote3.png" alt=""> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<img class="stretch" src="_images/rustlatam-openingkeynote4.png" alt=""> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<p>"Rust is Open"</p> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<h2>Defense Against The Wrong Logic: Proactive Rust Coding</h2> |
|
|
|
|
<h2> |
|
|
|
|
<a href="https://docs.google.com/presentation/d/140eKS9HLAfpb1Qi5J9xBpUcuxIhGDIejH7B8N2pmW5M/edit#slide=id.p1"> |
|
|
|
|
Defense Against The Wrong Logic: Proactive Rust Coding |
|
|
|
|
</a> |
|
|
|
|
</h2> |
|
|
|
|
<h3>Michael Gattozzi</h3> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<p><code>type</code> é para áliases.</p> |
|
|
|
|
|
|
|
|
|
<pre><code class="hljs rust" data-trim> |
|
|
|
|
type Farenheit = i32; |
|
|
|
|
type Celsius = i32; |
|
|
|
|
|
|
|
|
|
fn is_it_hot(t: Farenheit) -> bool; |
|
|
|
|
|
|
|
|
|
let temp: Celsius = 32; |
|
|
|
|
is_it_hot(temp); |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<pre><code class="hljs rust" data-trim> |
|
|
|
|
struct Celsius(i32); |
|
|
|
|
struct Farenheit(i32); |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<pre><code class="hljs rust" data-trim> |
|
|
|
|
impl Into<Celsius> for Farenheit { |
|
|
|
|
fn into(c: Celsius) -> Self { |
|
|
|
|
Self(((c.0 + 9) / 5) as i32 + 32); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
is_it_hot(temp.into()); |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<img class="stretch" src="_images/rustlatam-defensive.png" alt=""> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<h2>Interop with Android, IOS and WASM in the same project</h2> |
|
|
|
|
<h2> |
|
|
|
|
<a href="https://slides.com/otaviopace/deck-5#/"> |
|
|
|
|
Interop with Android, IOS and WASM in the same project |
|
|
|
|
</a> |
|
|
|
|
</h2> |
|
|
|
|
<h3>Otávio Pace</h3> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<h3>FFI</h3> |
|
|
|
|
|
|
|
|
|
<table> |
|
|
|
|
<thead> |
|
|
|
|
<tr> |
|
|
|
|
<th>OS</th> |
|
|
|
|
<th>How?</th> |
|
|
|
|
</tr> |
|
|
|
|
</thead> |
|
|
|
|
|
|
|
|
|
<tbody> |
|
|
|
|
<tr> |
|
|
|
|
<td>iOS</td> |
|
|
|
|
<td>C integration</td> |
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
<tr> |
|
|
|
|
<td>Android</td> |
|
|
|
|
<td>JNI</td> |
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
<tr> |
|
|
|
|
<td>Web</td> |
|
|
|
|
<td>WASM</td> |
|
|
|
|
</tr> |
|
|
|
|
</tbody> |
|
|
|
|
</table> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<pre><code class="hljs rust" data-trim> |
|
|
|
|
mod common; |
|
|
|
|
|
|
|
|
|
#[cfg(target_os = "android")] |
|
|
|
|
mod android; |
|
|
|
|
|
|
|
|
|
#[cfg(target_os = "ios")] |
|
|
|
|
mod ios; |
|
|
|
|
|
|
|
|
|
#[cfg(target_arch = "wasm32")] |
|
|
|
|
mod wasm; |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<h2>Rebuilding the Stack for Serverlesso</h2> |
|
|
|
|
<h2>Rebuilding the Stack for Serverless</h2> |
|
|
|
|
<h3>Sergio Benitez</h3> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<h4>Cold Start Preformance</h4> |
|
|
|
|
|
|
|
|
|
<table> |
|
|
|
|
<thead> |
|
|
|
|
<tr> |
|
|
|
|
<th>Service</th> |
|
|
|
|
<th>Time</th> |
|
|
|
|
</tr> |
|
|
|
|
</thead> |
|
|
|
|
|
|
|
|
|
<tbody> |
|
|
|
|
<tr> |
|
|
|
|
<td>AWS Lambda</td> |
|
|
|
|
<td>~1.5s</td> |
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
<tr> |
|
|
|
|
<td>Google Cloud Functions</td> |
|
|
|
|
<td>>2s</td> |
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
<tr> |
|
|
|
|
<td>Fastly Terrarium (WASM)</td> |
|
|
|
|
<td>~500ms</td> |
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
<tr> |
|
|
|
|
<td>$2.50 VPS + NGINX</td> |
|
|
|
|
<td>~30ms</td> |
|
|
|
|
</tr> |
|
|
|
|
</tbody> |
|
|
|
|
</table> |
|
|
|
|
|
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<h4>Idea</h4> |
|
|
|
|
|
|
|
|
|
<ul> |
|
|
|
|
<li>Load executable directly into memory</li> |
|
|
|
|
<li>Run code</li> |
|
|
|
|
</ul> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
@ -175,27 +341,142 @@
|
|
|
|
|
<h2>WebAssembly with Rust</h2> |
|
|
|
|
<h3>Kevin Hoffman</h3> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<p> |
|
|
|
|
Autor do livro |
|
|
|
|
<a href="https://pragprog.com/book/khrust/programming-webassembly-with-rust">Programming WebAssembly with Rust</a> |
|
|
|
|
</p> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<img class="stretch" src="_images/rustlatam-asmjs.jpg" alt=""> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<h2>Friendly Ferris: Developing Kind Compiler Errors</h2> |
|
|
|
|
<h2> |
|
|
|
|
<a href="https://estebank.github.io/rust/"> |
|
|
|
|
Friendly Ferris: Developing Kind Compiler Errors |
|
|
|
|
</a> |
|
|
|
|
</h2> |
|
|
|
|
<h3>Esteban Kuber</h3> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<h2>Procedural Macros vs Sliced Bread</h2> |
|
|
|
|
<h2> |
|
|
|
|
<a href="https://rustlatam.org/assets/slides/proc-macros-sliced-bread.pdf"> |
|
|
|
|
Procedural Macros vs Sliced Bread |
|
|
|
|
</a> |
|
|
|
|
</h2> |
|
|
|
|
<h3>Alex Crichton</h3> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<pre><code class="hljs rust" data-trim> |
|
|
|
|
#[proc_macro] |
|
|
|
|
pub fn println(input: TokenStream) -> TokenStream |
|
|
|
|
{ |
|
|
|
|
// ??? |
|
|
|
|
} |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<h2>The Power of the "Where" Clause</h2> |
|
|
|
|
<h2><a href="https://speakerdeck.com/skade/the-power-of-the-where-clause">The Power of the "Where" Clause</a></h2> |
|
|
|
|
<h3>Florian Gilcher</h3> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<p>"Don't start out very generic, refactor towards it!"</p> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<pre><code class="hljs rust" data-trim> |
|
|
|
|
fn debug_iter<I>(iter: I) |
|
|
|
|
where |
|
|
|
|
I: Iterator, |
|
|
|
|
I::Item: Debug |
|
|
|
|
{ |
|
|
|
|
// ... |
|
|
|
|
} |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<pre><code class="hljs rust" data-trim> |
|
|
|
|
trait State { } |
|
|
|
|
trait TerminalState { } |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<pre><code class="hljs rust" data-trim> |
|
|
|
|
trait TransitionTo<S> |
|
|
|
|
where S: State, |
|
|
|
|
Self: State |
|
|
|
|
{ |
|
|
|
|
fn transition(self) -> S; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
trait Terminate |
|
|
|
|
where Self: TerminalState |
|
|
|
|
{ |
|
|
|
|
fn terminate(self); |
|
|
|
|
} |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<pre><code class="hljs rust" data-trim> |
|
|
|
|
struct Start; |
|
|
|
|
impl State for Start {} |
|
|
|
|
|
|
|
|
|
struct Loop; |
|
|
|
|
impl State for Loop {} |
|
|
|
|
|
|
|
|
|
struct Stop; |
|
|
|
|
impl State for Stop {} |
|
|
|
|
impl TerminalState for Stop {} |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<pre><code class="hljs rust" data-trim> |
|
|
|
|
impl TransitionTo<Loop> for Start { |
|
|
|
|
fn transition(self) -> Loop { ... } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl TransitionTo<Loop> for Loop { |
|
|
|
|
fn transition(self) -> Loop { ... } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl TransitionTo<End> for Loop { |
|
|
|
|
fn transition(self) -> End { ... } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl Terminate for End { |
|
|
|
|
fn terminate(self) { ... } |
|
|
|
|
} |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<pre><code class="hljs rust" data-trim> |
|
|
|
|
fn main() { |
|
|
|
|
let initial = Start; |
|
|
|
|
let next: Loop = initial.transition(); |
|
|
|
|
let next: Loop = next.transition(); |
|
|
|
|
let next: End = next.transition(); |
|
|
|
|
next.terminate(); |
|
|
|
|
} |
|
|
|
|
</code></pre> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
@ -203,8 +484,23 @@
|
|
|
|
|
<h2>Closing Keynote</h2> |
|
|
|
|
<h3>Without Boats</h3> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<p>Estado geral do <code>async</code> em Rust.</p> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<img class="stretch" src="_images/rustlatam-async1.jpg" alt=""> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<img class="stretch" src="_images/rustlatam-async2.jpg" alt=""> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section data-background='_images/thats-all-folks.jpg'> |
|
|
|
|
<section></section> |
|
|
|
|
</section> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|