# Cargo & Ecosystem (Rust) > Comandi Cargo, dipendenze, feature, build script, workspace, crates.io, documentazione - 18 domande da colloquio - Mid-Level - [Domande da colloquio: Rust](https://sharpskill.dev/it/technologies/rust/domande-colloquio.md) ## 1. Quale comando Cargo compila un progetto senza creare un eseguibile finale? **Risposta** Il comando cargo check compila il codice per verificare gli errori senza produrre un binario finale. Questo comando è molto più veloce di cargo build perché salta il passaggio di generazione del codice macchina. È ideale durante lo sviluppo per validare rapidamente che il codice compili correttamente. ## 2. Come specificare una dipendenza con una versione minima di 1.2.0 ma inferiore a 2.0.0 in Cargo.toml? **Risposta** La sintassi serde = "1.2" usa il versionamento semantico predefinito di Cargo. Significa che Cargo accetterà qualsiasi versione compatibile con 1.2.0, ovvero >= 1.2.0 e < 2.0.0. Questa notazione è equivalente a serde = "^1.2" ed è il modo idiomatico di specificare le dipendenze in Rust. ## 3. Qual è il ruolo del file Cargo.lock in un progetto Rust? **Risposta** Il file Cargo.lock registra le versioni esatte di tutte le dipendenze usate durante l'ultima compilazione riuscita. Questo garantisce build riproducibili usando esattamente le stesse versioni su macchine diverse. Per le librerie, questo file viene solitamente ignorato in git, ma per i binari e le applicazioni dovrebbe essere versionato. ## Altre 15 domande disponibili - Come definire una feature opzionale in Cargo.toml? - A cosa serve il file build.rs nella radice di un progetto Cargo? Registrati gratis: https://sharpskill.dev/it/login ## Altri argomenti di colloquio Rust - [Fondamenti di Rust](https://sharpskill.dev/it/technologies/rust/domande-colloquio/rust-basics.md): 25 domande, Junior - [Ownership & Borrowing](https://sharpskill.dev/it/technologies/rust/domande-colloquio/ownership-borrowing.md): 22 domande, Junior - [Structs & Enums](https://sharpskill.dev/it/technologies/rust/domande-colloquio/structs-enums.md): 20 domande, Junior - [Gestione degli errori](https://sharpskill.dev/it/technologies/rust/domande-colloquio/error-handling.md): 18 domande, Junior - [Collezioni](https://sharpskill.dev/it/technologies/rust/domande-colloquio/collections.md): 20 domande, Junior - [Moduli e package](https://sharpskill.dev/it/technologies/rust/domande-colloquio/modules-packages.md): 18 domande, Junior - [Traits](https://sharpskill.dev/it/technologies/rust/domande-colloquio/traits.md): 22 domande, Mid-Level - [Generics](https://sharpskill.dev/it/technologies/rust/domande-colloquio/generics.md): 20 domande, Mid-Level - [Lifetimes](https://sharpskill.dev/it/technologies/rust/domande-colloquio/lifetimes.md): 20 domande, Mid-Level - [Iterators & Closures](https://sharpskill.dev/it/technologies/rust/domande-colloquio/iterators-closures.md): 22 domande, Mid-Level - [Smart Pointers](https://sharpskill.dev/it/technologies/rust/domande-colloquio/smart-pointers.md): 22 domande, Mid-Level - [Concurrency Basics](https://sharpskill.dev/it/technologies/rust/domande-colloquio/concurrency-basics.md): 20 domande, Mid-Level - [async/await](https://sharpskill.dev/it/technologies/rust/domande-colloquio/async-await.md): 22 domande, Mid-Level - [Testing](https://sharpskill.dev/it/technologies/rust/domande-colloquio/testing.md): 18 domande, Mid-Level - [Pattern Matching](https://sharpskill.dev/it/technologies/rust/domande-colloquio/pattern-matching.md): 18 domande, Mid-Level - [Macro](https://sharpskill.dev/it/technologies/rust/domande-colloquio/macros.md): 20 domande, Mid-Level - [Serde e serializzazione](https://sharpskill.dev/it/technologies/rust/domande-colloquio/serde-serialization.md): 20 domande, Mid-Level - [Unsafe Rust](https://sharpskill.dev/it/technologies/rust/domande-colloquio/unsafe-rust.md): 20 domande, Senior - [Trait avanzati](https://sharpskill.dev/it/technologies/rust/domande-colloquio/advanced-traits.md): 22 domande, Senior - [Lifetime Avanzati](https://sharpskill.dev/it/technologies/rust/domande-colloquio/advanced-lifetimes.md): 20 domande, Senior - [Type System](https://sharpskill.dev/it/technologies/rust/domande-colloquio/type-system.md): 20 domande, Senior - [Tokio & Async I/O](https://sharpskill.dev/it/technologies/rust/domande-colloquio/tokio-async.md): 22 domande, Senior - [Ottimizzazione delle Prestazioni](https://sharpskill.dev/it/technologies/rust/domande-colloquio/performance-optimization.md): 20 domande, Senior - [Memory Management](https://sharpskill.dev/it/technologies/rust/domande-colloquio/memory-management.md): 20 domande, Senior - [Web Frameworks](https://sharpskill.dev/it/technologies/rust/domande-colloquio/web-frameworks.md): 22 domande, Senior - [Database Integration](https://sharpskill.dev/it/technologies/rust/domande-colloquio/database-integration.md): 20 domande, Senior - [Design Pattern in Rust](https://sharpskill.dev/it/technologies/rust/domande-colloquio/design-patterns.md): 20 domande, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/it/technologies/rust/domande-colloquio/cargo-ecosystem