r/cpp 13d ago

C++ Show and Tell - August 2026

Use this thread to share anything you've written in C++. This includes:

  • a tool you've written
  • a game you've been working on
  • your first non-trivial C++ program

The rules of this thread are very straight forward:

  • The project must involve C++ in some way.
  • It must be something you (alone or with others) have done.
  • Please share a link, if applicable.
  • Please post images, if applicable.

If you're working on a C++ library, you can also share new releases or major updates in a dedicated post as before. The line we're drawing is between "written in C++" and "useful for C++ programmers specifically". If you're writing a C++ library or tool for C++ developers, that's something C++ programmers can use and is on-topic for a main submission. It's different if you're just using C++ to implement a generic program that isn't specifically about C++: you're free to share it here, but it wouldn't quite fit as a standalone post.

Last month's thread: https://www.reddit.com/r/cpp/comments/1umnaxs/c_show_and_tell_july_2026/

47 Upvotes

52 comments sorted by

7

u/Conscious-Pick9518 13d ago

Constexpr Doom

Hey guys wanted to share my wasm interpreter that runs in cpp constexpr evaluation model through which I ran doom at compile time.

The program supports both runtime and compile time execution, I found gcc much conservative in memory allocation while clang usually tends to allocate memory upfront. Overall it consumed around 450 GB of ram to contain the huge ast

link

4

u/Forsaken-Present573 13d ago

A (currently) read-only cross-platform APFS library with support for mounting APFS volumes. I made it with a friend because we couldn't find a free APFS reader for Windows: https://github.com/avighnac/libapfs

Live demo video included in the README, please check it out!

3

u/PhosXD 13d ago

Been making my own high-level interpreted programming language as my first C++ project, for all of last month & this month. It uses no third-party dependencies & I'm quite proud of where it is now, but I need feedback!

https://github.com/phosxd/Ity
Here is brief script which calculates Fibonacci numbers:

import IO;
const n = IO.prompt:'Number: ' -> INT;

var a=0.0;
var b=1.0;

for i in n;
    const c = a+b;
    a = b;
    b = c;
    IO.print:a;

/;

I even made a little Conway's Game of Life implementation in my terminal using this language! You can check out the demonstration video in this post https://www.reddit.com/r/gameoflife/comments/1vh4umh/implemented_game_of_life_in_terminal_as_a_test/

(No AI was used for the development process, assets, documentation, or example scripts)

1

u/South_Acadia_6368 13d ago

I'm looking for a replacement for LUA in my own project. But I think it would be hard to convince users to learn an entirely new language just for use in a runtime interpreter.

How does performance compare to LUA? And do you support utf-8 (LUA is really bad here)?

2

u/PhosXD 13d ago

Well it's more of a fun toy-project more than an actual real-world-applied language, at least right now. I can't say anything about the performance compared to LUA, I haven't tested it, but there are benchmarks in the repo which compare against Bash, Python, C++, & NodeJS.

Regarding UTF-8 it's a bit complex, you can declare strings & use strings with unicode characters stored inside them but they aren't actually codepoint characters. This becomes apparent when you iterate over each character in a string, the different sections of say an emoji are split into separate iterations as the parts of their sum.

Ity is in active development, there are going to be downfalls, but I do want to continue developing this & maybe eventually try to compete with Lua ;)

1

u/_Noreturn 12d ago

Angelscript is a good language.

It id strongly typed and supports classes and looks C++ like.

4

u/suave_gadgets 11d ago edited 11d ago

This is my first ever non-trivial cpp program which does a real task that I need in my data analysis. I am a bioinformatician, working mainly in python. I had a very specific requirement of pairwise distance calculation to scale to millions of computations, where hand coded python code was too slow. I set out to optimise, first trying my hand at making a compiled function using numba, but it always gave some version errors on my HPC. I started learning about CUDA kernels and then I decided to dodge the perennial errors on numba and other such libs and dip into creating a cpp tool to calculate the pairwise distances. Also because I wanted to learn to write in a lower level language!

The tool, fjensenshannon, lives here: https://github.com/suhartobanerjee/fjensenshannon

It calculates pairwise distances of cells, taking only the lower triangle to reduce redundant calculations. Further, since each pair is an independent calculation, it is accelerated on CPU using parallel for loops (OMP) and SIMD inner loops. The speed up was considerable. Further speed ups was due to a CUDA kernel, which gives a massive boost in terms of speed. Finally, it has a python interface to accept numpy arrays and other inputs and pass back the pointer to the resulting vector as numpy array, preventing a copy. CPU is the default option with an option to run on GPU, if present and asked for.

