swc_common/plugin/diagnostics.rs
1/// A serializable, wrapped struct for the diagnostics information
2/// included in plugin binaries.
3/// TODO: Must implement bytecheck with forward-compatible schema changes to
4/// prevent handshake failure.
5#[derive(Debug, Clone, PartialEq, Eq)]
6#[cfg_attr(
7 any(feature = "rkyv-impl"),
8 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
9)]
10#[cfg_attr(feature = "rkyv-impl", derive(bytecheck::CheckBytes))]
11#[cfg_attr(feature = "rkyv-impl", repr(C))]
12pub struct PluginCorePkgDiagnostics {
13 pub pkg_version: String,
14 pub git_sha: String,
15 pub cargo_features: String,
16 pub ast_schema_version: u32,
17}