Resources (Singletons)
flecs doesn't have a dedicated "resource" concept the way Bevy does — it uses singleton components instead. A singleton is just a component set on the world entity itself. The API is slightly different from regular components but the concept is identical.
Built-in singletons
Reading
Writing (for your own resources)
Querying a singleton from inside a system
flecs will auto-inject it if you tag the term as singleton: