Skip to main content

concinnity_dev/
lib.rs

1//! concinnity-dev: the dev tooling library.
2//!
3//! Everything the `concinnity` binary does, minus the argv it does it from:
4//! the world authoring / in-memory build code, the implementations behind each
5//! subcommand, the asset-reference generator, bundle packaging, the in-engine
6//! editor HUD, the localhost debug server, and the interpreted (`cn debug`) run
7//! loop.
8//!
9//! The binary is the clap command tree and nothing else. Everything it dispatches
10//! into is here, which is what lets the same entry points serve an out-of-tree
11//! host that has no argv at all.
12
13// Bridge: re-export the runtime/core modules the authoring, editor, and debug
14// code names under crate::* so their `crate::<module>` import paths resolve.
15// world.jsonl I/O lives in the compiler (concinnity-cook), not core.
16pub(crate) use concinnity_cook::world;
17pub(crate) use concinnity_engine::{app, blob, components, ecs, gfx, jobs, resource};
18
19// Authoring / in-memory build. Its exports below are the surface the
20// out-of-tree Swift app's FFI crate embeds; the `cn` binary uses only part of
21// it, so some entry points have no in-workspace caller.
22mod authoring;
23
24// The in-engine editor HUD, the localhost debug server, the interpreted run
25// loop, and animation clip hot-reload.
26mod anim_reload;
27mod debug;
28mod debug_hook;
29mod editor;
30mod run;
31
32/// The implementations behind each `cn` subcommand, and the only place in this
33/// crate that writes to stdout.
34pub mod command;
35/// The asset reference pages, generated from the engine's own schema sources.
36pub mod docs;
37/// Packaging a built world into a distributable bundle.
38pub mod export;
39
40// Process-global test serialization lock; test builds only.
41#[cfg(test)]
42mod test_support;
43
44// Dev-session entry points, consumed by the `concinnity` binary: the debug
45// server + interpreted run (`cn debug`), the in-engine editor (`cn editor`),
46// and the debug-server WebSocket client (`cn debug send/screenshot/...`).
47pub use debug::{WatchTarget, client as debug_client};
48pub use editor::run_editor;
49pub use run::run_debug;
50
51// The authoring API
52pub use authoring::{
53    add_to_path, arg_value_to_json, build_world_from_path, build_world_from_str,
54    build_world_to_disk, check_at_path, check_from_str, rm_at_path, spec_args, spec_to_value,
55    world_from_loaded, world_template_entries,
56};
57pub use concinnity_cook::world::{parse_world_jsonl, write_world_jsonl};
58pub use concinnity_cook::{build_pipeline_from_str, validate_asset, validate_world_jsonl};