Add more identifiers to the platform

This commit is contained in:
Omar Abdulla
2025-09-17 06:25:35 +03:00
parent 01d8042841
commit 1a25c8e0ab
6 changed files with 146 additions and 33 deletions
+2
View File
@@ -10,10 +10,12 @@ rust-version.workspace = true
[dependencies]
anyhow = { workspace = true }
clap = { workspace = true }
moka = { workspace = true, features = ["sync"] }
once_cell = { workspace = true }
semver = { workspace = true }
serde = { workspace = true }
strum = { workspace = true }
tokio = { workspace = true, default-features = false, features = ["time"] }
[lints]
+119
View File
@@ -0,0 +1,119 @@
use clap::ValueEnum;
use serde::{Deserialize, Serialize};
use strum::{AsRefStr, Display, EnumString, IntoStaticStr};
/// An enum of the platform identifiers of all of the platforms supported by this framework.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Serialize,
Deserialize,
ValueEnum,
EnumString,
Display,
AsRefStr,
IntoStaticStr,
)]
#[serde(rename = "kebab-case")]
#[strum(serialize_all = "kebab-case")]
pub enum PlatformIdentifier {
/// The Go-ethereum reference full node EVM implementation.
GethEvm,
/// The kitchensink node with the PolkaVM backend.
KitchensinkPolkaVM,
/// The kitchensink node with the REVM backend.
KitchensinkREVM,
/// The revive dev node with the PolkaVM backend.
ReviveDevNodePolkaVM,
/// The revive dev node with the REVM backend.
ReviveDevNodeREVM,
}
/// An enum of the platform identifiers of all of the platforms supported by this framework.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Serialize,
Deserialize,
ValueEnum,
EnumString,
Display,
AsRefStr,
IntoStaticStr,
)]
#[serde(rename = "kebab-case")]
#[strum(serialize_all = "kebab-case")]
pub enum CompilerIdentifier {
/// The solc compiler.
Solc,
/// The resolc compiler.
Resolc,
}
/// An enum representing the identifiers of the supported nodes.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Serialize,
Deserialize,
ValueEnum,
EnumString,
Display,
AsRefStr,
IntoStaticStr,
)]
#[serde(rename = "kebab-case")]
#[strum(serialize_all = "kebab-case")]
pub enum NodeIdentifier {
/// The go-ethereum node implementation.
Geth,
/// The Kitchensink node implementation.
Kitchensink,
/// The revive dev node implementation.
ReviveDevNode,
}
/// An enum representing the identifiers of the supported VMs.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Serialize,
Deserialize,
ValueEnum,
EnumString,
Display,
AsRefStr,
IntoStaticStr,
)]
#[serde(rename = "kebab-case")]
#[strum(serialize_all = "kebab-case")]
pub enum VmIdentifier {
/// The ethereum virtual machine.
Evm,
/// Polkadot's PolaVM Risc-v based virtual machine.
PolkaVm,
}
+2
View File
@@ -1,5 +1,7 @@
mod identifiers;
mod mode;
mod version_or_requirement;
pub use identifiers::*;
pub use mode::*;
pub use version_or_requirement::*;