Skip to content

Commit d176b44

Browse files
committed
chore: bump MSRV to 1.91.0
1 parent 62736b6 commit d176b44

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/code_health.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
11-
- uses: dtolnay/rust-toolchain@1.89.0
11+
- uses: dtolnay/rust-toolchain@master
1212
with:
13+
toolchain: stable
1314
components: clippy
1415
- run: cargo clippy --tests --no-deps -- --deny clippy::all
1516

@@ -18,7 +19,8 @@ jobs:
1819
runs-on: ubuntu-latest
1920
steps:
2021
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21-
- uses: dtolnay/rust-toolchain@1.89.0
22+
- uses: dtolnay/rust-toolchain@master
2223
with:
24+
toolchain: stable
2325
components: rustfmt
2426
- run: cargo fmt --all --check

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
include:
2929
- build: msrv
3030
os: ubuntu-latest
31-
rust: 1.89.0
31+
rust: 1.91.0
3232
target: x86_64-unknown-linux-gnu
3333
args: "--features=magic-module,rules-profiling"
3434
rust_flags: "-Awarnings"

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ keywords = ["pattern-matching", "cybersecurity", "forensics", "malware", "yara"]
1010

1111
# When updating rust-version also update MSRV in:
1212
# .github/workflows/tests.yaml
13-
# .github/workflows/code_health.yaml
1413
#
15-
rust-version = "1.89.0"
14+
rust-version = "1.91.0"
1615

1716
[workspace]
1817
members = [

js-wasm/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[cfg(any(target_family = "wasm", test))]
12
use serde::{Deserialize, Serialize};
23
#[cfg(any(target_family = "wasm", test))]
34
use yara_x::{
@@ -14,6 +15,7 @@ use std::time::Duration;
1415
#[cfg(target_family = "wasm")]
1516
use wasm_bindgen::prelude::*;
1617

18+
#[cfg(any(target_family = "wasm", test))]
1719
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
1820
#[serde(rename_all = "camelCase")]
1921
struct ScanResult {
@@ -23,6 +25,7 @@ struct ScanResult {
2325
matches: Vec<RuleMatch>,
2426
}
2527

28+
#[cfg(any(target_family = "wasm", test))]
2629
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
2730
#[serde(rename_all = "camelCase")]
2831
struct RuleMatch {
@@ -35,13 +38,15 @@ struct RuleMatch {
3538
patterns: Vec<PatternMatchResult>,
3639
}
3740

41+
#[cfg(any(target_family = "wasm", test))]
3842
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
3943
#[serde(rename_all = "camelCase")]
4044
struct MetadataEntry {
4145
identifier: String,
4246
value: MetadataValue,
4347
}
4448

49+
#[cfg(any(target_family = "wasm", test))]
4550
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
4651
#[serde(untagged)]
4752
enum MetadataValue {
@@ -52,6 +57,7 @@ enum MetadataValue {
5257
Bytes(Vec<u8>),
5358
}
5459

60+
#[cfg(any(target_family = "wasm", test))]
5561
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
5662
#[serde(rename_all = "camelCase")]
5763
struct PatternMatchResult {
@@ -61,6 +67,7 @@ struct PatternMatchResult {
6167
matches: Vec<PatternData>,
6268
}
6369

70+
#[cfg(any(target_family = "wasm", test))]
6471
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
6572
#[serde(rename_all = "camelCase")]
6673
struct PatternData {
@@ -69,7 +76,7 @@ struct PatternData {
6976
xor_key: Option<u8>,
7077
}
7178

72-
#[cfg(test)]
79+
#[cfg(any(target_family = "wasm", test))]
7380
#[derive(Debug)]
7481
struct CompileOutcome {
7582
warnings: Vec<String>,

0 commit comments

Comments
 (0)