1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//! Zink compiler configuration.

#[cfg(feature = "cli")]
use ccli::clap;

/// Zink compiler configuration.
#[derive(Debug, Default)]
#[cfg_attr(feature = "cli", derive(clap::Parser))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Config {
    /// If enable dispatcher.
    pub dispatcher: bool,
}

impl Config {
    /// With dispatcher value.
    pub fn dispatcher(mut self, dispatcher: bool) -> Self {
        self.dispatcher = dispatcher;
        self
    }
}