1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use PREAMBLE;
use config::Config;
use instruction::Instruction;
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Program {
pub preamble: String,
pub version: String,
pub config: Config,
pub instructions: Vec<Instruction>,
}
impl Default for Program {
fn default() -> Self {
Program {
preamble: String::from(PREAMBLE),
version: String::from(env!("CARGO_PKG_VERSION")),
config: Default::default(),
instructions: Default::default(),
}
}
}