HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
skypjack
entt
C++2018–2026
skypjack / entt

entt

Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more

26Distinct people
43Mentions
0Explicit recommenders
13.3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 4:59:52 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year43 dated mentions

Observed mentions: 2018-09-24 23:41:01 UTC to 2026-05-10 16:45:14 UTC.

0369122018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 8 mentions; 4 submissions, 4 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 9 mentions; 3 submissions, 6 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 12 mentions; 1 submissions, 11 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC422
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC844
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC936
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC12111
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC202
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC514
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC110

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
CautionEnTT has been a dream so far, we haven't found a single bug to date and it's super easy to work with. -- Every EnTT User Ever EnTT is a header-only, tiny and easy to use library for game programming and much more written in modern C++. Among others, it's used in Minecraft by Mojang, the ArcGIS Runtime SDKs by Esri and the amazing Ragdoll. If you don't see your project in the list, please open an issue, submit a PR or add the #entt tag to your topics! 👍 Do you want to keep up with changes or do you have a question that doesn't require you to open an issue? Join the gitter channel and the discord server, meet other users like you. The more we are, the better for everyone. Don't forget to check the FAQs and the wiki too. Your answers may already be there. Do you want to support EnTT? Consider becoming a sponsor or making a donation via PayPal. Many thanks to these people and special thanks to: WarningWe apologize to our kind users for not posting updates every three days saying that we are faster than three days ago and better than everyone else, but consider it done. In the meantime, enjoy a library that just works without having to constantly remind ourselves. Table of Contents Introduction Code Example Motivation Benchmark Integration Requirements CMake Natvis support Packaging Tools pkg-config Documentation Tests EnTT in Action Extensions Contributors License Introduction The entity-component-system (also known as ECS) is an architectural pattern used mostly in game development. For further details: Entity Systems Wiki Evolve Your Hierarchy ECS on Wikipedia This project started off as a pure entity-component system. Over time the codebase has grown as more and more classes and functionalities were added. Here is a brief, yet incomplete list of what it offers today: Support for user implementations of the Standard Template Library. Built-in RTTI system mostly similar to the standard one. Incredibly fast entity-component system with its own pay for what you use policy, unconstrained component types with optional pointer stability and hooks for storage customization. General purpose execution graph builder for optimal scheduling. A built-in, non-intrusive and macro-free runtime reflection system. Static polymorphism made simple and within everyone's reach. A few homemade containers, like a sparse set based hash map. All that is needed for resource management (cache, loaders, handles). Delegates, signal handlers and a tiny event dispatcher. And much more! Check out the wiki. This list as well as the project are a work in progress. The whole API is fully documented for those who are brave enough to read it. Please, do note that all tools are also DLL-friendly now and run smoothly across boundaries. NoteA lot of stuff was invented here, but we remain humble and let people copy it without giving us credit. The good and the bad of open source, but bragging is for others. Feel free to get inspired. One thing known to most is that EnTT is also used in Minecraft. Given that the game is available literally everywhere, I can confidently say that the library has been sufficiently tested on every platform that can come to mind. Code Example #include <entt/entt.hpp> struct position { float x; float y; }; struct velocity { float dx; float dy; }; void update(entt::registry &registry) { auto view = registry.view<const position, velocity>(); // use a callback view.each([](const auto &pos, auto &vel) { /* ... */ }); // use an extended callback view.each([](const auto entity, const auto &pos, auto &vel) { /* ... */ }); // use a range-for for(auto [entity, pos, vel]: view.each()) { // ... } // use forward iterators and get only the components of interest for(auto entity: view) { auto &vel = view.get<velocity>(entity); // ... } } int main() { entt::registry registry; for(auto i = 0u; i < 10u; ++i) { const auto entity = registry.create(); registry.emplace<position>(entity, i * 1.f, i * 1.f); if(i % 2 == 0) { registry.emplace<velocity>(entity, i * .1f, i * .1f); } } update(registry); } Motivation I started developing EnTT for the wrong reason: my goal was to design an entity-component system to beat another well known open source library both in terms of performance and possibly memory usage. In the end, I did it, but it wasn't very satisfying. Actually it wasn't satisfying at all. The fastest and nothing more, fairly little indeed. When I realized it, I tried hard to keep intact the great performance of EnTT and to add all the features I wanted to see in my own library at the same time. Nowadays, EnTT is finally what I was looking for: still faster than its competitors, lower memory usage in the average case, a really good API and an amazing set of features. And even more, of course. NoteIf the EnTT API looks familiar, it's probably because it's been copied a lot elsewhere (often without much ado). Credit where credit is due though, the initial design was heavily inspired by EntityX, another popular C++ library. Benchmark For what it's worth, you'll never see me trying to make other projects look bad or offer dubious comparisons just to make this library seem cooler. I leave this activity to others, if they enjoy it (and it seems that some people actually like it). I prefer to make better use of my time. If you are interested, you can compile the benchmark test in release mode (to enable compiler optimizations, otherwise it would make little sense) by setting the ENTT_BUILD_BENCHMARK option of CMake to ON, then evaluate yourself whether you're satisfied with the results or not. There are also a lot of projects out there that use EnTT as a basis for comparison (this should already tell you a lot). Many of these benchmarks are completely wrong, many others are simply incomplete, good at omitting some information and using the wrong function to
Read the full README on GitHub

