compatdb_core/version.rs
1//! The version resource of an image, which a rule's fingerprint matches on.
2
3#[cfg(doc)]
4use crate::runtime::version_info;
5
6/// The parts of a PE version resource the database can match on. Vendor-set at
7/// link time, so stable across install location and patches.
8///
9/// A field is an empty string when the image carries no version resource or
10/// the resource leaves that field empty. `compatdb.so` reads it from the
11/// image with [`version_info`]; a launcher that wants to see what a program
12/// would get fills it in itself.
13#[derive(Clone, Default, Debug, PartialEq, Eq)]
14pub struct VersionInfo {
15 /// The `CompanyName` string.
16 pub company: String,
17 /// The `ProductName` string.
18 pub product: String,
19 /// The `OriginalFilename` string.
20 pub original_filename: String,
21}