22 lines
1.2 KiB
Markdown
22 lines
1.2 KiB
Markdown
# Rust installieren
|
|
- Für Unix basierte Betriebssysteme:
|
|
```bash
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
```
|
|
|
|
- Für Windows: https://rustup.rs
|
|
|
|
# Wichtige Cargo Befehle
|
|
| Befehl | Nutzen |
|
|
| ------------------------- | ------------------------------------------------- |
|
|
| `cargo new <projectname>` | Neues Binary-Projekt erstellen |
|
|
| `cargo build` | Debug Build |
|
|
| `cargon run` | Builden und Runnen |
|
|
| `cargo test` | Tests ausführen |
|
|
| `cargo init` | Aktuellen Ordner als Cargo-Projekt initialisieren |
|
|
| `cargo add` | Abhängigkeiten zu `Cargo.toml` hinzufügen |
|
|
| `cargo remove` | Abhängigkeiten aus `Cargo.toml` entfernen |
|
|
| `cargo tree` | Abhängigkeitsbaum hinzufügen |
|
|
| `cargo fmt` | Code automatisch formattieren |
|
|
| `cargo clippy` | Warnungen und Verbesserungsvorschläge |
|