zinkc/
config.rs

1//! Zink compiler configuration.
2
3#[cfg(feature = "cli")]
4use ccli::clap;
5
6/// Zink compiler configuration.
7#[derive(Debug, Default)]
8#[cfg_attr(feature = "cli", derive(clap::Parser))]
9#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
10pub struct Config {
11    /// If enable dispatcher.
12    #[cfg_attr(feature = "cli", clap(long))]
13    pub dispatcher: bool,
14}
15
16impl Config {
17    /// With dispatcher value.
18    pub fn dispatcher(mut self, dispatcher: bool) -> Self {
19        self.dispatcher = dispatcher;
20        self
21    }
22}