Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Crate Dependency Graph

This page shows how Flint’s twenty-six crates (plus the tools/arch-analyzer workspace member) depend on each other. Dependencies flow downward — higher crates depend on lower ones, never the reverse.

Dependency Diagram

                     ┌─────────────┐
                     │  flint-cli  │  (binary; also embeds the player)
                     └──────┬──────┘
                            │
      ┌──────┬──────┬───────┼────────┬──────────┬───────────┐
      ▼      ▼      ▼       ▼        ▼          ▼           ▼
  ┌──────┐┌─────┐┌──────┐┌────────┐┌────────┐┌───────┐┌────────────┐
  │viewer││query││const ││asset-gen││procgen ││ music ││flint-player│ (binary)
  └──┬───┘└──┬──┘└──┬───┘└───┬────┘└───┬────┘└──┬────┘└─────┬──────┘
     │       │      │        │         │        │           │
     ▼       │      │        │         │        ▼           │
  ┌────────┐ │      │        │         │ ┌─────────────┐    │
  │debug-ui│◄┼──────┼────────┼─────────┼─┤input-capture│◄───┤  (player → debug-ui is optional)
  └──┬─────┘ │      │        │         │ └─────────────┘    │
     │       │      │        │         │                    │
     ▼       │      │        │         │   ┌────────┬───────┼────────┬──────────┐
  ┌────────┐ │      │        │         │   ▼        ▼       ▼        ▼          ▼
  │ render │◄┼──────┼────────┼─────────┼───────────────────────────────────────────┐
  └──┬──┬──┘ │      │        │         │ ┌──────┐┌───────┐┌────────┐┌─────────┐┌─────────┐
     │  │    │      │        │         │ │script││physics││ audio  ││animation││particles│
     │  ▼    │      │        │         │ └──┬───┘└───┬───┘└───┬────┘└────┬────┘└────┬────┘
  ┌────────┐ │      │        │         │    └────────┴────────┴──────────┴──────────┘
  │terrain │ │      │        │         │                       │
  └───┬────┘ │      │        │         │                       ▼
      │      │      │        │         │                 ┌───────────┐
      ▼      ▼      ▼        ▼         ▼                 │  runtime  │
  ┌──────┐┌────────────────────────────────────────┐     └─────┬─────┘
  │scene ││                 flint-ecs               │◄──────────┘
  └──┬───┘│      (hecs wrapper, stable IDs)        │
     │    └──────────────────┬──────────────────────┘
     │                       ▼
     │                ┌──────────────┐        ┌────────┐        ┌────────┐
     └───────────────►│ flint-schema │        │ import │───────►│ asset  │
                      └──────┬───────┘        └───┬────┘        └───┬────┘
                             ▼                    ▼                 ▼
                      ┌─────────────────────────────────────────────┐
                      │                  flint-core                  │
                      │       (EntityId, Vec3, Transform, Hash)      │
                      └─────────────────────────────────────────────┘

The long arrow into render comes from the player (top right) and from viewer and debug-ui; the systems row beneath it (script, physics, audio, animation, particles) does not depend on render. Some edges are left out for legibility (every crate reaches flint-core; render, animation, viewer and asset-gen reach import; render reaches scene; terrain also feeds debug-ui). The table below is complete.

Dependency Details

CrateDepends OnDepended On By
flint-core(none)all other crates
flint-schemacoreecs, scene, constraint, viewer, player, cli, android
flint-ecscore, schemascene, query, render, constraint, runtime, physics, audio, animation, particles, script, viewer, player, cli, android
flint-assetcoreimport, asset-gen, player, cli
flint-importcore, assetrender, animation, asset-gen, viewer, player, cli
flint-querycore, ecsconstraint, cli
flint-scenecore, ecs, schemarender, debug-ui, viewer, player, cli, android
flint-constraintcore, ecs, schema, queryviewer, cli
flint-terraincorerender, debug-ui, player, cli
flint-rendercore, ecs, scene, import, terraindebug-ui, viewer, player, cli
flint-debug-uicore, render, terrain, sceneviewer, player (optional, debug-hud feature)
flint-runtimecore, ecsphysics, audio, animation, particles, script, player, cli
flint-physicscore, ecs, runtimescript, player, cli
flint-audiocore, ecs, runtimeplayer
flint-musiccoreinput-capture, player, cli
flint-input-capturecore, musicplayer, cli
flint-animationcore, ecs, import, runtimescript, player, cli
flint-particlescore, ecs, runtimeplayer
flint-scriptcore, ecs, runtime, physics, animationplayer
flint-asset-gencore, asset, importcli
flint-procgencoreprocgen-ai, player, cli
flint-procgen-aiprocgen(tool-time only; not a default member)
flint-viewercore, ecs, scene, schema, render, debug-ui, import, constraintcli
flint-playercore, asset, schema, ecs, scene, render, runtime, physics, import, audio, music, input-capture, animation, particles, terrain, script, procgen, debug-ui (optional)cli, android
flint-androidplayer, scene, schema, ecs(binary entry point, excluded from default members)
flint-clicore, schema, ecs, scene, query, render, constraint, asset, asset-gen, import, animation, runtime, physics, player, terrain, procgen, viewer, music, input-capture(binary entry point)
flint-arch-analyzer (tools/)(no engine crates)(standalone tool; not a default member)

