January 2018
Beginner to intermediate
454 pages
10h 8m
English
To go back to our Cargo.toml file, it's also possible to use crates directly from their repositories; you just have to specify this when adding the dependency in your Cargo.toml file. Generally, the published version is less advanced than the one on the corresponding repository but will be more stable.
So for example, if we want to use the repository version for the sdl2 crate, we need to write in our Cargo.toml file:
[dependencies]
sdl2 = { git = "https://github.com/Rust-SDL2/rust-sdl2" }
Easy right? Cargo can also start tests or benchmarks, install binaries, handle special builds through a build file (by default in build.rs), or handle features (we'll come back to this point later in this part).
To put it simply, ...
Read now
Unlock full access