oxilean_codegen/runtime_codegen/
runtimeconfig_traits.rs1use crate::lcnf::*;
13use crate::native_backend::*;
14
15use super::types::{AllocStrategy, ClosureRepr, RcStrategy, RuntimeConfig};
16use std::fmt;
17
18impl Default for RuntimeConfig {
19 fn default() -> Self {
20 RuntimeConfig {
21 rc_strategy: RcStrategy::Standard,
22 alloc_strategy: AllocStrategy::LeanRuntime,
23 closure_repr: ClosureRepr::Standard,
24 debug_checks: false,
25 thread_safe: false,
26 }
27 }
28}
29
30impl fmt::Display for RuntimeConfig {
31 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
32 write!(
33 f,
34 "RuntimeConfig {{ rc={:?}, alloc={:?}, closure={:?}, debug={}, thread_safe={} }}",
35 self.rc_strategy,
36 self.alloc_strategy,
37 self.closure_repr,
38 self.debug_checks,
39 self.thread_safe,
40 )
41 }
42}