flecs-dylib-modules

Architect hot-reloadable Flecs modules as Rust dylibs with Cargo dependencies.

8|Updated Nov 29, 2025
One-click install
npx skills add https://github.com/andrewgazelka/rgb --skill flecs-dylib-modules
Or copy as Structured Prompt for Agentβ–Ό
Please help me install this Agent Skill.
Skill: flecs-dylib-modules
Source: https://github.com/andrewgazelka/rgb/tree/main/.claude/skills/flecs-dylib-modules
Command: npx skills add https://github.com/andrewgazelka/rgb --skill flecs-dylib-modules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables teams to architect and maintain hot-reloadable Flecs modules as Rust dylibs, allowing updates to module logic without restarting the Flecs world and enabling clean boundaries between components and systems.

Core Features & Use Cases

  • Component modules define components/singletons only, no systems;
  • System modules import component modules and define systems that operate on them;
  • Supports hot-reload of systems without breaking component data;
  • Enables multiple system modules to share the same components;
  • Provides a clear module structure and Cargo-based dependencies as demonstrated in the example layout.

Example Structure

(The example structure is described in the SKILL.md)

crates/module/
β”œβ”€β”€ time-components/     # WorldTime, TpsTracker (components only)
β”œβ”€β”€ time-systems/        # Systems that tick WorldTime (imports time-components)
β”œβ”€β”€ network-components/  # Connection, PacketBuffer, etc.
β”œβ”€β”€ network-systems/     # Ingress/egress systems
└── play/                # Game systems (imports time-components, network-components)

Quick Start

Create a new hot-reloadable Flecs module following the example structure and module interface.

Frequently Asked Questions about flecs-dylib-modules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I hot-reload Flecs systems in Rust without losing component data?β–Ό

You can hot-reload Flecs systems in Rust by structuring system logic as separate Rust dylibs. This allows runtime module load and unload operations to update systems while preserving existing component data in the ECS world.

What is the best way to structure Rust dylibs for Flecs ECS hot-reloading?β–Ό

The best way to structure Rust dylibs for Flecs ECS hot-reloading is to split code into component-only modules and system modules. System modules import component modules via Cargo dependencies and are compiled as dylibs for runtime loading.

Can multiple Flecs system modules share the same Rust components during hot-reload?β–Ό

Yes, multiple Flecs system modules can share the same Rust components during hot-reload. By isolating components in their own modules, multiple system dylibs can import and operate on them simultaneously without data loss.

Does Flecs ECS support cargo-based dependency management for Rust dylibs?β–Ό

Flecs ECS supports cargo-based dependency management for Rust dylibs by organizing modules into separate crates. System modules declare component modules as cargo dependencies, enabling clean boundaries and runtime load/unload semantics.

Why do my Flecs components break when hot-reloading systems in Rust?β–Ό

Flecs components break during Rust system hot-reloading if components and systems are not separated into distinct modules. Defining components in their own dedicated modules ensures component data persists when system dylibs are unloaded and reloaded.

When do I need to use Rust dylibs for Flecs ECS modules?β–Ό

You need to use Rust dylibs for Flecs ECS modules when you want to update module logic and systems without restarting the Flecs world. This is ideal for ECS projects requiring fast iteration and clean component-system boundaries.