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-three crates depend on each other. Dependencies flow downward — higher crates depend on lower ones, never the reverse.

Dependency Diagram

          ┌─────────────┐                ┌──────────────┐
          │  flint-cli  │                │ flint-player │
          │  (binary)   │                │   (binary)   │
          └──────┬──────┘                └──────┬───────┘
                 │                              │
    ┌────┬───┬──┴──┬────┬────┬─────┐   ┌───┬───┴───┬───┬───┬───┬───┐
    │    │   │     │    │    │     │   │   │       │   │   │   │   │
    ▼    │   ▼     ▼    ▼    ▼     ▼   ▼   ▼       ▼   │   │   │   │
 ┌──────┐│┌─────┐┌────┐│ ┌─────┐┌────────┐┌────────┐┌────────┐│   │
 │viewer│││scene││qry ││ │const││asset-gen││runtime ││physics ││   │
 └──┬───┘│└──┬──┘└─┬──┘│ └──┬──┘└───┬────┘└───┬────┘└───┬────┘│   │
    │    │   │     │   │    │       │          │         │     │   │
    │    ▼   │     │   │    │       │          │         │     ▼   │
    │ ┌──────────┐ │   │    │       │          │         │  ┌─────────┐
    ├►│  render  │◄┘   │    │       │          │         ├─►│ script  │
    │ └────┬─────┘     │    │       │          │         │  └────┬────┘
    │      │           │    │       │          │         │       │
    │      │           │    │       │          │         ▼       ▼
    │      │           │    │       │          │      ┌─────────────┐
    │      │           │    │       │          │      │audio  anim  │
    │      ▼           │    │       │          │      └──────┬──────┘
    │ ┌──────────┐     │   ┌┘      │          │             │
    │ │  import  │     │   │       │          │             │
    │ └────┬─────┘     │   │       │          │             │
    │      │           ▼   ▼       ▼          ▼             ▼
    │      │    ┌──────────────────────────────────────────────────┐
    │      │    │              flint-ecs                            │
    │      │    │  (hecs wrapper, stable IDs, hierarchy)           │
    │      │    └────────────────┬─────────────────────────────────┘
    │      │                    │
    │      │                    ▼
    │      │             ┌──────────────┐
    │      │             │ flint-schema │
    │      │             └──────┬───────┘
    │      │                    │
    │      ▼                    ▼
    │ ┌──────────┐  ┌─────────────────────────────────────┐
    │ │  asset   │  │            flint-core                │
    │ └────┬─────┘  │ (EntityId, Vec3, Transform, Hash)   │
    │      │        └─────────────────────────────────────┘
    │      │                    ▲
    └──────┴────────────────────┘

Dependency Details

CrateDepends OnDepended On By
flint-core(none)all other crates
flint-schemacoreecs, constraint
flint-ecscore, schemascene, query, render, constraint, runtime, physics, audio, animation, viewer, player, cli
flint-assetcoreimport, cli
flint-importcore, assetrender, animation, viewer, cli, player
flint-querycore, ecsconstraint, cli
flint-scenecore, ecs, schemaviewer, player, cli
flint-constraintcore, ecs, schema, queryviewer, cli
flint-rendercore, ecs, importviewer, player, cli
flint-runtimecore, ecsphysics, audio, animation, player
flint-physicscore, ecs, runtimescript, player
flint-audiocore, ecs, runtimeplayer
flint-animationcore, ecs, import, runtimeplayer
flint-particlescore, ecs, runtimeplayer
flint-scriptcore, ecs, runtime, physicsplayer
flint-terraincoreplayer
flint-asset-gencore, asset, importcli
flint-procgencorecli, player, procgen-ai
flint-procgen-aicore, procgencli
flint-viewercore, ecs, scene, schema, render, import, constraintcli
flint-playercore, schema, ecs, scene, render, runtime, physics, audio, animation, particles, script, import, asset, terrain, procgen(binary entry point)
flint-androidplayer(binary entry point, excluded from default members)
flint-cliall crates(binary entry point)

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
  5. Systems — render, runtime, physics, audio, animation, particles, script, terrain
  6. Applications — viewer, player, android
  7. Interface — CLI binary (flint-cli), player binary (flint-player)

Two entry points. The CLI binary (flint-cli) serves scene authoring and validation workflows. The player binary (flint-player) serves interactive gameplay. Both share the same underlying crate hierarchy.

Mostly independent subsystems. The constraint, asset, physics, audio, animation, particles, asset generation, and render systems don’t depend on each other. The one exception is flint-script, which depends on flint-physics for raycasting and camera direction access. This means most subsystems can 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-audioSpatial audio engine
glamflint-audioVec3/Quat types for Kira spatial positioning (via mint interop)
eguiflint-viewerImmediate-mode GUI framework
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-playerGamepad input (buttons, axes, multi-controller)
ureqflint-asset-genHTTP client for AI provider APIs
uuidflint-asset-genUnique job identifiers