1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/// The runtime configuration of the execution engine
#[derive(Debug, Copy, Clone, Default)]
pub struct EngineConfig {
    // feature flags go here
    use_system_contracts: bool,
    highway: bool,
}

impl EngineConfig {
    /// Creates a new engine configuration with default parameters.
    pub fn new() -> EngineConfig {
        Default::default()
    }

    pub fn use_system_contracts(self) -> bool {
        self.use_system_contracts
    }

    pub fn with_use_system_contracts(mut self, use_system_contracts: bool) -> EngineConfig {
        self.use_system_contracts = use_system_contracts;
        self
    }

    pub fn highway(self) -> bool {
        self.highway
    }

    pub fn with_highway(mut self, highway: bool) -> EngineConfig {
        self.highway = highway;
        self
    }
}