diff --git a/ecosystem/Cargo-Logo-Small.png b/ecosystem/Cargo-Logo-Small.png new file mode 100644 index 0000000000000000000000000000000000000000..e3a99208c287bc3fba67de085255df1b4ad22c0a Binary files /dev/null and b/ecosystem/Cargo-Logo-Small.png differ diff --git a/ecosystem/TU_Logo.png b/ecosystem/TU_Logo.png new file mode 100644 index 0000000000000000000000000000000000000000..47991746dffa3a1cb00a5ccbaf8ff9d6c7d648a2 Binary files /dev/null and b/ecosystem/TU_Logo.png differ diff --git a/ecosystem/TU_Signet.png b/ecosystem/TU_Signet.png new file mode 100644 index 0000000000000000000000000000000000000000..7d05e3399c83bb565570899238dc8530bee509e4 Binary files /dev/null and b/ecosystem/TU_Signet.png differ diff --git a/ecosystem/Wheat_leaf_rust_on_wheat.jpg b/ecosystem/Wheat_leaf_rust_on_wheat.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d2e713a6460ee0b200e97ddbbae305433c37435d Binary files /dev/null and b/ecosystem/Wheat_leaf_rust_on_wheat.jpg differ diff --git a/ecosystem/beamerthemetuw.sty b/ecosystem/beamerthemetuw.sty new file mode 100644 index 0000000000000000000000000000000000000000..caf74c0f9bc105404c5306ff2c44248827121362 --- /dev/null +++ b/ecosystem/beamerthemetuw.sty @@ -0,0 +1,315 @@ +%% +% @file beamerthemeTUW.sty +% @date 2016-08-30 +% @author Wolfgang Puffitsch, Denise Ratasich +% +% @brief Beamer LaTeX template matching the corporate design of TU Wien. +%% + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{beamerthemeTUW}[2016/08/30 Beamer template that fits the TU Wien corporate design (adopted styles from powerpoint presentation template in CD manual)] + +\RequirePackage{graphicx} +\RequirePackage{tikz} + +\def\beamer@tuwDefault{default} +\def\beamer@tuwPlain{plain} +\def\beamer@tuwSidebar{sidebar} +\def\beamer@tuwHelvetica{helvetica} +\def\beamer@tuwNoImage{none} +\def\beamer@tuwLogo{TU_Logo} +\def\beamer@tuwLogoWhite{TU_Logo_white} +\def\beamer@tuwSecondLogo{none} +\def\beamer@tuwSecondLogoWidth{.5\textwidth} + +%%% options +% The user may choose other fonts (TU Wien CD says to use helvetica). +\DeclareOptionBeamer{font}{\def\beamer@tuwFont{#1}} +% Another outer theme may be chosen, however it may not fit the TU Wien colors. +\DeclareOptionBeamer{outer}{\def\beamer@tuwOuter{#1}} +% Width of the sidebar. +\DeclareOptionBeamer{width}{\def\beamer@tuwWidth{#1}} +% Background image of TU Wien building on title page. +\newif\ifbeamer@tuwBackground +\DeclareOptionBeamer{tuw_background}{\beamer@tuwBackgroundtrue} +% Individual background image on title page. +\DeclareOptionBeamer{tuw_image}{\def\beamer@tuwImage{#1}} +% White logo (if tuw_image is dark the logo should be set to be white). +\newif\ifbeamer@tuwWhiteLogo +\DeclareOptionBeamer{tuw_whitelogo}{\beamer@tuwWhiteLogotrue} +% Print frame title beside the logo to save space. +\newif\ifbeamer@tuwFrametitleToTop +\DeclareOptionBeamer{tuw_frametitletotop}{\beamer@tuwFrametitleToToptrue} +% Second logo in case we need more than one +\DeclareOptionBeamer{second_logo}{\def\beamer@tuwSecondLogo{#1}} +\DeclareOptionBeamer{second_logo_width}{\def\beamer@tuwSecondLogoWidth{#1}} + +% defaults +\ExecuteOptionsBeamer{outer=default} +\ExecuteOptionsBeamer{width=1.6cm} +\ExecuteOptionsBeamer{font=\familydefault} +\beamer@tuwBackgroundfalse +\ExecuteOptionsBeamer{tuw_image=none} +\ExecuteOptionsBeamer{second_logo=none} +\beamer@tuwWhiteLogofalse +\beamer@tuwFrametitleToTopfalse + +\ProcessOptionsBeamer + +\ifx\beamer@tuwFont\beamer@tuwHelvetica +\RequirePackage{helvet} +\fi + +\mode<presentation> + +%%% colors +% For some reason the logo is not in TU-blue (0,102,153). The powerpoint +% presentation has TU-blue as background and the logo with a different color +% (doesn't look nice). We align the TU-blue to the logo, like in the CD manual. +\definecolor{tuwBlue}{RGB}{0,116,178} +\definecolor{tuwGray}{RGB}{102,102,102} +\definecolor{iceBlue}{RGB}{222,231,236} + +\def\tuwBlue{tuwBlue} +\def\tuwGray{tuwGray} +\def\iceBlue{iceBlue} +\def\tuwLightBlue{tuwBlue!20!white} +\def\tuwMediumBlue{tuwBlue!45!white} +\def\tuwDarkBlue{tuwBlue!70!black} +\def\alertred{red!50!black} + +% content page +\setbeamercolor{normal text}{fg=black,bg=white} +\setbeamercolor{alerted text}{fg=\alertred} +\setbeamercolor{structure}{fg=\tuwBlue} +\setbeamercolor{frametitle}{fg=black} + +\setbeamercolor{palette primary}{fg=\tuwDarkBlue,bg=\tuwLightBlue} +\setbeamercolor{palette secondary}{fg=\tuwBlue!50!black,bg=\tuwMediumBlue} +\setbeamercolor{palette tertiary}{fg=white,bg=\tuwBlue} + +\setbeamercolor{section in toc}{parent=normal text} +\setbeamercolor{subsection in toc}{parent=section in toc} + +\setbeamercolor{block title}{fg=white, bg=\tuwBlue} +\setbeamercolor{block title example}{fg=white, bg=\tuwBlue} +\setbeamercolor{block title alerted}{fg=white, bg=\alertred} +\setbeamercolor{block body}{bg=\iceBlue} +\setbeamercolor{block body example}{parent=block body} +\setbeamercolor{block body alerted}{parent=block body, fg=\alertred} + +\setbeamercolor{title in head/foot}{fg=\tuwBlue} +\setbeamercolor{page number in head/foot}{fg=\tuwBlue} +\setbeamercolor{footline}{fg=\tuwBlue} + +% color difference of default and other outer styles +\ifx\beamer@tuwOuter\beamer@tuwDefault +% default style - this is the CD of TU Wien +% title page +\setbeamercolor{title}{fg=white} +\setbeamercolor{subtitle}{fg=white} +\setbeamercolor{author}{fg=white} +\setbeamercolor{institute}{fg=white} +\setbeamercolor{date}{fg=white} +% content page +% keep defaults (black) +\else +% other outer styles (e.g., sidebar) +% title page +\setbeamercolor{title}{fg=\tuwGray} +\setbeamercolor{subtitle}{fg=\tuwGray} +\setbeamercolor{author}{fg=black} +\setbeamercolor{institute}{fg=black} +\setbeamercolor{date}{fg=black} +% content page +\setbeamercolor{frametitle}{fg=\tuwGray} +\setbeamercolor{headline}{fg=\tuwGray} +\setbeamercolor{footline}{fg=\tuwGray} +\fi + +% sidebar +\setbeamercolor{sidebar}{bg=\tuwBlue,fg=white} +\setbeamercolor{palette sidebar primary}{fg=\tuwDarkBlue,bg=\tuwLightBlue} +\setbeamercolor{palette sidebar secondary}{fg=\tuwDarkBlue,bg=\tuwLightBlue} +\setbeamercolor{palette sidebar tertiary}{fg=white,bg=\tuwBlue} +\setbeamercolor{title in sidebar}{fg=white,bg=\tuwBlue} +\setbeamercolor{section in sidebar}{fg=\tuwDarkBlue} +\setbeamercolor{section in sidebar shaded}{fg=white,bg=\tuwBlue} +\setbeamercolor{subsection in sidebar}{fg=\tuwDarkBlue} +\setbeamercolor{subsection in sidebar shaded}{fg=white,bg=\tuwBlue} + +%%% fonts + +% font weight +\setbeamerfont{title}{series=\bfseries} +\setbeamerfont{author}{series=\mdseries} +\setbeamerfont{institute}{series=\mdseries} +\setbeamerfont{date}{series=\mdseries} +\setbeamerfont{frametitle}{series=\mdseries} +\setbeamerfont{headline}{series=\mdseries} +\setbeamerfont{footline}{series=\mdseries} + +% font size difference of default and other outer styles +\ifx\beamer@tuwOuter\beamer@tuwDefault +% default style - this is the CD of TU Wien +\setbeamerfont{title}{size=\huge} +\setbeamerfont{author}{size=\normalsize} +\setbeamerfont{institute}{size=\normalsize} +\setbeamerfont{date}{size=\normalsize} +\setbeamerfont{frametitle}{size=\Large} +\setbeamerfont{framesubtitle}{size=\large} +\setbeamerfont{headline}{size=\scriptsize} +\setbeamerfont{footline}{size=\scriptsize} +\else +% other outer styles (e.g., sidebar) +% keep defaults +\fi + +\setbeamerfont{section in toc}{parent=normal text} +\setbeamerfont{subsection in toc}{parent=section in toc} + +% sidebar +\setbeamerfont{title in sidebar}{series=\bfseries} +\setbeamerfont{section in sidebar}{series=\bfseries,size=\tiny} +\setbeamerfont{subsection in sidebar}{size=\tiny} + +%%% outer +\setbeamersize{text margin left=1.2cm} +\setbeamersize{text margin right=1.5cm} +\beamertemplatenavigationsymbolsempty + + +\ifx\beamer@tuwOuter\beamer@tuwDefault +% default outher theme - this is the CD of TU Wien + +% background +\setbeamertemplate{background}{ + \begin{tikzpicture} + \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight); + % title page + \ifbeamer@tuwBackground % tu building background selected + \node[anchor=south west] (background) at (-0.15cm,-0.15cm) {\includegraphics[width=1.01\paperwidth]{TU_Background}}; + \else\ifx\beamer@tuwImage\beamer@tuwNoImage % no background image specified + \fill[white] (0,0) rectangle (\the\paperwidth,\the\paperheight); + \else % individual background image + \node[anchor=north west] (background) at (-0.15cm,-0.15cm) {\includegraphics[width=1.01\paperwidth]{\beamer@tuwImage}}; + \fi\fi + \fill[\tuwBlue, rounded corners=0.5cm] (-1cm,-1cm) rectangle (\paperwidth-0.5cm,\paperheight-3cm); + \ifbeamer@tuwWhiteLogo % white logo option specified + \node[anchor=north west] (logo) at (0.3cm,\paperheight-0.1cm) {\includegraphics[width=.5\textwidth]{\beamer@tuwLogoWhite}}; + \else + \node[anchor=north west] (logo) at (0.2cm,\paperheight-0.2cm) {\includegraphics[height=2cm]{\beamer@tuwLogo}}; + \fi + \ifx\beamer@tuwSecondLogo\beamer@tuwNoImage + \else + \node[anchor=north east] (logo2) at (\paperwidth-0.2cm,\paperheight-0.2cm) {\includegraphics[width=\beamer@tuwSecondLogoWidth]{\beamer@tuwSecondLogo}}; + \fi + % content page + \ifnum\thepage>1\relax% + \fill[\iceBlue] (0,0) rectangle (\the\paperwidth,\the\paperheight); + \fill[white, rounded corners=0.5cm] (-1cm,-1cm) rectangle(\paperwidth-0.4cm,\paperheight-0.8cm); + \node[anchor=west] (logo) at (0.3cm,\paperheight-0.4cm) {\includegraphics[height=0.5cm]{TU_Signet}}; + \fi + \end{tikzpicture} +} + +% title page +\def\beamer@titlepageLeft{1.6cm} +\setbeamertemplate{title page}{ + \vskip 4cm% + \begin{beamercolorbox}[leftskip=\beamer@titlepageLeft]{title}% + \usebeamerfont{title}\inserttitle% + \end{beamercolorbox}% + \vskip 0.5cm% + \begin{beamercolorbox}[leftskip=\beamer@titlepageLeft]{subtitle} + \usebeamerfont{subtitle}\insertsubtitle% + \end{beamercolorbox} + \vskip 0.25cm% + \vfill% + \begin{beamercolorbox}[leftskip=\beamer@titlepageLeft]{author} + \usebeamerfont{author}\insertauthor% + \end{beamercolorbox} + \begin{beamercolorbox}[leftskip=\beamer@titlepageLeft]{date} + \usebeamerfont{date}\insertdate% + \end{beamercolorbox} +} + +% frametitle +\setbeamertemplate{frametitle} +{% + \ifbeamer@tuwFrametitleToTop % frametitle should be printed beside the logo + % vbox to keep the baseline + \vbox{}\vskip -0.43cm% + \else + \vbox{}\vskip 0.7cm% + \fi + \begin{beamercolorbox}[leftskip=0cm]{frametitle} + \usebeamerfont{frametitle}\insertframetitle% + \ifbeamer@tuwFrametitleToTop + \vbox{}\vskip 0.3cm% + \else + \vbox{}\vskip 0.2cm% + \fi + \usebeamerfont{framesubtitle}\insertframesubtitle% + \end{beamercolorbox} +} + +% footline +\setbeamertemplate{footline}{% + \vspace{0.1cm} + \ifnum\thepage>1 + \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex]{footline} + \hskip 1.2cm% + \usebeamerfont{footline}\insertshortdate% + \hfill% + \insertshorttitle, \insertshortauthor% + \hfill% + \insertframenumber\:/\:\inserttotalframenumber% + \hspace*{1.5cm}% + \end{beamercolorbox} + \else + \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,center]{}% + % empty environment to raise height + \end{beamercolorbox} + \fi + \vspace{0.1cm} +} + +\else\ifx\beamer@tuwOuter\beamer@tuwSidebar +% sidebar outer theme +\useoutertheme[width=\beamer@tuwWidth,height=0pt]{\beamer@tuwOuter} + +% footline +\setbeamertemplate{footline}{ + \ifnum\thepage>1 + \vspace{-1cm} + \hfill{\scriptsize\insertframenumber\:/\:\inserttotalframenumber~~} + \vspace{0.1cm} + \fi +} +\else +\useoutertheme{\beamer@tuwOuter} +\fi\fi % if outer=default or outer=sidebar + + +%%% inner +\ifx\beamer@tuwOuter\beamer@tuwDefault +\setbeamertemplate{itemize items}[circle] +\else +% defaults +\fi % if outer=default + +\setlength{\parskip}{6pt} + +% blocks +\setbeamertemplate{blocks}[rounded] +\pgfdeclareverticalshading{bmb@transition}{\the\paperwidth}{color(0pt)=(\iceBlue); color(3.0pt)=(\iceBlue)} + +\setbeamercovered{invisible} + +% emphasize +\renewcommand<>{\emph}[1]{{\only#2{\color{\tuwBlue}}#1}} + +\hypersetup{colorlinks=true,linkcolor=fg,citecolor=\tuwGray,urlcolor=\tuwGray} + +\mode<all> diff --git a/ecosystem/calling-external.png b/ecosystem/calling-external.png new file mode 100644 index 0000000000000000000000000000000000000000..799f934f9bc415279705cd43abce2d0835481e04 Binary files /dev/null and b/ecosystem/calling-external.png differ diff --git a/ecosystem/cuddlyferris.png b/ecosystem/cuddlyferris.png new file mode 100644 index 0000000000000000000000000000000000000000..755ac4047c5a04dba503aa84b60f1fa6403b3f45 Binary files /dev/null and b/ecosystem/cuddlyferris.png differ diff --git a/ecosystem/desired-admired-2023.png b/ecosystem/desired-admired-2023.png new file mode 100644 index 0000000000000000000000000000000000000000..4490c3a3ea88a62cfe0dd9c557e49a2e89859e15 Binary files /dev/null and b/ecosystem/desired-admired-2023.png differ diff --git a/ecosystem/desired-admired-2024.png b/ecosystem/desired-admired-2024.png new file mode 100644 index 0000000000000000000000000000000000000000..66a20303bc0bb618ca78ae09b31db8579aeffc4b Binary files /dev/null and b/ecosystem/desired-admired-2024.png differ diff --git a/ecosystem/ferris.png b/ecosystem/ferris.png new file mode 100644 index 0000000000000000000000000000000000000000..830a6a4fad101c63b922411bd18ba8e98e393815 Binary files /dev/null and b/ecosystem/ferris.png differ diff --git a/ecosystem/githut-statistics.png b/ecosystem/githut-statistics.png new file mode 100644 index 0000000000000000000000000000000000000000..efde1c1a729b1dc13db7706b05a2e1447f4cc1c9 Binary files /dev/null and b/ecosystem/githut-statistics.png differ diff --git a/ecosystem/openhub-statistics.png b/ecosystem/openhub-statistics.png new file mode 100644 index 0000000000000000000000000000000000000000..d7ffd558091137319b80f7fbe5bae95eb135b90a Binary files /dev/null and b/ecosystem/openhub-statistics.png differ diff --git a/ecosystem/rust-in-firefox.png b/ecosystem/rust-in-firefox.png new file mode 100644 index 0000000000000000000000000000000000000000..442151ca28ced534fd661ce2c9f6a974ca7197f2 Binary files /dev/null and b/ecosystem/rust-in-firefox.png differ diff --git a/ecosystem/rust-logo-256x256.png b/ecosystem/rust-logo-256x256.png new file mode 100644 index 0000000000000000000000000000000000000000..f5ddd63febf54d014954e1f0b9ae902291269a28 Binary files /dev/null and b/ecosystem/rust-logo-256x256.png differ diff --git a/ecosystem/rusttut.tex b/ecosystem/rusttut.tex new file mode 100644 index 0000000000000000000000000000000000000000..21d3334649bec046c0d5d382a634aa96bdbc67c0 --- /dev/null +++ b/ecosystem/rusttut.tex @@ -0,0 +1,427 @@ +\documentclass{beamer} + +\usepackage{beamerthemetuw} +\usepackage{enumitem} +\setbeamercovered{transparent} + + +\title{Rust Ecosystem} +\subtitle{Adoption, Tooling, Community and Governance} +\author{Florian Sextl, Mark Chimes, Adrian Rebola-Pardo} +\date{\today} + +\begin{document} + +\begin{frame} + \titlepage +\end{frame} + +\begin{frame}{Outline} +\tableofcontents +\end{frame} + +\section{Adoption, Popularity, and Community} +%\sectionpage + +%\begin{frame}{Rust in Production - Do You Use Rust Code?} +%\begin{block}{} +%\begin{itemize} +% \item \textbf{Firefox} +% 12\% of code. Migrated server push-notification architecture. +% \item \textbf{Rust-For-Linux Project} +% Comprises 0.125\% (1/800th) of Linux kernel +% \item \textbf{Ripgrep} +% Powers text search in VS Code +% \item \textbf{Dropbox} +% components of core file-storage system +% \item \textbf{Cloudflare} +% HTTP proxy (Pingora), DNS stack, DDoS +% \item \textbf{AWS} +% Firecracker virtualization tech +% \item \textbf{Git} Added first Rust code a few days ago: +% libgit-sys and libgit wrappers, and Rust Foreign-Language Interface +% \item \textbf{Ubuntu} plans to replace GNU utilities with Rust implementations +% (e.g. \texttt{ls, cp, find, diff}) +%\end{itemize} +%\end{block} +%\end{frame} + +\begin{frame}{Rust in Production - Do You Use Rust Code?} +\begin{block}{} + +\begin{itemize} + \item<2-> \textbf{Firefox} + 12\% of code. Migrated server push-notification architecture. + \item<3-> \textbf{Rust-For-Linux Project} + Comprises 0.125\% (1/800th) of Linux kernel + \item<4-> \textbf{Ripgrep} + Powers text search in VS Code + \item<5-> \textbf{Dropbox} + components of core file-storage system + \item<6-> \textbf{Cloudflare} + HTTP proxy (Pingora), DNS stack, DDoS + \item<7-> \textbf{AWS} + Firecracker virtualization tech + \item<8-> \textbf{Git} Added first Rust code a few days ago: + libgit-sys and libgit wrappers, and Rust Foreign-Language Interface + \item<9-> \textbf{Ubuntu} plans to replace GNU utilities with Rust implementations + (e.g. \texttt{ls, cp, find, diff}) +\end{itemize} +\end{block} +\end{frame} + + +\begin{frame}{} +\begin{center} +\includegraphics[scale=0.45]{rust-in-firefox} +\end{center} +\url{https://4e6.github.io/firefox-lang-stats/} +\end{frame} + +\begin{frame}{Openhub Rust Language Statistics} + +\begin{center} +\includegraphics[scale=0.4]{openhub-statistics} +\end{center} + +\url{https://openhub.net/languages/rust} + + +\url{https://madnight.github.io/githut/\#/pull_requests/2024/1} +(next page) + +\end{frame} + +\begin{frame}{GitHut 2.0 - Github Language Stats } +\begin{center} +\includegraphics[scale=0.4]{githut-statistics} +\end{center} +\end{frame} + + +\begin{frame}{Very Popular With Programmers} + + \begin{block}{Stack Overflow Survey} + + Rust is most ``admired", and 6th-most ``desired" + + \end{block} + + + \begin{itemize} + \pause + \item \textbf{Admired:} Already use, want to keep using + \pause + \item \textbf{Desired:} Don't use yet, but want to + \end{itemize} + +\end{frame} + +\begin{frame}{Popularity 2023} +\includegraphics[scale=0.2]{desired-admired-2023} +Admired: 85\% +Desired: 31\%\\ +\end{frame} + +\begin{frame}{Popularity 2024} +\includegraphics[scale=0.35]{desired-admired-2024} +\end{frame} + + +\begin{frame}{Community} +\begin{block}{} +\begin{quote} +``This is by far the least toxic, most engaging and the nicest dev community I've EVER seen." +\end{quote} +\end{block} +- Reddit user \emph{u/hussainsonreddit} on the Rust subreddit\footnote{\url{https://www.reddit.com/r/rust/comments/ofoi4l/best_developer_community_ive_seen/}} +\end{frame} + + + +\begin{frame}{Community} +\begin{block}{Rust enthusiasts are ``Rustaceans"} +\begin{itemize}[label=$\bullet$] +\item Official Rust forums +\item Discord +\item Zulip +\item Reddit +\end{itemize} +\end{block} +\begin{center} +\includegraphics[scale=0.1]{cuddlyferris} + +Ferris, the Unofficial Rust Mascot +\end{center} +\end{frame} + + +\begin{frame}{Others Interested in Rust} +\pause +\begin{block}{Politically} +February 2024, United States White House issued a report urging that all programmers move to memory-safe programming; mentions Rust by name. +\end{block} +\pause +\begin{block}{Commercially} +November 2024, Amazon issued challenge to formally verify safety of Rust standard library +\end{block} +\pause +\begin{block}{Academia} +Interesting academically: RustBelt project, modelling memory with separation logic, +Stacked Borrows and Tree Borrows aliasing models... +\end{block} +\end{frame} + +\section{Tooling and Compilation} +%\sectionpage +%\begin{frame}{Rust Tooling and Compilation} +%\begin{center} +%How does it \emph{feel} to use Rust in practice, compared to other programming languages? +%\end{center} +%\end{frame} \section{Adoption and Popularity} + + +\begin{frame}{Standard Tooling} +\vspace{-3em} +\begin{block} +{Basic functionality included by default} +\begin{itemize} [label=$\bullet$] +\item<2-> compilation \& build files +\item<3-> tests +\item<4-> dependency \& versioning management +\item<5-> documentation generation +\end{itemize} +\end{block} + +\pause \pause \pause \pause \pause +Compare to Python dependency hell: \\ +pip, pip-tools, wheel, pyenv, conda, asdf, venv, virtualenv, pipenv, poetry, pypi, flit, conda-forge, anaconda-repo \ldots +\end{frame} + +%\begin{frame}{Basic Tools} +%\begin{block}{} +%\begin{tabular}{@{}l l@{}} +%\textbf{rustc} & The compiler \\ +%\textbf{Cargo} & Downloads dependencies, compiles packages, +%\\ & uploads packages, and makes distributables\\ +%\textbf{crates.io} & Package registry \\ +%\textbf{rustup} & Installs toolchain and manages compiler versions \\ +%\end{tabular} +%\end{block} +%\end{frame} + +\begin{frame}{Basic Tools} +\begin{block}{} +\pause +\begin{tabular}{@{}l l@{}} +\textbf{rustc} & The compiler \\ \pause +\textbf{Cargo} & Downloads dependencies, compiles packages, \\ + & uploads packages, and makes distributables\\ \pause +\textbf{crates.io} & Package registry \\ \pause +\textbf{rustup} & Installs toolchain and manages compiler versions \\ +\end{tabular} +\end{block} +\end{frame} + + +\begin{frame}{Getting Started: Running Rustup} +This installs Rustup, Cargo, the Rust compiler etc. Easy! +\pause +\begin{block}{$\geq$ Debian 13 (trixie), Ubuntu 24.04 (noble)} +\texttt{sudo apt install rustup} +\end{block} +\pause +\begin{block}{Other Linux / Mac} +\texttt{curl --proto `=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh} +\end{block} +\pause +\begin{block}{Windows} +Download and run rustup-init.exe (Also requires installing Visual Studio for linker and Windows API) +\end{block} +\end{frame} + +\begin{frame}{Example Cargo Commands} +\begin{block}{} +\pause +\begin{tabular}{@{}l l@{}} +\texttt{cargo new} & Create a new Rust project \\ \pause +\texttt{cargo run} & Build and run \\ \pause +\texttt{cargo build} & Build without running \\ \pause +\texttt{cargo test} & Run tests \\ \pause +\texttt{cargo update} & Update dependencies\\ +\end{tabular} +\end{block} + \pause +Also many useful flags: +\begin{block}{} +\texttt{cargo build --release} \hspace{3em} Build optimized version +\end{block} +\end{frame} + +\begin{frame}{Other Tooling} +\begin{block}{Rust Tools} +\pause + +\begin{tabular}{@{}l l@{}} +\textbf{rust-analyzer} & language server (e.g. VS Code plugin) \\ \pause +\textbf{clippy} & Linter (correctness, suspicious, style, \\ + & complexity, performance) \\ \pause +\textbf{Rustfmt} & auto-format code \\ \pause +\textbf{MIRI} & Analyze unsafe code \\ \pause +\textbf{rustdoc} & Autogenerate documentation (HTML, CSS, \\ + & and JavaScript)\\ \pause +\textbf{cargo publish} & upload package to crates.io \\ +\end{tabular} +\end{block} +\end{frame} + + + +\begin{frame}{Compilation Times} +\pause +Common criticism of Rust is compilation times. \pause + +Much of this criticism is older; lots of improvement made \pause + +Usual causes: Monomorphization, Re-compilation, Detailed compiler error messages \pause + +What can you do to speed things up?\\ compilation flags: incremental, opt-level +\pause + +Still improving + +\end{frame} + + +\begin{frame}{Compiler Development} +\begin{itemize} [label=$\bullet$] +\item<2-> +Rust has a very strict stability policy and releases every six weeks. (Run +\texttt{rustup update} to update) +\item<3-> +Many features only available on \emph{nightly} toolchain +\item<4-> +Each major decision in Rust starts as Request for Comments (RFC). +\end{itemize} +\end{frame} + + +\section{Governance, Licensing, and History} +%\sectionpage + + + + +\begin{frame}{Governance} + +\url{https://github.com/rust-lang/rfcs/blob/master/text/1068-rust-governance.md} +\begin{block}{} +Rust is governed by a core team, [which]: +\begin{itemize} [label=$\bullet$] +\item Sets the overall direction and vision for the project; +\item Sets the priorities and release schedule; +\item Makes final decisions on RFCs. +\end{itemize} +\end{block} +\end{frame} + + + +\begin{frame}{Licensing} +Open source, very permissive licenses. + + +\begin{block}{Rust Programming Language and official projects} +\begin{itemize}[label=$\bullet$] +\item +Apache License, Version 2. +\item +MIT license +\end{itemize} +\end{block} + + +\end{frame} + +\begin{frame}{Image Licensing} + +Rust and Cargo logos are owned by Mozilla and distributed under the terms of the Creative Commons Attribution license \url{https://creativecommons.org/licenses/by/4.0/} +\begin{center} +\includegraphics[scale=0.4]{rust-logo-256x256} +\includegraphics[scale=0.4]{Cargo-Logo-Small} +\end{center} +\end{frame} + + + + +\begin{frame}{History} + \begin{itemize} + \item[2006]<2-> Personal project by \textbf{Graydon Hoare} working at Mozilla + \item[2009]<3-> Officially sponsored by Mozilla + \item[2013]<4-> Hoare steps down, Rust Core Team formed + \item[2014]<5-> Request for Comments (RFC) process introduced + \item[2015]<6-> Rust 1.0 released + \item[2016]<7-> Rust Mid-Level Intermediate Language (MIR) introduced + \item[2022]<8-> Supported in Linux Kernel + \item[2024]<9-> First Linux (network) drivers written in Rust accepted + \end{itemize} +\end{frame} + +\begin{frame} {Fun Fact} +\begin{block}{} +Rust is named after the group of fungal plant pathogens, which Hoare calls “over-engineered for survival.†+\end{block} +\begin{center} +\includegraphics[scale=0.3]{Wheat_leaf_rust_on_wheat} +\end{center} +\end{frame} + + +\section{Extra Notes} +\sectionpage + + + + +\begin{frame}{C and Rust Interop} +Can you call C code from Rust? Yes! + +\includegraphics[scale=0.4]{calling-external} + +\url{https://doc.rust-lang.org/book/ch20-01-unsafe-rust.html} + +(Requires creating foreign-function-interface (FFI), +wrapping the exposed C API for use with Rust, converting types, and pre-compiling the C code) +\end{frame} + +\begin{frame}{Rust Verification} + \begin{itemize} + \item \textbf{Verified-Rust Tools:} + \begin{itemize} + \item \href{https://github.com/verus-lang/verus}{Verus}: Verified Rust for low-level systems code + \item \href{https://github.com/flux-rs/flux}{Flux}: Refinement Types for Rust + \item \href{https://github.com/viperproject/prusti-dev}{Prusti}: Static verifier for Rust (Viper-based) + \item \href{https://github.com/dafny-lang/dafny/issues/5561}{Dafny-Rust Compiler}: Experimental, partial support + \end{itemize} + \item \textbf{Creusot:} Automated proof of code correctness + \begin{itemize} + \item CreuSAT: Verified SAT solver written in Rust and verified with Creusot + \end{itemize} + \end{itemize} + \end{frame} + + \begin{frame}{Rust Verification} + \begin{itemize} + \item \textbf{Aeneas:} Translates MIR to functional Coq/F* + \item \textbf{Kani:} Model checking + \item \textbf{Property-Based Testing:} + \begin{itemize} + \item \href{https://github.com/BurntSushi/quickcheck}{QuickCheck}: Automated property testing + \item \href{https://github.com/proptest-rs/proptest}{Proptest}: Hypothesis-like property testing + \end{itemize} + \item \textbf{Gilian Rust:} Hybrid approach to semi-automated Rust verification + \end{itemize} +\end{frame} + +\end{document}