sillyecs 0.0.6

A silly little compile-time generated archetype ECS in Rust
Documentation
# TODO: Allow definition of custom commands to be emitted by systems

states:
  - name: WgpuRender
    description: The WGPU render state; will be initialized in the Render phase hooks

phases:
  - name: Startup
  - name: FixedUpdate
    fixed: 60Hz
  - name: Update
  - name: Render
    manual: true
    states:
      - use: WgpuRender
        write: true

worlds:
  - name: Main
    archetypes:
      - Particle
      - Player
      - ForegroundObject
      - BackgroundObject
      - SceneBackground

archetypes:
  - name: Particle
    description: A particle system particle.
    components:
      - Position
      - Velocity

  - name: Player
    components:
      - Position
      - Velocity
      - Health

  - name: ForegroundObject
    components:
      - Position
      - Collider

  - name: BackgroundObject
    components:
      - Position

  - name: SceneBackground
    description: The scene background.
    components:
      - BackgroundColor

components:
  - name: Position
  - name: Velocity
  - name: Health
  - name: Collider
  - name: BackgroundColor
    description: The background color used for clearing the render buffer

systems:
  - name: Physics
    phase: FixedUpdate
    context: true
    # entities: true
    # commands: true
    inputs:
      - Velocity
    outputs:
      - Position

  - name: BackgroundColorCycle
    phase: Update
    context: true
    outputs:
      - BackgroundColor

  - name: RenderBackground
    phase: Render
    inputs:
      - BackgroundColor
    states:
      - use: WgpuRender
        write: true

  - name: Render
    phase: Render
    run_after:
      - RenderBackground
    inputs:
      - Position
    states:
      - use: WgpuRender
        write: true

# TODO: List systems and their inputs and mutation targets. Generate traits that implement the signature.
# TODO: Generate a function that loops all archetypes matching the signature of a given system