What Hacker News says

9 sources
When I use C++ (for personal projects), it tends to be because of the libraries I want to use (eg EnTT[1] or Immer[2], both of which use templates so can't be easily used from other languages). Eventually something like Rust or D may have equivalents to all the libraries I want and I could use those for such projects instead, but for now, if I want to use those things, I need to use C++. You may also want to look at this talk: "What C++ got Right" [3], where the guy shows some nice things that C++ does that other languages don't. The other languages versions of the code he shows does tend to be simpler and nicer, but the C++ versions tend to give you more control. Some people value that control (rightly or wrongly) and other languages that don't provide it will never feel right to them. I do personally quite like Rust and I'm eagerly watc
Read the rest
hing Zig and some of the other new contenders, so I'm all for moving to something more pleasant than C++, but modern C++ gives just enough new niceness that I don't feel pushed to jump ship until the alternatives check more boxes. [1] https://github.com/skypjack/entt [2] https://github.com/arximboldi/immer [3] https://www.youtube.com/watch?v=bMSrNBcir4Y&t=1757s
In Std::visit is everything wrong with modern C++ (2017)
The kind of stuff you are able to do with entt (https://github.com/skypjack/entt#code-example) like `entities.view<Position, Sprite>.each([&](auto &pos, auto &vel) { ... });` is super awesome IMO. And then it compiles down to just directly inlined straight walks over the respective arrays (looking in godbolt.org). It's basically almost optimal for it. I do agree that you can go insane with templates and have a bad time. You just have to choose well. However if you have a problem with there existing other problematic code in the same language (that may be separate from your code), then C++ is maybe not the best fit. There's a lot of C++ out there.
In C++20 has been approved
I'd written C++ a bunch around 2006-2011 for gamedev, and jumped back into it recently and am really really loving it. I had a while in between of leaning into C which I think is important to do, to move away from the super OO based approach which I think C++ isn't necessarily about anymore. Highlights for me: - Type deduction -- basically using auto for variable declarations. - Move semantics makes RAII actually usable since you can make heavy / important objects but then move them elsewhere and still have their lifetime be automatically managed. I use this in my game engine to wrap physics bodies etc. so that they are automatically removed from the scene when the component containing them is dropped (I'm using an ECS). A neat thing also is you can delete copy constructors and force certain types to be "move-only." - Having been in C-lan
Read the rest
d for a bit, I'm appreciating the ready availability of std::vector and std::string again. Also std::array is awesome. - Lambdas are amazing. I often make simple control structure utilities in my modules that accept lambdas, and they are often inlined. I don't often do lambdas where I 'save them and call them later' -- they are mostly immediately called. This makes it safe to use reference captures. As for C++20 I am mostly interested in seeing how it goes with modules Also the `requires` keyword will simplify some of my uses of `enable_if`. A lot of the good stuff is also due to ecosystem and tooling vs. just language. My game works everywhere now: native macOS, Windows and iOS, but especially web due to Wasm! It also has an immediate mode API for rendering UI in Wasm, which I use along with some simple reflection to get an automatic entity inspector: https://m.imgur.com/dyUtL8f The entire gameplay code fits in like 700 lines: https://gist.github.com/nikki93/5893543a5e3d76a7858d54b74a4c... You can see how I don't do any pointer stuff or manual recource / memory management there at all. Tbh in many cases with precompiled headers it almost feels like it builds about as fast as webpack. And then my "publish" is a simple rsync of static files to the server. Another tooling / ecosystem thing lately has been godbolt.org which is wonderful for seeing immediately the asm that ur code generates. Which then makes you realize how good optimizing compilers for C++ are these days. I don't think other languages have come so far. And then with godbolt.org you can learn which constructs produce what code. I'm using entt for the ECS: https://github.com/skypjack/entt you can see how it encourages the use of POD structs and non-OO code for the most part. It feels good to use C++ in that style as a C with the above features. I just basically don't use vtables / RTTI anymore. I do use templates a fair amount. I do concede that this enthusiasm may have a lot to do with having had experience in C/C++ already for a while. If I was completely new to the language it'd be a lot harder. The backwards compatibility lets me keep all my experience (even if the point isn't to write exactly like how I wrote before, but to understand the motivation for the new features). I've also dug into Go, Rust, Nim, Common Lisp, Haskell, ... but weirdly modern C++ has been the best combination of ergonomics, control, and portability. Especially for Wasm you really just want deterministic resource management. I'd probably still combine it with Lua or JS for scripting eventually. You do have to invest a lot of energy into learning the language and caring about the details, but I think C++ is very well positioned to reward you for that investment, and you are also rewarded continuously and early.
In C++20 has been approved
I think you can get far with this type of code organization, and using methods just for easier name lookup of functions associated with a particular type (static lookup -- no vtables / RTTI). Function overload sets are also useful. Libraries like https://github.com/skypjack/entt really help here too--for an 'ontology of alive objects' its felt like using an entity-component-system has been more ergonomic vs. a big tree of inheritancey classes.
In The problem with C
I was looking at EnTT's API when building a little toy ECS of my own in JavaScript. Since I'm working in JS, I haven't really tried to copy its internal architecture since it doesn't quite make sense for a higher-level GC'd runtime, but I think the public API was a really handy reference for the kinds of things a practical ECS needs to have. It's a really impressive and robust project, and the documentation is super thorough and worth a peek if you have any interest in game architecture. (slightly off-topic, but I'm excited to have a venue to ramble a bit about this:) ECS is really cool, and I'm excited about using it more for my games. The "cheap" (de)serialization by moving all state into pure, data-only components is really fascinating - I've been playing around with building networked multiplayer games for a while now, and I'm current
Read the rest
ly experimenting with rollback netcode. A key part of rollback is saving your state every frame so you can load it if you need to roll back, and ECS makes saving/loading easier to reason about, since you can "just" grab the components and their associated entity IDs and load if needed (EnTT, for the record, has an API for this[1], though they leave the actual (de)serialization up to you). Of course, JS's lack of a memcpy equivalent makes this much harder than what you could do in C++, which has lead me to experiment with immer[2] in my ECS, which uses structural sharing to avoid mutation, so you can get a "copy" of your state by just keeping a reference to it, as future updates will make new objects. This, of course, theoretically could make a ton of garbage (e.g. updating your position every frame would create a new Position object every frame), which is not great for high performance games. I'm not sure how bad this will be in practice - JS GC is relatively smart and fast these days, but I haven't tried doing much beyond little pong or platformer demos yet. I'd also imagine that, like, doing a deep clone of my state tree every frame (or doing the whole JSON.stringify/parse dance if I stick to primitive values) probably generates just as much garbage. Maybe if I could integrate immer with some kind of object pool it'd avoid these issues, but I have no idea how useful object pooling is in practice in JS... [1] https://github.com/skypjack/entt/wiki/Crash-Course:-entity-c... [2] https://github.com/immerjs/immer
In EnTT: Gaming meets Modern C++

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.