1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright 2025 The Drasi Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! Plugin metadata for version validation at load time.
use FfiStr;
/// The FFI ABI contract version of this SDK. Used for compatibility checks at
/// plugin load time: the host (`loader.rs`) rejects any plugin whose reported
/// `sdk_version` differs in the **major or minor** component from this value.
///
/// This is intentionally **decoupled from the crate release version**
/// (`CARGO_PKG_VERSION`): it identifies the layout/ABI of the `#[repr(C)]`
/// envelope structs and the wire format of serialized payloads, not the package
/// release. **Bump the minor (pre-1.0) on any `#[repr(C)]` layout change or
/// payload wire-format change.**
///
/// History:
/// - `0.10.0`: source change / bootstrap events now cross the boundary as
/// serialized (MessagePack) payloads instead of reinterpreted `repr(Rust)`
/// opaque pointers (fixes #602 cross-cdylib heap corruption).
/// - `0.11.0`: snapshot rows cross the snapshot iterator as a
/// `KeyedSnapshotRow { k: <row_signature>, v: <row> }` JSON envelope instead
/// of a bare row, so the engine's canonical `row_signature` survives FFI
/// (fixes #605 duplicate dashboard rows on the plugin path).
pub const FFI_SDK_VERSION: &str = "0.11.0";
/// The target triple this crate was compiled for.
pub const TARGET_TRIPLE: &str = env!;
/// Git commit SHA the plugin was built from (short hash, e.g. "a1b2c3d").
pub const GIT_COMMIT_SHA: &str = env!;
/// Build timestamp in RFC 3339 format (e.g. "2026-03-03T17:00:00Z").
pub const BUILD_TIMESTAMP: &str = env!;
/// Metadata returned by `drasi_plugin_metadata()` for version validation.
/// The host checks these fields before calling `drasi_plugin_init()`.