Diapositivas
adrianjdelgado.com/2024/rust-bridge-2 █▀▀▀▀▀█ ▀▀▀█▄▄▀ ▀▄▀▄▀ █▀▀▀▀▀█
█ ███ █ ▀▄█ █▀▀ ▄▀▄█ █ ███ █
█ ▀▀▀ █ ▄▀█▀▄▀ ▀▀█▀ █ ▀▀▀ █
▀▀▀▀▀▀▀ █▄▀ █▄█▄▀ ▀▄▀ ▀▀▀▀▀▀▀
██ ▀█▄▀ ▄▀▄ ▀ ▀█ █▄█ ▀▄▄ ▄▄▀
██ ▀▀▀█▄▀ ▀▀▀▀▀▄ █▄▄▀▄▀ ▄
█ ▀▄ █▀▄▀▀█ ▄ ▄█▄▄▄▀▀ ██▄▄▄▄█
█▀▄▄█▄▀▄▄█ ▄▀ ██ █▀ ▄ █ █
▄▄▀ ▀▀▀▄▄▄ █▀▀ █▀ █▄█ ▄▀▄▄
██▄ ▄█▀ ▀█▄▀█▄█▄ █▀▀▄███▄ ▀
▀▀▀▀ ▀▀ █ ▀█ █▄█▀▀ █▀▀▀██▀▀
█▀▀▀▀▀█ ▄▀█▀▄▀ ▄███ ▀ █▀ ▄▄
█ ███ █ ██▀█▄▄▄█ ▀▀██▀▀▀▀ ▄
█ ▀▀▀ █ ▄▀█ ▀▀██ █ █▄██▄█▀█
▀▀▀▀▀▀▀ ▀ ▀▀▀▀▀ ▀▀▀▀ ▀▀
Herramientas
Rust | Python | Node | Descripción |
rustup | rye | nvm | Version manager |
cargo | pip | npm | Dependency manager |
clippy | ruff | eslint | Linter |
rustfmt | black | prettier | Formatter |
Rustup
rustup update
rustup install nightly|1.57
rustup show
rustup doc
Comandos comúnes en Cargo
cargo new
cargo init
cargo add <crate>
cargo rm <crate>
cargo install <app>
cargo build [--release]
cargo run [--release]
cargo test
cargo bench
Clippy
cargo clippy
cargo clippy --fix
Rustfmt
cargo fmt
cargo fmt --check
Estructuras de datos
Vec<T>
HashMap<K,V>
HashSet<V>
Slices
Vec<u8>
vs &[u8]
String
vs &str