revive_llvm_builder/platforms/
mod.rs1pub mod aarch64_linux_gnu;
4pub mod aarch64_linux_musl;
5pub mod aarch64_macos;
6pub mod shared;
7pub mod wasm32_emscripten;
8pub mod x86_64_linux_gnu;
9pub mod x86_64_linux_musl;
10pub mod x86_64_macos;
11pub mod x86_64_windows_msvc;
12
13use std::str::FromStr;
14
15#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
17pub enum Platform {
18 X86,
20 AArch64,
22 PolkaVM,
24}
25
26impl FromStr for Platform {
27 type Err = String;
28
29 fn from_str(value: &str) -> Result<Self, Self::Err> {
30 match value {
31 "PolkaVM" => Ok(Self::PolkaVM),
32 value => Err(format!("Unsupported platform: `{value}`")),
33 }
34 }
35}
36
37impl std::fmt::Display for Platform {
38 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
39 match self {
40 Self::X86 => write!(f, "X86"),
41 Self::AArch64 => write!(f, "AArch64"),
42 Self::PolkaVM => write!(f, "RISCV"),
43 }
44 }
45}