# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

[package]
name = "fuzz_firmware_uefi"
publish = false
edition.workspace = true
rust-version.workspace = true

[dependencies]
uefi_nvram_specvars.workspace = true
xtask_fuzz.workspace = true

guid.workspace = true
guestmem.workspace = true
ucs2.workspace = true
zerocopy.workspace = true
arbitrary = { workspace = true, features = ["derive"] }

[target.'cfg(all(target_os = "linux", target_env = "gnu"))'.dependencies]
firmware_uefi = { workspace = true, features = ["auth-var-verify-crypto", "fuzzing"] }
libfuzzer-sys.workspace = true
openssl.workspace = true

[package.metadata.xtask.unused-deps]
# required for the xtask_fuzz macro, but unused_deps doesn't know that
ignored = ["libfuzzer-sys"]

[package.metadata]
cargo-fuzz = true

[package.metadata.xtask.fuzz.onefuzz-allowlist]
fuzz_firmware_uefi_nvram = ["fuzz_nvram.rs", "../src/service/nvram/spec_services/auth_var_crypto.rs"]
fuzz_firmware_uefi_diagnostics = ["fuzz_diagnostics.rs", "../src/service/diagnostics/*.rs"]

[[bin]]
name = "fuzz_firmware_uefi_nvram"
path = "fuzz_nvram.rs"
test = false
doc = false
doctest = false

[[bin]]
name = "fuzz_firmware_uefi_diagnostics"
path = "fuzz_diagnostics.rs"
test = false
doc = false
doctest = false

[lints]
workspace = true
