crossbundle_tools/
lib.rs

1/// On Windows adds `.exe` to given string.
2macro_rules! bin {
3    ($bin:expr) => {{
4        #[cfg(not(target_os = "windows"))]
5        let bin = $bin;
6        #[cfg(target_os = "windows")]
7        let bin = concat!($bin, ".exe");
8        bin
9    }};
10}
11
12/// On Windows adds `.bat` to given string.
13macro_rules! bat {
14    ($bat:expr) => {{
15        #[cfg(not(target_os = "windows"))]
16        let bat = $bat;
17        #[cfg(target_os = "windows")]
18        let bat = concat!($bat, ".bat");
19        bat
20    }};
21}
22
23#[cfg(target_os = "windows")]
24pub const EXECUTABLE_SUFFIX_BAT: &str = ".bat";
25
26#[cfg(not(target_os = "windows"))]
27pub const EXECUTABLE_SUFFIX_BAT: &str = "";
28
29pub mod commands;
30pub mod error;
31pub mod types;