Skip to main content

concinnity_world/
lib.rs

1//! concinnity-world: the build-side world front half.
2//!
3//! Owns the authored world model (world.jsonl parsing and I/O, structural
4//! validation), the authoring type vocabulary (`RegisteredType`, instantiated
5//! from the shared registry list in concinnity-core), the asset
6//! cross-reference metadata, semantic validation
7//! (`check`), the typed authoring vocabulary (`spec`), and the world templates
8//! built from it (`template`). Everything here operates on the authored input;
9//! the shipped runtime plays compiled blobs and never links this crate.
10//!
11//! Deliberately excluded: build-time expansion (SceneImport, prefabs, injection
12//! passes), importers/encoders, payload compilation, and blob writing -- all of
13//! that is concinnity-cook, which sits on top of this crate and composes its
14//! compile-backed per-asset checks through `check::check_world_with`.
15//!
16//! The authored medium is JSON (an asset's `args` is its public JSON schema), so
17//! serde_json is intrinsic to this crate's job; typed struct-first authoring is
18//! served by `spec`'s `AssetSpec` builders, converted to world entries by
19//! `spec::json`.
20
21// Bridge: re-export the modules the moved code names under crate::* so its
22// `crate::<module>` import paths resolve unchanged. `components` is the runtime
23// half of the vocabulary; the authoring-only half is named from
24// `crate::schema`, whose registry group this crate owns
25// (`registry::build_only`).
26pub(crate) use concinnity_core::{components, platform, result};
27
28// The vocabulary's ECS surface, with the build-time name interner shadowing its
29// `asset_id`: the interner keeps a per-thread table, so it lives in
30// `concinnity_host::thread` and re-exports the vocabulary's `AssetId` /
31// `AssetRef`.
32pub(crate) mod ecs {
33    pub(crate) use concinnity_core::ecs::*;
34    pub(crate) use concinnity_host::thread::asset_id;
35}
36pub(crate) use concinnity_host::store::paths;
37
38pub mod check;
39pub mod refs;
40pub mod registry;
41pub mod resource_type;
42pub mod schema;
43pub mod source_args;
44pub mod spec;
45pub mod template;
46pub mod validate;
47pub mod world;