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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! concinnity-core: the engine's RUNTIME vocabulary and the CPU compute over it.
//! The types the renderer, the cook pipeline, the subsystem crates, and the
//! editor all have to agree on and none of them owns: the backend-agnostic GPU
//! data layouts the CPU and the shaders both name, the transform and skeleton
//! math those layouts are expressed in, the ECS storage mechanism plus the
//! component definitions and the registry built from them, the post-process /
//! quality setting structs, the behavior virtual machine that evaluates
//! declarative logic, and the `.cnb` blob container format the cooked world
//! travels in.
//!
//! Above that vocabulary, the kernels that compute over it and belong to no
//! single consumer: skinning and pose blending, IK, LOD decimation,
//! rasterisation, IBL convolution, the procedural geometry generators, and the
//! payload codecs (`build`, `decode`). Each asset's AUTHORED schema (what a
//! world.jsonl declares) sits in `components` beside the runtime half it bakes
//! into; the build-only assets, which never reach a running world, live with
//! their registry group in concinnity-world. The asset COMPILE pipeline is
//! concinnity-cook, which this crate has no edge into.
// The blob container and the payload codecs parse bytes the process did not
// produce, so a panic here is a crash on a corrupt file rather than a bug.
// Invariants that genuinely cannot fail use `expect` with the invariant named;
// tests unwrap freely.
extern crate alloc;
extern crate std;
/// The version of everything a cooked blob's bytes depend on: the
/// postcard-visible component schema, the blob container's record shapes, and
/// the payload formats in [`build`]. Stamped into every blob header and folded
/// into the cook's payload cache key.
///
/// A blob whose stored version differs was written by a different engine and
/// fails the load check instead of mis-decoding.
///
/// # Bumping
///
/// Bump this when a change makes previously cooked bytes unreadable or stale:
///
/// - reordering a serialized struct's fields, or an enum's variants
/// - swapping a serialized field's type for one that encodes to the same width
/// - changing what a `build` payload serialiser writes
///
/// Adding or removing a serialized field needs no bump: a blob frame is
/// length-delimited and `blob::decode_exact` rejects one that does not decode
/// exactly, so a stale record fails the load on its own.
pub const SCHEMA_VERSION: u32 = 1;
// The headless driver over a world, named at the crate root because it is the
// counterpart to `ecs::World` rather than a corner of the module tree.
pub use App;