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
50
51
52
#![feature(allow_internal_unstable)]
#![feature(try_trait)]
#![feature(arbitrary_enum_discriminant)]
#![cfg_attr(not(test), no_std)]
#[macro_use]
extern crate arrayref;
use error::*;
pub const FUNC_ID_LEN: usize = 16;
pub type FuncId = arrayvec::ArrayString<[u8; FUNC_ID_LEN]>;
extern crate alloc;
extern crate core;
#[macro_export]
#[allow_internal_unstable(print_internals, format_args_nl)]
macro_rules! debug {
() => ({
#[cfg(any(feature="debug",test))]{
$crate::std::print!("\n");
}
});
($($arg:tt)*) => ({
#[cfg(any(feature="debug",test))]{
{
std::io::_print(std::format_args_nl!($($arg)*));
}
}
})
}
#[macro_export]
macro_rules! map(
{ $($key:expr => $value:expr),+ } => {
{
let mut m = HashMap::new();
$(
m.insert($key, $value);
)+
m
}
};
);
pub mod error;
pub mod sp;