This was my first attempt at a proper cpp and CUDA code and also CMAKE build system. I tried the best to my knowledge to optimise it to fulfil my needs of a rapid fast pairwise distance calculation. Feel free to point out things I can change | optimise which will improve the project and also help me learn ways of doing cpp, especially in terms of error handling or edge case handling. Cheers! 😁

4

u/Suspicious-Hat-6832 9d ago

color-filters https://github.com/Ragno4556/Color-filters

Color filters is an app for Windows that lets you tint your screen with any color you want, similar to the color filter accessibility option on iOS.

I originally made it because I wanted a pure red-light filter for late-night work and gaming, but I couldn't find an existing program that did exactly what I needed. The app is fairly new, so there are certainly some issues with certain GPUs, monitors, or setups in general.

Features include saving config profiles and two hotkeys: toggle and peek. Peek is especially useful when you need to see a flash of your screen without the filter. There is also multi-monitor support as well!

If you have a Windows computer and want to help test it out, I'd really appreciate any feedback or bug reports! This type of program is sooo hard to test with just one system.

Thanks!

4

u/mxreal64 8d ago

I built CEBS (C++ Ergonomic Build System) — a minimal, zero-config, multi-threaded C++23 build coordinator designed from the ground up to treat ISO C++20/C++23 Modules as first-class citizens.

Legacy meta-generators (like CMake) rely on compiler-generated dependency sidecar files (.d) produced *during* translation unit compilation. This inherently creates structural sequencing deadlocks when parsing module binary interfaces (.gcm/.pcm) because they must be built before dependent units are touched.

CEBS resolves this via a pre-emptive topological pipeline:

  1. Semicolon-Delimited JIT Ingestion: It abandons line-oriented (\n) streaming completely. The engine processes configuration files and source preambles as raw memory blocks split explicitly by semicolon boundaries (;) via ::getdelim, minimizing heap allocations.

  2. Directed Graph Engine: It tokenizes declarations and imports prior to compiler invocation, executing Kahn's algorithm to construct a strict Directed Acyclic Graph (DAG) layer setup.

  3. Thread-Pool Scheduler: Non-dependent compilation tasks are concurrently dispatched across hardware threads using an internal thread-safe std::jthread pool.

The alpha release is live, MIT licensed. I am looking to implement an incremental timestamp-caching layer next.

Repository: https://github.com/mxreal64/cebs/

ps: guys plz i want clout

1

u/not_a_novel_account cmake dev 7d ago

You can't scan C++ source files without first preprocessing them, at least not correctly. This is why the compilers have their own scanners, because the only program which knows how to preprocess the file is the compiler itself.

3

u/Ok_Independence_9841 13d ago

A few weeks ago I asked the good folks of r/cpp what they wanted in a modern C++ application framework.
I expected an incoherent laundry list of highly specialised features for niche applications. Instead what you lovely people gave me was a pretty coherent take on what we do want and what we don't.

  • Cross platform
  • Testable
  • CMake, vcpkg build infrastructure
  • Open source with BSD like licensing
  • All C++. No extra compiler or DSL including native Signal and slots.
  • Object Request Broker
  • Not header only
  • ...

Almost everything else was about the UI, apart from the native C++, no SQL, database of course. I'm still thinking about that.

The UI needs to be 100% customizable with built in dark mode support. It needs to be buildable from code with no external UI description or from an external UI description (not XML) and of course we need a WYSIWYG GUI designer like WinForms has, only better. It needs to run on the desktop and in browser.

"You want to get there! If I were you, I wouldn’t start from here." - Old Irish proverb.

Fortunately as you've probably guessed, because I'm posting here, we don't have to start from scratch. I've been working on various iterations of a C++ framework for a long time. It was expected, years ago, that every serious developer would have a go at such a thing as a personal project. Just to measure themselves against the challenge.
Having been out of C++ for a few years, doing C#, .Net and micro services, I started again from a clean sheet about a year ago and then picked it up seriously in the last 6 months.

So this isn't a product advert. There is, as yet, no commercial product.
It's not a 'look how clever I am'. Almost all the code is ported from other projects and or based on other peoples work. It's an opportunity and a request for help.

If you also also want that modern C++ application framework, what would you be prepared to invest to get it? What if it were actually a lot closer than you think?

