Rust does not have a single built-in machine learning library; instead, you use community crates like linfa for general ML or burn for deep learning. Add the crate to your Cargo.toml and import it in your code to start building models.
[dependencies]
linfa = "0.7"
use linfa::traits::SupervisedLearner;
fn main() {
// Initialize a model and train it
let model = linfa::linear_regression::LinearRegression::default();
// model.fit(&dataset).unwrap();
}