Expand description
concinnity-dev: the dev tooling library.
Everything the concinnity binary does, minus the argv it does it from:
the world authoring / in-memory build code, the implementations behind each
subcommand, the asset-reference generator, bundle packaging, the in-engine
editor HUD, the localhost debug server, and the interpreted (cn debug) run
loop.
The binary is the clap command tree and nothing else. Everything it dispatches into is here, which is what lets the same entry points serve an out-of-tree host that has no argv at all.
Modules§
- command
- The implementations behind each
cnsubcommand, and the only place in this crate that writes to stdout. The implementations behind eachcnsubcommand: discovery and printing wrappers over this crate’s authoring API and the concinnity-cook compile pipeline. - debug_
client - The client half of the runtime debug protocol: a thin localhost WebSocket
client the
concinnity debug <subcommand>commands drive to talk to a runningcn debugserver (seesuper::serverfor the other end). - docs
- The asset reference pages, generated from the engine’s own schema sources.
- export
- Packaging a built world into a distributable bundle.
- project
- The project a dev session works on: the one state tree its builds, runs, and editor sessions address, opened by the binary at startup. The project a dev session works on.
Enums§
- Watch
Target - A read-only snapshot the
watchcommand can poll. Each maps to the matching server command;labelnames it in the poll banner. Argv parsing lives in the CLI binary, which maps its own value-enum onto this type.
Functions§
- add_
to_ path - Add an asset to
world_pathand rebuild. See module docs. - arg_
value_ to_ json - One
ArgValueas aserde_json::Value. - build_
pipeline_ from_ str - Run the full build pipeline on an in-memory JSONL string without writing any
blobs. Loads, expands, and validates the world (crate::build_only::prepare_world),
then compiles it.
assets_diris the asset search root a baresourcefilename is searched under;artifacts_diris an optional directory consulted when resolving bare shader filenames not found there, so pass the account’s artifact directory to compile user-written shaders. - build_
world_ from_ path - Read a world.jsonl file from disk and run the full in-memory pipeline on it,
returning a ready-to-run World. The interpreted
run(in the CLI crate) loads its world through here; it is the file-backed counterpart ofprepare - build_
world_ from_ str - Run the full in-memory pipeline on a world.jsonl string, returning a ready-to-run World without touching any blob files on disk. The editor uses this to boot an empty (or otherwise non-renderable) world from a seeded GraphicsConfig so a window still opens.
- build_
world_ to_ disk - Compile a world.jsonl file and write the compiled blobs + world-lock.json to
the active state dir’s
data/, exactly ascn builddoes. This iscn buildas a library call: the editor’s SAVE goes through here to persist edits, reusing the validated compile + blob-write tail rather than patching blobs directly. Same-process recompiles are fast because the payload / expand caches are warm. - check_
at_ path - Read
world_path, run validation, and report results. Returns Ok if every asset passes; otherwise an error whose Display contains a human-readable summary of every failure (one per asset). - check_
from_ str - Run validation against an in-memory world JSONL string.
labelis the origin used in messages (typically the source path). - cook_
platform - The shader platform
cncooks worlds for: the backend the runtime linked into this same binary consumes, so a world built here plays here. - parse_
world_ jsonl - Parse a world.jsonl string into a flat list of raw asset objects.
- rm_
at_ path - Remove the asset named
namefromworld_pathand rebuild. - run_
debug - The
cn debugserver path: start the localhost debug server onport, then run interpreted with it as the per-frame hook. This is the entry point the CLI binary calls; the hook assembly stays inside this crate. - run_
editor - Editor entry point (
cn editor). Brings up a renderable world – building the blobs first if they are missing, and falling back to an empty in-memory world when there is nothing to load – injects the editor HUD, and runs the world loop driven by the editor hook (plus the debug server when a port is given). - spec_
args - A spec’s
argsobject as aserde_json::Value(what a component deserializes from). - spec_
to_ value - A spec as a full world-line value:
{"name", "type", "args"}, the shapeparse_world_jsonlyields and the cook pipeline validates. - validate_
asset - Validate a single asset’s type and generator without running the full build pipeline. Called by the server on each world_add so the LLM gets per-asset feedback without waiting for a WebSocket round-trip.
- validate_
world_ jsonl - Validate world JSONL without running compilation. Runs the full front half
of the pipeline (load, expand, semantic checks) plus a per-asset type/args
resolution, but stops short of compiling payloads: intended for fast
server-side pre-deploy checks where shader compilation is not needed.
assets_diris the asset search root the expansion passes resolve their sources and presets against. Every problem found is reported in a single newline-joined error. - world_
from_ loaded - Compile a prepared world and assemble it into an in-memory World, ready to run without touching any blob files on disk.
- world_
template_ entries - A world template’s assets as world-line entries, in application order.
- write_
world_ jsonl - Serialize a list of asset objects back to world.jsonl format.