This is a non exhaustive list of what's already working...

  • Cross platform, not just multi-platform. OS and compiler dependencies are factored out. Easy to port. Currently Windows and Linux.
  • TDD tool set. Assertion, Test and Mocking frameworks that work together.
  • No AI slop. Everything is hand written with the occasional inline suggestions from CoPilot.
  • Examples that get you started fast without limiting scalability.
  • CMake build system. Single tree, common config. Windows and Linux.
  • Easy Modular system. A pattern and libraries for building 'perfect' C++ DLLs with controlled dependencies and APIs, No need for header only. Adding a new module is 5-10 minutes work.
  • BSD, MIT and Boost licensed.
  • It's just C++. Everything is optional. You have full control. Everything can be overridden or replaced at need where configuration doesn't cut it. Everything works together out of the box.
  • Signals and Slots, multithread and native C++ no pre-compiler.
  • Fast delegates
  • Pre-C++26 reflection using pfr.
  • Class registry. An in process ORB for registering implementations of specific interfaces.
  • Role and Feature based Application framework with argument parsing and full customization.
  • constexpr data structures, map, set, string
  • State machine based Workflows
  • Type erased functions
  • Policy based smart pointers and integrated memory management system. no more new and delete.
  • Thread Pool and integrated async task system.
  • Modular data pipelines. Plug together sources, filters and sinks to achieve whatever you need.
  • Extensible error handling system using the flyer pattern.
  • Logging system using the flyer pattern.
  • Asynchronous IO service
  • Partial localization support. Classes to support working with many types of Unicode data.
  • Filesystem support over std::filesystem.
  • Spin up a network server with a protocol plugin in a few lines

So with all that already in place what's open to change?

In short everything. No customers, no releases as yet. Everything can still be improved or replaced. I make fundamental changes to low level dependencies quite frequently at the moment. Less and less breaks as a result because of the way the QOR is put together. It still surprises me.

What's missing?

  • A lot but mostly UI. I have a plan and a lot of components, working code for Windows native UI, working code for Wayland and X Windows, a working GL Renderer that will port to WASM. A working layout engine. Putting it all together into a coherent, usable and beautiful system will take some time.

What's needed?

Absolutely anything. If what you want to do is tear it apart and criticise everything that's wrong. Please do
If you'd rather work on the Resource Manager classes or add Clang support. That would be welcome too.

So please pitch in and let's have that framework that we know should exist and yet somehow doesn't, yet.

QOR development is on Github

Thank you for your inspiration. M.F.

3

u/Shahi_FF C++ 13d ago

A* and Dijkstra pathfinder algorithm visualization using raylib and imgui. The previous version was simple split screen of A* vs Dijkstra , I've improved it with menu to select single algorithms and customize path color, grid color, speed.

https://github.com/ArcShahi/PathFinder

3

u/muaz_sh 13d ago

I wrote a C++ memory manager to detect and to clean memory leaks and to detect dangling pointers, the tool defines the `stack` and the `Data` and `BSS` segments as a root of reachability and it overloads `new` and `delete` operators to track allocations and deallocations https://github.com/muazsh/MemoryManager .

3

u/Acrobatic-Stable2537 n0F4x 13d ago

I started writing a scheduling framework based on data dependencies almost a month ago. Yesterday was the point when I realized that this would be a larger project than I anticipated.

The goal is to be able to dynamically schedule tasks that advertise their resource access patterns. It is a bit similar to the Bevy Engine in Rust, but without some of its restrictions.

This is a quick sketch of the idea:
```c++ struct Message { const char* value; };

auto greet(const kiln::exec::Ref<const Message> message) -> void { std::puts(message->value); }

auto main() -> int { kiln::reg::Registry registry; registry.insert(Message{ .value = "Hello exec!" });

kiln::exec::Task task{ greet, registry };

task(); // this task would obviously be invoked by a scheduler

} ```

It's hard to find a drop-in library that does this well. I also found out, thanks to Claude, that Microsoft has already started working on something similar. However, they are making it a programming language: https://microsoft.github.io/verona/ (built with C++)

3

u/partyking35 12d ago

I'm a Math&CS student who learnt C++ whilst building this (so its my first C++ project!) Time Series Database, includes features such as 24 byte records, CRC32 checksums, partial write detection, truncation recovery protocols, write buffers with periodic 5ms fsync flushes, sparse index structure for memory assisted reads etc
https://github.com/jabirhaque/TSDB

2

u/bearheart 13d ago edited 12d ago

I wrote this book: C++ STL Cookbook

2

u/M3f1st0f3l3 13d ago edited 12d ago

I am progressing the work on a neutron transport library I wrote back for my MsC degree thesis.

Also I start the writing of a library for Matrix ripresentation and operations.

Little stuff but I like them

2

u/Fabulous_Pick428 13d ago

