partial_idl_parser/path_macro.rs
1/// Get the IDL from the target/idl/temp.json directory within the workspace root
2#[macro_export]
3macro_rules! get_idl {
4 () => {
5 include_str!(concat!(
6 env!("CARGO_WORKSPACE_DIR"),
7 "/target/idl/",
8 "temp.json"
9 ))
10 };
11}
12
13/// Get the IDL from the custom directory given a program name.
14#[macro_export]
15macro_rules! idl_custom_path {
16 ($custom_path:expr) => {
17 include_str!($custom_path)
18 };
19}