SonarCloud, a cloud-based static analysis tool for your CI/CD workflows, offers a one-click automatic analysis of C and C++ projects hosted on GitHub. Zero configuration and free for open-source projects! Analyze free. Learn more →
Top 23 C++ modern-cpp Projects
-
modern-cpp-tutorial
📚 Modern C++ Tutorial: C++11/14/17/20 On the Fly | https://changkun.de/modern-cpp/
Project mention: Learning platform for modern C++ with online exercises | /r/cpp_questions | 2023-02-11I'm going through this Modern C++ Tutorial right now. I didn't need to relearn what inheritance is, just the new language features that are useful.
-
Project mention: Focus: A simple and fast text editor written in Jai | news.ycombinator.com | 2023-09-02
https://pastebin.com/VPypiitk This is a very small experiment i did to learn the metaprogramming features. its an ECS library using the same model as entt (https://github.com/skypjack/entt). In 200 lines or so it does the equivalent of a few thousand lines of template heavy Cpp while compiling instantly and generating good debug code.
Some walkthrough:
Line 8 declares a SparseSet type as a fairly typical template. its just a struct with arrays of type T inside. Next lines implement getters/setters for this data structure
Line 46 Base_Registry things get interesting. This is a struct that holds a bunch of SparseSet of different types, and providers getters/setters for them by type. It uses code generation to do this. The initial #insert at the start of the class injects codegen that creates structure members from the type list the struct gets on its declaration. Note also how type-lists are a native structure in the lang, no need for variadics.
Line 99 i decide to do variadic style tail templates anyway for fun. I implement a function that takes a typelist and returns the tail, and the struct is created through recursion as one would do in cpp. Getters and setters for the View struct are also implemented through recursion
Line 143 has the for expansion. This is how you overload the for loop functionality to create custom iterators.
The rest of the code is just some basic test code that runs the thing.
-
InfluxDB
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
-
EA Standard Template Library
EASTL stands for Electronic Arts Standard Template Library. It is an extensive and robust implementation that has an emphasis on high performance.
-
Project mention: A site that hosts implementations of various programming algorithms in different languages | /r/programming | 2023-02-07
-
sol2
Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
As someone said, make the game data-driven is a good first step but I will say, also have some sort of way to add additional game logic. For C++ games, lua is really easy to embed the interpreter in your C++ binary, read in the files from a directory (like /mods) with the C++ filesystem api new in C++17, and it's very easy to use SoL to write an API for lua specific to your game. Many games use lua in this way and it's probably the most common mod path setup.
-
-
immer
Postmodern immutable and persistent data structures for C++ — value semantics at scale (by arximboldi)
Project mention: Show HN: A hash array-mapped trie implementation in C | news.ycombinator.com | 2023-07-10How does this compare to https://github.com/arximboldi/immer (other than the C/C++ difference)?
Also, it's my understanding that, in practice, persistent data structures require a garbage collector in order to handle deallocation when used in a general-purpose way. How does your implementation handle that?
-
SonarCloud
Analyze your C and C++ projects with just one click.. SonarCloud, a cloud-based static analysis tool for your CI/CD workflows, offers a one-click automatic analysis of C and C++ projects hosted on GitHub. Zero configuration and free for open-source projects! Analyze free.
-
-
Project mention: Introducing ZXORM - A C++20 ORM for SQLite with Compile Time Type Safety | /r/cpp | 2023-03-30
Obligatory "how does it compare to" https://github.com/fnc12/sqlite_orm ?
-
-
uvw
Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
-
Project mention: RISC-V support (super-duper ultra WIP) by ElectrodeYT · Pull Request #534 · managarm/managarm | /r/RISCV | 2023-07-09
-
-
-
-
Duke Nukem 2 has a source port called Rigel Engine: https://github.com/lethal-guitar/RigelEngine/tags
-
Project mention: Vulkan all the way: Transitioning to a modern low-level graphics API in academia | /r/programming | 2023-03-07
Sorry for late response! The one I like most is LibLava https://github.com/liblava/liblava I contributed a few features that it was missing for me, and a few other people have done the same, so it's somewhat battle tested. At least two people have used it in academic projects. I like that it gives you full access to the low level parts of Vulkan while still providing high level abstractions over a lot, especially the render loop. The biggest issue imo is lackluster documentation, but it's fairly well organized and readable source code. Build times are also pretty long due to its many dependencies.
-
cuda-api-wrappers
Thin C++-flavored header-only wrappers for core CUDA APIs: Runtime, Driver, NVRTC, NVTX.
1. This implements the clunky C-ish API; there's also the Modern-C++ API wrappers, with automatic error checking, RAII resource control etc.; see: https://github.com/eyalroz/cuda-api-wrappers (due disclosure: I'm the author)
2. Implementing the _runtime_ API is not the right choice; it's important to implement the _driver_ API, otherwise you can't isolate contexts, dynamically add newly-compiled JIT kernels via modules etc.
3. This is less than 3000 lines of code. Wrapping all of the core CUDA APIs (driver, runtime, NVTX, JIT compilation of CUDA-C++ and of PTX) took me > 14,000 LoC.
-
Mudlet is a crossplatform (Windows, macOS, Linux) C++ application that embeds Lua - could be a good way to get started with this kind of development in a safe environment and get some experience under your sleeve.
-
-
Project mention: The Val Object Model : Dave Abrahams, Sean Parent, Dimitri Racordon, David Sankel | /r/cpp | 2022-11-08
-
-
Project mention: State machine library for portable embedded application (C++11) | /r/embedded | 2023-06-08
-
Mergify
Tired of breaking your main and manually rebasing outdated pull requests?. Managing outdated pull requests is time-consuming. Mergify's Merge Queue automates your pull request management & merging. It's fully integrated to GitHub & coordinated with any CI. Start focusing on code. Try Mergify for free.
C++ modern-cpp related posts
- Crash Course: entity component system
- Show HN: A hash array-mapped trie implementation in C
- RISC-V support (super-duper ultra WIP) by ElectrodeYT · Pull Request #534 · managarm/managarm
- Introducing Ecsact
- value semantics and spans/views
- Where can I find the juiciest, most complex and modern c++ code?
- I've added benchmarks to my C++20 work stealing thread pool implementation
-
A note from our sponsor - SonarCloud
www.sonarsource.com | 23 Sep 2023
Index
What are some of the best open-source modern-cpp projects in C++? This list will help you:
Project | Stars | |
---|---|---|
1 | modern-cpp-tutorial | 21,696 |
2 | entt | 8,615 |
3 | EA Standard Template Library | 7,339 |
4 | LeetCode-Solutions | 4,222 |
5 | sol2 | 3,609 |
6 | Elements C++ GUI library | 2,725 |
7 | immer | 2,346 |
8 | nana | 2,135 |
9 | sqlite_orm | 1,949 |
10 | eos | 1,835 |
11 | uvw | 1,651 |
12 | managarm | 1,192 |
13 | stdgpu | 992 |
14 | q | 986 |
15 | butano | 840 |
16 | RigelEngine | 804 |
17 | liblava | 663 |
18 | cuda-api-wrappers | 650 |
19 | Mudlet | 645 |
20 | csv2 | 461 |
21 | structopt | 436 |
22 | hlslpp | 425 |
23 | HFSM2 | 381 |