pub fn is_x86_64() -> bool {
	#[cfg(target_pointer_width = "64")] {
		// 64-bit can only be x86-64
		true
	}
	#[cfg(target_pointer_width = "32")] {
		lazy_static::lazy_static! {
			static ref IS_X86_64: bool = {
				use std::path::PathBuf;

				#[cfg(target_os = "windows")] {
					PathBuf::from("srcds_win64.exe").is_file()
				}
				#[cfg(target_os = "linux")] {
					// Check executable name
					match std::env::current_exe().expect("Failed to get executable path").file_name().expect("Failed to get executable file name").to_string_lossy().as_ref() {
						#[cfg(target_os = "windows")]
						"srcds.exe" => false,

						#[cfg(target_os = "linux")]
						"srcds_linux" => false,

						#[cfg(target_os = "linux")]
						"srcds" => true,

						_ => {
							// Check bin folder
							#[cfg(target_os = "linux")] {
								PathBuf::from("bin/linux64").is_dir()
							}
							#[cfg(target_os = "windows")] {
								PathBuf::from("bin/win64").is_dir()
							}
						}
					}
				}
			};
		}
		*IS_X86_64
	}
}
/// Returns whether this client is running the x86-64 branch
Returns whether this client is running the x86-64 branch
Returns whether this client is running the x86 - 64 branch
pub fn is_x86_64() -> bool {
	#[cfg(target_pointer_width = "64")] {
		// 64-bit can only be x86-64
		true
	}
	#[cfg(target_pointer_width = "32")] {
		lazy_static::lazy_static! {
			static ref IS_X86_64: bool = {
				use std::path::PathBuf;
				#[cfg(target_os = "windows")] {
					PathBuf::from("srcds_win64.exe").is_file()
				}
				#[cfg(target_os = "linux")] {
					// Check executable name
					match std::env::current_exe().expect("Failed to get executable path").file_name().expect("Failed to get executable file name").to_string_lossy().as_ref() {
						#[cfg(target_os = "windows")]
						"srcds.exe" => false,
						#[cfg(target_os = "linux")]
						"srcds_linux" => false,
						#[cfg(target_os = "linux")]
						"srcds" => true,
						_ => {
							// Check bin folder
							#[cfg(target_os = "linux")] {
								PathBuf::from("bin/linux64").is_dir()
							}
							#[cfg(target_os = "windows")] {
								PathBuf::from("bin/win64").is_dir()
							}
						}
					}
				}
			};
		}
		*IS_X86_64
	}
}
pub fn is_x86_64 ( ) -> bool { # [ cfg ( target_pointer_width " " ) ] { // 64-bit can only be x86-64 true } # [ cfg ( target_pointer_width " " ) ] { lazy_static :: lazy_static ! { static ref IS_X86_64 bool { use std path PathBuf [ cfg ( target_os " " ) ] { PathBuf from ( " " ) is_file ( ) } [ cfg ( target_os " " ) ] { // Check executable name match std env current_exe ( ) expect ( " " ) file_name ( ) expect ( " " ) to_string_lossy ( ) as_ref ( ) { [ cfg ( target_os " " ) ] " " false [ cfg ( target_os " " ) ] " " false [ cfg ( target_os " " ) ] " " true { // Check bin folder [ cfg ( target_os " " ) ] { PathBuf from ( " " ) is_dir ( ) } [ cfg ( target_os " " ) ] { PathBuf from ( " " ) is_dir ( ) } } } } } } * IS_X86_64 } }
Returns whether this client is running the x86-64 branch
Returns whether this client is running the x86 - 64 branch