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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
pub const FIZZBUZZ_ASM: &str = include_str!("fizzbuzz.asm");
pub const FIZZBUZZ_BIN: &[u8] = include_bytes!("fizzbuzz.bin");
pub const HELLO_ZEERUST_ASM: &str = include_str!("zeerust.asm");
pub const HELLO_ZEERUST_BIN: &[u8] = include_bytes!("zeerust.bin");
pub const HELLO_WORLD_ASM: &str = include_str!("hello_world.asm");
pub const HELLO_WORLD_BIN: &[u8] = include_bytes!("hello_world.bin");
pub const COUNTDOWN_ASM: &str = include_str!("countdown.asm");
pub const COUNTDOWN_BIN: &[u8] = include_bytes!("countdown.bin");
pub struct Example {
pub name: &'static str,
pub assembly: &'static str,
pub binary: &'static [u8],
}
pub const EXAMPLES: &[Example] = &[
Example {
name: "fizzbuzz",
assembly: FIZZBUZZ_ASM,
binary: FIZZBUZZ_BIN,
},
Example {
name: "hello zeerust",
assembly: HELLO_ZEERUST_ASM,
binary: HELLO_ZEERUST_BIN,
},
Example {
name: "hello world",
assembly: HELLO_WORLD_ASM,
binary: HELLO_WORLD_BIN,
},
Example {
name: "countdown",
assembly: COUNTDOWN_ASM,
binary: COUNTDOWN_BIN,
},
];