#ecs #gravitron #component #parallel #systems #execution #query

gravitron_ecs

A simple and performant ECS for Gravitron

6 releases (3 breaking)

0.4.0 Jan 21, 2025
0.3.0 Oct 29, 2024
0.2.0 Oct 2, 2024
0.1.2 Sep 13, 2024

#1561 in Game dev

Download history 116/week @ 2024-10-24 41/week @ 2024-10-31 8/week @ 2024-11-07 3/week @ 2024-11-14 4/week @ 2024-11-21 3/week @ 2024-12-05 4/week @ 2024-12-12 95/week @ 2025-01-16 20/week @ 2025-01-23 7/week @ 2025-01-30 9/week @ 2025-02-06

131 downloads per month
Used in 5 crates

MIT/Apache

76KB
2.5K SLoC

Gravitron ECS

Performant ECS for Gravitron

Features

  • Components with a derive macro
  • Systems as normal functions with queries to query the world, commands to modify entities and global resources
  • Ability for parallel execution with automatic detection for interference between systems and parallelizing optimization using RLF

Benchmarks

format: debug release

create entity

initial: 23ys 4ys average: 1.6ys 200ns

add component

initial: 11ys 2ys average: 1.2ys 140ns

get component

initial: 1.8ys 200ns average: 750ns 80ns

Dependencies

~3MB
~66K SLoC