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
//! Binary wire formats shared across the server, CLI, and SDKs.
//!
//! These are pure byte (de)serialisers with no storage or persistence
//! dependency, so they compile on every target (including `wasm32`).
/// Generates a deterministic graph-edge ID from (source, target, label) using
/// FNV-1a over the raw little-endian bytes of `source` and `target` followed by
/// the UTF-8 bytes of `label`.
///
/// This is the canonical edge-id derivation shared across every `VelesDB` engine
/// (core executor, WASM, migrate). Hashing the raw bytes — never a
/// formatted/decimal string with separators — keeps the result stable and
/// identical across crates, so the same logical edge always maps to the same
/// id. Re-inserting that edge without an explicit `id` is therefore idempotent
/// (it overwrites the existing edge); supply explicit `id` values to create
/// multiple edges sharing the same (source, target, label) triple.
///
/// It lives in `wire` (persistence-free, `wasm32`-safe) so binding crates that
/// build core without the `persistence` feature can still delegate to it.