Slide 1

Slide 1 text

Rustup, Cargo and Cross-compiling Rust programs Kaustav Das Modak | @kaustavdm

Slide 2

Slide 2 text

https://rustup.rs Toolchain manager for Rust

Slide 3

Slide 3 text

$ rustup toolchain install nightly $ rustup toolchain list Install multiple rustc

Slide 4

Slide 4 text

$ rustup run nightly rustc hello.rs $ rustup run stable rustc hello.rs Compile with multiple rustc versions

Slide 5

Slide 5 text

$ rustup target list $ rustup target add Add other compile targets

Slide 6

Slide 6 text

$ rustup update $ rustup update nightly Keep updated

Slide 7

Slide 7 text

$ curl https://sh.rustup.rs -sSf | sh Install rustup and play around

Slide 8

Slide 8 text

$ cargo Manage dependencies & builds

Slide 9

Slide 9 text

$ cargo new hello --bin Create a new cargo project

Slide 10

Slide 10 text

$ cargo build $ cargo run Build (run) the project

Slide 11

Slide 11 text

$ cargo install Install from crates.io

Slide 12

Slide 12 text

$ cargo build Dependencies are fetched and built

Slide 13

Slide 13 text

$ cargo build Dependencies are fetched and built

Slide 14

Slide 14 text

Cross-compiling add rustc target install proper linker tell cargo about the linker cargo build --target=

Slide 15

Slide 15 text

Thanks!