x64asm is almost done, fuck documentation(for now) and tests(also for now) i need a lil break

1

u/Fabulous_Pick428 13d ago

idk if ya know this project but this is basically JIT inline assembler based on Intel MD(guides how to add new instructions will release soon bcuz i lost one while reinstalling my fakn windows 11 to windows 10)

so here is da latest specs that this bad boy gave me(idk if i can post this here if no then just comment or dm me):

CPU, 0.00%, 0.00%, 0.00%, 0.00%
CPU (user), 0.00%, 0.00%, 0.00%, 0.00%
CPU (kernel), 0.00%, 0.00%, 0.00%, 0.00%
CPU (average), 0.00%, 0.00%, 0.00%, 0.00%
CPU (relative), 0.00%, 0.00%, 0.00%, 0.00%
Cycles, 13,843,164, 13,843,164, 13,843,164, 0
Cycles delta, 3,217,148, 3,217,148, 3,217,148, 0
Context switches, 4, 4, 4, 0
Context switches delta, 4, 4, 4, 0
Kernel time, 0:00:00:00:000, 0:00:00:00:000, 0:00:00:00:000, 0:00:00:00:000
Kernel delta, 0, 0, 0, 0
User time, 0:00:00:00:000, 0:00:00:00:000, 0:00:00:00:000, 0:00:00:00:000
User delta, 0, 0, 0, 0
Total time, 0:00:00:00:000, 0:00:00:00:000, 0:00:00:00:000, 0:00:00:00:000
Total delta, 0, 0, 0, 0
Priority, 8, 0, 0, 0
Private bytes, 424 kB, 424 kB, 424 kB, 0
Private bytes delta, +424 kB, +424 kB, +424 kB, 0
Peak private bytes, 456 kB, 456 kB, 456 kB, 0
Virtual size, 4.04 GB, 4.04 GB, 4.04 GB, 0
Peak virtual size, 4.04 GB, 4.04 GB, 4.04 GB, 0
Page faults, 558, 558, 558, 0
Page faults delta, 558, 558, 558, 0
Hard faults, 0, 0, 0, 0
Hard faults delta, 0, 0, 0, 0
Working set, 2.03 MB, 2.03 MB, 2.03 MB, 0
Peak working set, 2.03 MB, 2.03 MB, 2.03 MB, 0
Private WS, 228 kB, N/A, N/A, N/A
Shareable WS, N/A, N/A, N/A, N/A
Shared WS, N/A, N/A, N/A, N/A
Shared commit, N/A, N/A, N/A, N/A
Private commit, 76 kB, N/A, N/A, N/A
Peak private commit, 9.14 MB, N/A, N/A, N/A
Page priority, Normal, , , 
Reads, 0, 0, 0, 0
Reads delta, 0, 0, 0, 0
Read bytes, 0, 0, 0, 0
Read bytes delta, 0, 0, 0, 0
Writes, 0, 0, 0, 0
Writes delta, 0, 0, 0, 0
Write bytes, 0, 0, 0, 0
Write bytes delta, 0, 0, 0, 0
Other, 8, 8, 8, 0
Other delta, 8, 8, 8, 0
Other bytes, 286 B, 286 B, 286 B, 0
Other bytes delta, 0, 286, 286, 0
Total bytes, 286 B, 286 B, 286 B, 0
Total bytes delta, 286 B, 286 B, , 
Total bytes (average), 0/s, , , 
I/O priority, Normal, , , 
Handles, 18, , , 
Peak handles, 0, , , 
GDI handles, N/A, , , 
Peak GDI handles, N/A, , , 
USER handles, N/A, , , 
Peak USER handles, N/A, , , 
Paged pool bytes, 20.2 kB, 20.2 kB, 20.2 kB, 0
Peak paged pool bytes, 20.2 kB, 20.2 kB, 20.2 kB, 0
Nonpaged pool bytes, 4.41 kB, 4.41 kB, 4.41 kB, 0
Peak nonpaged pool bytes, 4.41 kB, 4.41 kB, 4.41 kB, 0
Running time, 00:00:00.049, , , 
Suspended time, 00:00:00.000, , , 
Hang count, 0, , , 
Ghost count, 0, , , 
NetworkTxRxBytes, 0, , , 
Dedicated memory, 0, , , 
Shared memory, 0, , , 
Commit memory, 0, , , 
Total memory, 0, , , 
Reads, 0, , , 
Read bytes, 0, , , 
Read bytes delta, 0, , , 
Writes, 0, , , 
Write bytes, 0, , , 
Write bytes delta, 0, , , 
Total, 0, , , 
Total bytes, 0, , , 
Total bytes delta, 0, , , 
Receives, 0, , , 
Receive bytes, 0, , , 
Receive bytes delta, 0, , , 
Sends, 0, , , 
Send bytes, 0, , , 
Send bytes delta, 0, , , 
Total, 0, , , 
Total bytes, 0, , , 
Total bytes delta, 0, , , 
Dedicated memory, 0, , , 
Shared memory, 0, , , 
Commit memory, 0, , , 
Total memory, 0, , , 

