summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock22
-rw-r--r--mullvad-update/Cargo.toml1
-rw-r--r--mullvad-update/mullvad-release/Cargo.toml2
-rw-r--r--mullvad-update/src/format/mod.rs1
4 files changed, 25 insertions, 1 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 2285a260a2..9bd3b2e401 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3416,6 +3416,7 @@ dependencies = [
"serde",
"serde_json",
"sha2",
+ "strum",
"thiserror 2.0.9",
"tokio",
"vec1",
@@ -5466,6 +5467,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
+name = "strum"
+version = "0.27.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.27.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.100",
+]
+
+[[package]]
name = "subtle"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/mullvad-update/Cargo.toml b/mullvad-update/Cargo.toml
index d3ca75da4a..73318c2a3a 100644
--- a/mullvad-update/Cargo.toml
+++ b/mullvad-update/Cargo.toml
@@ -29,6 +29,7 @@ itertools = { workspace = true }
reqwest = { workspace = true, optional = true }
sha2 = { workspace = true, optional = true }
+strum = { version = "0.27", features = ["derive"], optional = true }
tokio = { workspace = true, features = ["rt-multi-thread", "fs", "process", "macros"], optional = true }
vec1 = { workspace = true }
diff --git a/mullvad-update/mullvad-release/Cargo.toml b/mullvad-update/mullvad-release/Cargo.toml
index 89608d8c82..25a1191fe0 100644
--- a/mullvad-update/mullvad-release/Cargo.toml
+++ b/mullvad-update/mullvad-release/Cargo.toml
@@ -24,4 +24,4 @@ tokio = { version = "1", features = ["full"] }
toml = "0.8"
mullvad-version = { path = "../../mullvad-version", features = ["serde"] }
-mullvad-update = { path = "../", features = ["client", "sign"] }
+mullvad-update = { path = "../", features = ["client", "sign", "strum"] }
diff --git a/mullvad-update/src/format/mod.rs b/mullvad-update/src/format/mod.rs
index 4b64950fe5..762c1c14cc 100644
--- a/mullvad-update/src/format/mod.rs
+++ b/mullvad-update/src/format/mod.rs
@@ -116,6 +116,7 @@ pub struct Installer {
/// Installer architecture
#[derive(Debug, Clone, Copy, Deserialize, Serialize, PartialEq, Eq)]
#[serde(rename_all = "lowercase")]
+#[cfg_attr(feature = "strum", derive(strum::EnumIter))]
pub enum Architecture {
/// x86-64 architecture
X86,