assemble_rust/
extensions.rs

1//! Contains rust related extensions
2
3use crate::toolchain::Toolchain;
4
5use assemble_core::lazy_evaluation::Prop;
6
7/// The rust plugin extension
8#[derive(Debug)]
9pub struct RustPluginExtension {
10    /// The default toolchain to use with the rust executables
11    pub toolchain: Prop<Toolchain>,
12}
13
14impl RustPluginExtension {
15    /// Creates a new instance of a rust extension
16    pub fn new() -> Self {
17        let mut extension = Self {
18            toolchain: Prop::with_name("toolchain"),
19        };
20        extension.toolchain.set(Toolchain::stable()).unwrap();
21        extension
22    }
23}