Key Properties

Acyclic. The dependency graph has no cycles. This is enforced by Cargo and ensures clean compilation ordering.

Layered. Crates form clear layers:

  1. Core — fundamental types (flint-core)
  2. Schema — data definitions (flint-schema)
  3. Storage — entity and asset management (flint-ecs, flint-asset)
  4. Logic — query, scene, constraint, import, asset-gen, procgen, procgen-ai, music
  5. Systems — render, terrain, runtime, physics, audio, input-capture, animation, particles, script
  6. Tooling overlays — debug-ui (panels over the renderer), viewer
  7. Applications — player, android
  8. Interface — CLI binary (flint-cli), player binary (flint-player)

Two entry points. The CLI binary (flint-cli) serves scene authoring, validation, and the rhythm-game tooling (play-chart, replay-chart, render-suite). The player binary (flint-player) serves interactive gameplay, and flint-cli embeds it so flint play and flint-player run the same code. Both share the same underlying crate hierarchy.

Mostly independent subsystems. The constraint, asset, physics, audio, particles, asset generation, and render systems don’t depend on each other. The exceptions are deliberate: flint-script depends on flint-physics (raycasts, camera direction) and flint-animation (layer and sequence bindings); flint-input-capture depends on flint-music for the InputEvent type and clock bridge; flint-render depends on flint-terrain for the shared vertex format and on flint-scene for the post-process and environment definitions; and flint-debug-ui depends on flint-render because its panels mirror and write through to renderer state. Most subsystems can still be built and tested in isolation.

External Dependencies

Key third-party crates used across the workspace:

CrateUsed ByPurpose
hecsflint-ecsUnderlying ECS implementation
tomlmost cratesTOML parsing and serialization
serdeall cratesSerialization framework
pestflint-queryPEG parser generator
wgpuflint-render, flint-viewer, flint-playerGPU abstraction layer
winitflint-render, flint-viewer, flint-runtime, flint-playerWindow and input management
rapier3dflint-physics3D physics simulation
kiraflint-audio, flint-musicSpatial audio engine; stem playback and the six-bus mixer
glamflint-audioVec3/Quat types for Kira spatial positioning (via mint interop)
symphoniaflint-musicStem decoding for validation and offline rendering
houndflint-musicWAV output for flint render-suite
eguiflint-viewer, flint-player, flint-cli, flint-debug-uiImmediate-mode GUI framework (inspector, HUD, debug panels)
egui-snarlflint-cliNode graph widget for the texture pipeline editor
rfdflint-cliNative file dialogs in the editors
clapflint-cli, flint-playerCommand-line argument parsing
thiserrorall library cratesError derive macros
sha2flint-core, flint-assetSHA-256 hashing
gltfflint-importglTF file parsing (meshes, materials, skins, animations)
crossbeamflint-physicsChannel-based event collection (Rapier)
rhaiflint-scriptEmbedded scripting language
gilrsflint-player, flint-input-captureGamepad input (buttons, axes, multi-controller)
gilrs-coreflint-input-captureDirect 1 kHz polling and XInput rumble
noiseflint-procgen, flint-terrainPerlin / simplex / Worley noise
rand, rand_chachaflint-procgen, flint-procgen-ai, flint-terrainSeeded, reproducible randomness
bimapflint-ecsThe EntityId ↔ hecs Entity map
synflint-arch-analyzerRust source parsing for the architecture analyzer
ureqflint-asset-genHTTP client for AI provider APIs
uuidflint-asset-genUnique job identifiers