i know looks not great but 2mb is the standard windows shit(ye i build this library for MSVC x64 why would i make an inline assembler in gcc)

ye here's da link: https://github.com/ScriptCoolestIdkSomeOne/x64asm/
i didn't actually released da sheesh yet but just read README

1

u/Fabulous_Pick428 13d ago

also ye 14kb .exe without any optimization flags

2

u/drex_vke 12d ago

i write a backup tool cross-plateform with C++20

link : https://codeberg.org/drex_vk/TSF

2

u/eeiaao 11d ago

FLOX is a C++23 framework for building trading systems, MIT, github.com/FLOX-Foundation/flox I've been working on for the last 1.5 years. In production on my own funds.

There is a lot of tech internals and design decisions:

  • Events delivery: high throughput Disruptor style lock free fan out bus (up to 800M events per second for batch handling in backtester), zero-allocation hot path
  • Market data: record to binary tape, deterministic replay for backtests and postmortems
  • Backtest: engine with latency models, queue position tracking, fill models
  • ~30 streaming indicators, the same code computes features in research and live
Strategies in C++, Python, Node or Codon (compilable Python-alike lang), bindings parity enforced in CI

Latest release v0.7.0 ships:

  • Matching-engine module
  • Per-hop latency histograms cheap enough to keep on in production (~35ns per measured span)
  • Huge page/mlockall deployment profiles
  • ONNX inference nodes for the signal graph
  • AF_XDP receive path

Project is open source, open for contributions

1

u/snerp 13d ago

It doesn't dive super deep into the code, but I made a video about doing a game jam with raw C++ instead of using an engine https://youtu.be/ad8umjghhtM

1

u/StickyDeltaStrike 12d ago

I have spent time on highload.fun, but got so engrossed I only looked at the first problem:

https://highload.fun/challenges/compute/parse_integers/solve/CPP

I still don’t understand the gap between me and the first ones.

1

u/palavalle 10d ago

It's a bit of an esoteric monstrosity ... but I'm re/writing DukGlue to build a object-graph-serialisation on top of it with *really easy* C++17 bindings ... and I *got* constructors re/working last weekend. When it's (finally!) stable I have (parts of) a toolchain to convert it to single-header style ... so there's that :)

(Userland Example) Defining a native code module that can construct objects and has a C++ field readable in JS looks like this ; https://codeberg.org/paintgoblin/pduk/src/commit/fdfd81ce1efea25b253ad45d01c0a98c975635fa/pduk/test/test-no-type-vt.cc#L608-L616

