mirror of
https://github.com/Noratrieb/website.git
synced 2026-01-14 08:55:01 +01:00
parent
9dc632b657
commit
98a0527981
4 changed files with 33 additions and 20 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
//! Root index.html and some other static stuff
|
//! Root index.html and some other static stuff
|
||||||
|
|
||||||
use std::path::Path;
|
use std::{cmp::Reverse, path::Path};
|
||||||
|
|
||||||
use color_eyre::{eyre::WrapErr, Result};
|
use color_eyre::{eyre::WrapErr, Result};
|
||||||
|
|
||||||
|
|
@ -14,7 +14,13 @@ pub fn build(
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let mut context = tera::Context::new();
|
let mut context = tera::Context::new();
|
||||||
|
|
||||||
context.insert("talks", &config.talks);
|
let mut talks = config
|
||||||
|
.talks
|
||||||
|
.iter()
|
||||||
|
.filter(|talk| talk.hidden != Some(true))
|
||||||
|
.collect::<Vec<_>>();
|
||||||
|
talks.sort_by_cached_key(|talk| Reverse(talk.date.clone()));
|
||||||
|
context.insert("talks", &talks);
|
||||||
|
|
||||||
utils::copy_fn(&statics.join("root"), dist, |content, ext, _opts| {
|
utils::copy_fn(&statics.join("root"), dist, |content, ext, _opts| {
|
||||||
if ext.is_some_and(|ext| matches!(ext, "html" | "css")) {
|
if ext.is_some_and(|ext| matches!(ext, "html" | "css")) {
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ struct Talk {
|
||||||
location: String,
|
location: String,
|
||||||
#[serde(skip_deserializing)]
|
#[serde(skip_deserializing)]
|
||||||
dir_name: String,
|
dir_name: String,
|
||||||
|
hidden: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Talk {
|
impl Talk {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
[slides]
|
[slides]
|
||||||
talks = [
|
talks = [
|
||||||
{ name = "How to contribute to the Rust project", location = "Rust Zürisee", date = "2024-01-17" },
|
{ name = "How to contribute to the Rust project", location = "Rust Zürisee", date = "2024-01-17" },
|
||||||
|
{ name = "How Rust compiles", location = "EuroRust Paris 2025", date = "2025-10-10", hidden = true },
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<title>how rust compiles</title>
|
<title>how Rust compiles</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="../dist/reset.css" />
|
<link rel="stylesheet" href="../dist/reset.css" />
|
||||||
<link rel="stylesheet" href="../dist/reveal.css" />
|
<link rel="stylesheet" href="../dist/reveal.css" />
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
<section style="height: 100%">
|
<section style="height: 100%">
|
||||||
<div style="display: flex; align-items: flex-start; height: 100%">
|
<div style="display: flex; align-items: flex-start; height: 100%">
|
||||||
<details>
|
<details>
|
||||||
<summary>the rust compilation model has surprising effects</summary>
|
<summary>the Rust compilation model has surprising effects</summary>
|
||||||
<iframe
|
<iframe
|
||||||
height="600"
|
height="600"
|
||||||
width="800"
|
width="800"
|
||||||
|
|
@ -60,22 +60,11 @@
|
||||||
<section data-markdown>
|
<section data-markdown>
|
||||||
<textarea data-template>
|
<textarea data-template>
|
||||||
# speed 🚀
|
# speed 🚀
|
||||||
|
|
||||||
|
- compile times
|
||||||
|
- runtime performance
|
||||||
</textarea>
|
</textarea>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
|
||||||
<!-- cargo build -v -j1 -->
|
|
||||||
<div id="cargo-build-v-asciinema-player"></div>
|
|
||||||
<script>
|
|
||||||
AsciinemaPlayer.create(
|
|
||||||
"cargo-build-v.cast",
|
|
||||||
document.getElementById("cargo-build-v-asciinema-player"),
|
|
||||||
{
|
|
||||||
cols: 134,
|
|
||||||
rows: 36,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
<section>
|
<section>
|
||||||
<h2>what does rustc like, do?</h2>
|
<h2>what does rustc like, do?</h2>
|
||||||
<h4>a quick overview of the compilation phases</h4>
|
<h4>a quick overview of the compilation phases</h4>
|
||||||
|
|
@ -154,6 +143,20 @@
|
||||||
- but like not really
|
- but like not really
|
||||||
</textarea>
|
</textarea>
|
||||||
</section>
|
</section>
|
||||||
|
<section>
|
||||||
|
<!-- cargo build -v -j1 -->
|
||||||
|
<div id="cargo-build-v-asciinema-player"></div>
|
||||||
|
<script>
|
||||||
|
AsciinemaPlayer.create(
|
||||||
|
"cargo-build-v.cast",
|
||||||
|
document.getElementById("cargo-build-v-asciinema-player"),
|
||||||
|
{
|
||||||
|
cols: 134,
|
||||||
|
rows: 36,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<h2>a crate - the compilation unit</h2>
|
<h2>a crate - the compilation unit</h2>
|
||||||
<p>quite big</p>
|
<p>quite big</p>
|
||||||
|
|
@ -163,7 +166,7 @@
|
||||||
<h2>a codegen unit</h2>
|
<h2>a codegen unit</h2>
|
||||||
<p>LLVM is single-threaded</p>
|
<p>LLVM is single-threaded</p>
|
||||||
<p>rustc: hi LLVM, look we are like a C file, now be fast</p>
|
<p>rustc: hi LLVM, look we are like a C file, now be fast</p>
|
||||||
<p>~1-256 depending on size and configuration (⚙️)</p>
|
<p>~1-256 depending on size and configuration</p>
|
||||||
<div class="mermaid">
|
<div class="mermaid">
|
||||||
<pre>
|
<pre>
|
||||||
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true, 'fontSize': '25px' }}}%%
|
%%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true, 'fontSize': '25px' }}}%%
|
||||||
|
|
@ -303,6 +306,8 @@ fn main() { math::add() }
|
||||||
add(0_u16, 0_u16); // creates add<u16> function
|
add(0_u16, 0_u16); // creates add<u16> function
|
||||||
add(0_u32, 0_u32); // creates add<u32> function
|
add(0_u32, 0_u32); // creates add<u32> function
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- monomorphization, creating a copy for each type it is used with
|
||||||
</textarea>
|
</textarea>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
|
|
@ -511,7 +516,7 @@ fn main() { math::add() }
|
||||||
</section>
|
</section>
|
||||||
<section data-markdown>
|
<section data-markdown>
|
||||||
<textarea data-template>
|
<textarea data-template>
|
||||||
## `#[inline]` (⚙️)
|
## `#[inline]`
|
||||||
- for non-generic functions
|
- for non-generic functions
|
||||||
- for very small functions, this happens automatically
|
- for very small functions, this happens automatically
|
||||||
- for other functions, it doesn't, because it would be slow
|
- for other functions, it doesn't, because it would be slow
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue