1#[allow(unused_imports)]
5mod std {
6 pub use std::collections::HashMap;
7 pub use std::env::{consts, var};
8 pub use std::ffi::OsStr;
9 pub use std::fs::{canonicalize, create_dir_all, read, remove_file, set_permissions, File, Permissions};
10 pub use std::io::prelude::*;
11 pub use std::io::{self, copy, BufRead, BufReader, Cursor, Write};
12 pub use std::os::unix::fs::PermissionsExt;
13 pub use std::path::{absolute, Path, PathBuf};
14 pub use std::process::exit;
15}
16#[allow(unused_imports)]
18mod no_std {
19 pub use hashbrown::HashMap;
20}
21
22#[cfg(not(feature = "std"))]
23pub use no_std::*;
24#[cfg(feature = "std")]
25pub use std::*;
26#[cfg(feature = "std")]
28pub fn vale_release_filename() -> String {
29 let os = std::consts::OS.to_lowercase();
31 let platform = match os.as_str() {
32 | "linux" => "Linux_64-bit.tar.gz",
33 | "macos" | "apple" => "macOS_64-bit.tar.gz",
34 | "windows" => "Windows_64-bit.zip",
35 | _ => "unknown",
36 };
37 platform.to_string()
38}