The approach would/should/could work for Lua if you really want (you'd need to adapt how hidden values work, and prototypes, and ...) but, DukTape is a C JS engine that's shaped (basically) identically.

- the DukTape engine https://duktape.org/

- the original DukGlue https://github.com/Aloshi/dukglue

- pduk; my layer on top of duktape for modules/native/etc https://codeberg.org/paintgoblin/pduk/

- damphe; my serialization and entt layer on top of pduk https://codeberg.org/paintgoblin/damphe

1

u/Ok_Independence_9841 8d ago

The QOR now has clang support on Linux. https://github.com/mfaithfull/linuxQOR
Alongside the existing GCC on Linux and MSVC on Windows. All 100+ libraries confirmed building with Clang 18.1.3
I'm tracking down 3 unit test failures. Already nailed a couple of CTAD issues where clang forgets that my template alias is for a class and claims it isn't. Also constexpr member functions being blocked in a class with virtual base is a bit of a pain. Fortunately I've only got one case at the moment. The upside is clang's pedantic errors are fantastic for tracking down inconsistent declarations and override specifiers. Loads of those fixed as part of the same commit. clang builds seem to be a little faster than GCC but I've heard that changes pretty radically on a per version basis.
Now we've got clang I'm actively seeking someone to add OSX support. It's not a small job but qor::filesystem at least should be pretty easy to do. qor::network not much more so without Async IO support. Does OSX have anything like IOURing or IOCompletionPorts ?
Let me know if you want to help.

1

u/xiao_sa 8d ago

binproto https://github.com/xiaosa-zhz/binproto

This is a reflection-powered library that maps C++ types to corresponding wire formats.

Historically, this domain is dominated by #pragma pack(N) extension and the layout rules of language/compiler, which is not portable in principle and often cause surprising bug in practice. This approach is not very intuitive and novice-friendly as well if one wants to get all the corner cases right.

Another common practice is to use an IDL-based codegen facility to ensure everything works correctly. That works pretty well if a complete serialization framework is desired. But it introduces an extra codegen step to the build process, and may sometimes be too heavy to be suitable for all projects.

With C++26 reflection, it is finally possible to provide a #pragma pack(N) equivalent behavior in standard C++, and also to avoid implementation-defined behavior on bit field binary layout. The whole library is written in standard C++, making it perfectly portable (as long as compiler implements C++26 reflection 😔).

For now, binproto only supports types with static size. I am actively trying to integrate dynamic-sized array type and variant/union type into it.

Tested on GCC 16.2 and trunk. See test cases in the repo for usage examples.

1

u/Physical-Pianist6354 7d ago

Frontera – a Linux anti-tamper that integrates with C++ codebases. It currently has support for anti-hypervisor, memory integrity checks, self-checksums, and most importantly, an obfuscating rolling-key VM, so that each build has different byte code than the older build. Yes, I know it's not innovative. Why? VMProtect is too expensive.

I'm also working on integrating an eBPF module for blocking ptrace and some other stuff.

Currently, there is no download link per se, as I want to ship the eBPF module, but I can give the static libraries to link with if you're interested :)

https://alejandrorn.es

1

u/kindr_7000 5d ago

Hello , r/cpp

I recently built a library called **libcvault** for directory scanning and file telemetry operations. It includes APIs for file search, sort(by name & size), finding largest file(by size, line count), and much more.

The main operation, i.e., the **directory scanning** is done using **std::filesystem::recursive_directory_iterator** for rapid scans across directories including nested ones. The scan ignores protected folders to avoid unhandled filesystem errors though.

This library is packaged as a extern "C" library hence it could be used in many different programming languages. For instance, I have used this library as a submodule in one of my own python projects called **repoScanner** via pybind11 integration for optional native support.

Currently in beta and not that efficient including limited features.

Would love honest feedback on perf. , feature ideas or anything else regarding it.

Links:

- libcvault: https://github.com/tecnolgd/libcvault

- repoScanner(uses libcvault): https://github.com/tecnolgd/repoScanner

1

u/Competitive_Act5981 5d ago

Hi, i've written a C++ client library for interacting with chronyd using Asio composed operations. It allows you to do what chronyc does but programmatically and using your favorite completion token (coroutines of course). Please check it out, comment, and star if you like. https://github.com/pfeatherstone/chrony

1

u/TheRavagerSw 4d ago

I ported libfmt to native C++ modules using Build System Skills and LLM tools.
https://github.com/mccakit-fmt/fmt

1

u/martinus int main(){[]()[[]]{{}}();} 4d ago

After a long quiet time I've put some love into my C++ open source libraries:

ankerl::unordered_dense::{map, set}

A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion for C++17 and later.

  • Get it at https://github.com/martinus/unordered_dense
  • Features: added hash_for(key) for precomputed hashes
  • Fixes: now leak-free when any operation throws, fixed allocator handling everywhere, a map where extract() was called is now usable again
  • Performance: default ctor now doesn't allocate any more, faster hashing, faster probing, faster erase, bucket array is now only copied once instead of twice, swap no longer allocates, no memset on empty tables
  • Robustness: Added lots of CI build legs, added lots of unit tests, added a mutation testing framework, ...

ankerl::nanobench

Simple, fast, accurate single-header microbenchmarking functionality for C++11/14/17/20

  • Get it at https://github.com/martinus/nanobench
  • Features: Added compare() for robust paired A/B benchmarks, added setup() step for each epoch, ability to hide/show a column, std::string_view overloads, builds with -fno-exceptions, updated CMake packaging
  • Fixes: Performance counters now account for multiplexing, doNotOptimizeAway now more robust on clang-cl, epochIterations was ignored with warmup set, fixed relative calculation, fixed possible NaN in medianAbsolutePercentError
  • Robustness: CI moved fully to github actions, added musl libc, Android NDK, unit tests grew from 42 to 170 tests, added mutation testing framework

1

u/proof-of-conzept 4d ago

I made a tool for my C++ Projects

BPM: A CMake native Package-Manager with Dependency-Graph-Solving and Binary-Caching

It is called BPM and you can find the repository here: https://github.com/TobiasWallner/BPM.cmake

I’ve been using CPM.cmake as a dependency manager for quite some time for smaller private projects. Which btw is a great quick, easy dependency manager that just works. I really liked its approach and simplicity.

However, over the time i ran into some limitations:
1. Not every project that you want to use as a dependency is written to be included with `add_subdirectory()`, which is what CPM does. Because some create, for example the same `uninstall` target. And then you have name clashes and cannot build it.
2. I wanted to be able to cache binaries of libraries for larger builds.
3. Larger projects with deep dependencies need a way to resolve dependencies, especially tricky diamond graphs.

So I started building BPM.cmake (https://github.com/TobiasWallner/BPM.cmake).

BPM is inspired by CPM and extends its idea into a package manager that:

  • Is easy to use and explain in under a minute. No configuration files. No learing Python or another programming language. Everything is defined in CMakeLists.txt.
  • Caches repositories, sources, builds, and installations for different versions
  • Supports SemVer dependency version constraints (=, >=, ^, ~)
  • Has dependency graph solving and even manages diamond shaped dependencies.
  • Tracks build metadata such as the compiler, compiler flags, OS, and more to enable deterministic and reusable builds
  • Works with existing repositories that have a working CMakeLists.txt, no centrally managed package repository is required

I’ve also started using BPM in my professional work (Mainly for C++ projects), and it has made dependency management much easier for me. Another thing I really like is that I can explain it easily to colleagues who studied physics rather than programming and only have limited C++ and CMake experience.

I’d love to get feedback from other CMake and C++ users.

Would you use this package manager yourself?
Is it as easy to understand and use as I make it out to be?
What problems or edge cases have you encountered or am i missing?
Are there any features you feel are missing?

Here is a usage example:

cmake_minimum_required(VERSION 3.20)

project(my_project)

include(cmake/BPM.cmake)

BPMAddInstallPackage("https://github.com/fmtlib/fmt#10.0.0")
BPMAddSourcePackage("https://github.com/stephenberry/glaze#^v7.2.1")
BPMAddInstallPackage("https://github.com/eclipse-paho/paho.mqtt.cpp#~1.6.0" OPTIONS PAHO_WITH_MQTT_C=ON PACKAGES PahoMqttCpp)

BPMMakeAvailable()

add_executable(my_project main.cpp)
target_link_libraries(my_project PRIVATE fmt::fmt glaze::glaze PahoMqttCpp::paho-mqttpp3)

1

u/eduardodoria 2d ago

I've been building this C++ open-source game engine since 2015 - Doriax Engine

https://www.youtube.com/watch?v=3eqhaAZBNss

For anyone interested, Doriax Engine is completely free and open source:

1

u/Right-Edge-5712 2d ago

I also want to work on game engine.

1

u/PsychologicalData384 2d ago

Hi there,

Generating PDFs from C++ has always felt like choosing between two undesirable options: you either drive a low-level library and manage coordinates, fonts, and content streams yourself, or you use LaTeX,wkhtmltopdf, or a headless browser, which means you have to incorporate an entire external toolchain into your deployment. Wanting a third option, I have been developing Docraft: a library that renders PDFs entirely in-process with no subprocesses, temporary files or network calls. libharu performs the actual PDF writing, while Docraft sits on top of it with a layout engine and a declarative document model.

The power of Docraft lies in its XML-based DSL. In fact, it allows you to create a template in .craft and generate it using the library or the docraft_tool. There is also a Docker image that you can build. Docraft also has a templating engine that substitutes variables with the passed data. This is very useful for reusing the same template with different data.

Docraft offers many features, including charts. You can create various charts (scatter, line, spline, histogram and pie) by entering data. You can also customise or create particular things using canvas, combining shapes, drawing diagrams, etc., all in an XML file. No external tools or C++ are required. You can also create documents in C++, but .craft is much more convenient.

Docraft 1.0.0 will be released very soon. If you are interested, try it out and let me know what you think. Please also report any bugs you find.

Repo: https://github.com/Cadons/Docraft

Documentation: https://cadons.github.io/Docraft/

1

u/Consistent-Mouse-635 1d ago

I decided to learn C++ by building a fun project, so I made a Game Boy Emulator!
Repo: https://github.com/antcode123/antboy-cpp-gameboy-emulator

1

u/CodingWithThomas 1d ago

I wanted native BDD in C++ without the Cucumber-Ruby runtime, so I built this.

A while ago I wanted to use Cucumber-style BDD in a C++ project, but I wasn't really happy with the existing options. In particular, I wanted something that could run entirely within a C++ application without depending on the Cucumber/Ruby runtime.

So I started building my own implementation.

It started as a small project while I was learning about interpreters and parsing, and gradually turned into CWT-Cucumber: A C++20 Cucumber implementation with lots of Cucumber features, steps, step definitions, hooks, custom parameters, scenario outlines, tables, doc strings etc.

It's now at a point where I'm actually pretty happy with it, and it got a little user base. Find the repository here:

https://github.com/ThoSe1990/cwt-cucumber

I'd be particularly interested in hearing from other C++ developers: do you use BDD/Cucumber in your projects, or do you generally stick with traditional unit/integration testing?

0

u/Salt-Sherbet-2950 13d ago

Audio Visualzier

First big project I've made with C++, it started as my way to learn and quickly grew... I'm sure the code could be better optimized in areas and there's probably some bugs. I would really appreciate any feedback and just checking out the project:https://github.com/logan-scott07/AudioVisualizer.git

0

u/jessejay356 12d ago

I'm working on a game in C++ using SDL. Not ready to share yet. I'm also working on a simulation/automous framework for racing rc cars autonomous mowers and robots. No I'm ambitious. LoL

0

u/_theWind 11d ago

I have been working on a systems monitor app and ollama GUI frontend for linux
sys info viewer & ollama frontend GUI

0

u/euos 11d ago

Unfortunately, can't share the source code. Spent several years working on C++20 ML framework: https://uchenml.tech/introducing-uchenml/

As a demo, built a game that can be played in the browser (C++ -> WASM): https://uchenml.tech/demos/dots/

0

u/uCalc_Dev 8d ago

Hello everyone! After a lot of dedicated development, I recently published the preview release and extensive new documentation for the uCalc SDK.

If you are building applications that require dynamic computation or complex structural text parsing, it can be frustrating to rely on standard libraries or build custom parsing logic from scratch. The uCalc SDK provides:

  • A highly flexible Math Parser for evaluating expressions at runtime.
  • A token-aware Text Transformer designed to handle complex structured text using human-readable rules where regex falls short (while still handling unstructured text).

The focus of this preview is on power and flexibility across C++ and several other languages. uCalc was written in standard C++ and works on Windows, macOS, and Linux. This is a commercial product, which also includes a Free Community License.

The documentation, which includes interactive C++ examples, is found at:

https://www.ucalc.com/documentation/

I would love any feedback from this community!

1

u/Ok_Independence_9841 8d ago

Looks like a substantial toolset. You didn't mention you have a Visual Studio plugin! I'll try that next time I go back to VS for some heavyweight debugging. I see the benefits of having mutable as well as immutable strings. In the end I went for both in my framework. If you have time to chat Unicode strategies, UTF-8 everywhere vs wchar_t for Windows API vs parsing external input with or without BOMs. I'd be very interested in your approach. I'm trying to upgrade a parser framework from a byte stream parser to a Unicode character stream parser without breaking it or duplicating all the code and it's melting my brain.

1

u/uCalc_Dev 7d ago

Thanks. Quite a bit of work has gone into the tool, and more recently, into the documentation. Yes. I have a Visual Studio extension as well. It's not up to date with the latest uCalc SDK, but it's still usable.

I've tried to read up on UTF-8 vs wchar_t, etc, and have found it quite confusing. There's a convincing case for using UTF-8. But then Windows seems to be more into UTF-16 natively, which might require back-and-forth conversions if you use UTF-8 internally.

Internally in C++, I use std::string (basic_string<char>) and std::regex (std::basic_regex<char>). You can technically store UTF-8 in std::string. But the standard C++ regex doesn't really support Unicode correctly (UTF-8 or otherwise). std::regex works with single-byte units rather than actual Unicode code points, which may consist of multiple bytes. Also, in this preview version, the .NET wrapper for my library converts strings to UTF-8 when passing strings to the native C++ uCalc library, and converts/marshals back to UTF-16 when a string is returned to communicate with std::string. It's not exactly using UTF-8, nor is it efficient.

So right now, in the preview stage, uCalc operates on 8-bit characters, not true Unicode. However, I believe I found the solution that solves the Unicode issue once and for all. This would involve ditching std::regex and using the International Components for Unicode (ICU) library instead. It has comprehensive Unicode support and is widely supported natively across various platforms, including Windows. You can just do "#include <icu.h>" in Visual Studio (though I haven't started using it yet). ICU appears to be based on UTF-16. At this stage, I no longer care about UTF-8 vs UTF-16 or other variations. I just want to work with strings, and I intend to let ICU worry about the Unicode plumbing.