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
//! Yog stable C ABI — the ONLY types that cross the mod/runtime boundary.
//!
//! Rules this file must never break:
//! - Every type is `#[repr(C)]`.
//! - No Rust trait objects, no generics, no std types in public structs.
//! - Adding is a minor change: new fields go at the END of structs, new
//! callback types and functions are new names; increment `ABI_MINOR`.
//! - Anything else is a major change: removing (clean out what's obsolete
//! then, here, in the runtime, the hosts' JNI, yog-api), reordering,
//! changing a type or a meaning; increment `ABI_MAJOR`, `ABI_MINOR` = 0.
//!
//! Mods and the runtime are compiled independently; the runtime loads a mod
//! of its major version and a minor no newer than its own ([`compatible`]):
//! such a mod sees a prefix of every table, all of it there.
use c_void;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
// ── Version ──────────────────────────────────────────────────────────────────
pub const ABI_MAJOR: u32 = 6;
pub const ABI_MINOR: u32 = 0;
/// `ABI_MAJOR * 10_000 + ABI_MINOR`. Checked at mod load time.
pub const ABI_VERSION: u32 = ABI_MAJOR * 10_000 + ABI_MINOR;
/// Whether a mod built for ABI `version` runs on this one: the same major,
/// a minor no newer (what it knows is all here; later additions it doesn't use).
pub const