blob: 732566d29acaa2c337b4c0c2546ed61ddd9b0bcb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
namespace;
include rt;
// embed declarations at the top level, the form stage 0 compiles into run-only images.
embed "tests/data/embed/text.txt" as text;
embed "tests/data/embed/answer.bin" as int answer;
embed "tests/data/embed/bytes.bin" as u8[] bytes;
embed "tests/data/embed/bytes.bin" as i8[8] signed;
embed "tests/data/embed/text.txt" as char* chars;
embed "tests/data/embed/bytes.bin" as char[] cs;
embed "tests/data/embed/shorts.bin" as u16[] shorts;
fn main() {
rt.put_s(text); rt.put_c(32);
rt.put_n(answer); rt.put_c(32);
rt.put_n(bytes[4]); rt.put_c(32);
rt.put_n(signed[4]); rt.put_c(32); rt.put_n(signed[7]); rt.put_c(32);
rt.put_n(chars[6]); rt.put_c(32);
rt.put_n(cs[4]); rt.put_c(32);
rt.put_n(shorts[0] + shorts[1] * 10 + shorts[2] * 100); rt.put_c(10);
return 0;
}
|