C++ no-dependencies

Open-source C++ projects categorized as no-dependencies

Top 23 C++ no-dependency Projects

no-dependencies
  1. Catch

    A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)

    Project mention: Five Advanced Techniques to Improve Automated Testing by 50% | dev.to | 2025-01-04

    Identification: Use tools like pytest-rerunfailures, TestNg, and Catch2 to automatically rerun failed tests.

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. entt

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

    Project mention: Using Jolt with flecs & Dear ImGui: Game Physics Introspection | dev.to | 2024-04-17

    EnTT is a popular alternative to flecs for C++, which has different performance/memory characteristics.

  4. Magic Enum C++

    Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code

  5. CLI11

    CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.

    Project mention: Russ Cox is stepping down as the Go tech lead | news.ycombinator.com | 2024-08-01

    > I switched from C++ to C about 7 years ago and never looked back

    I'm definitely considering the same, and you're right - it's not C++ itself that appeals to me at all, it's the libraries. I'm not sure what C libraries I'd use for collections (instead of the STL and Abseil [0]), or in lieu of CLI11 [1] or Dear ImGui [2].

    [0] https://abseil.io/about/design/swisstables

    [1] https://github.com/CLIUtils/CLI11

    [2] https://github.com/ocornut/imgui

  6. Nameof C++

    Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum

  7. tomlplusplus

    Header-only TOML config file parser and serializer for C++17.

  8. refl-cpp

    Static reflection for C++17 (compile-time enumeration, attributes, proxies, overloads, template functions, metaprogramming).

    Project mention: Out of bounds memory access in V8 in Google Chrome prior to 120.0.6099.224 | news.ycombinator.com | 2024-01-25

    You'd be surprised how much friction you'd have for C++ reflection. First, since it's a custom build step, you can do a mix of custom code gen and C++ constexpr/consteval for static reflection. Here's a header-only implementation for adding compile time reflection purely within the language [1]. And v8 already does dynamic code gen as part of its build process (to generate the snapshot to speedup instantiation of the isolate). Dynamic reflection is a must since JS is a dynamic language with reflection support.

    Now of course, I don't know the specific details of reflection needed for the abstractions you reference and clearly V8 is still doing some amount of manual IR generation, so it's possible it would be a substantial investment to actually retrofit those techniques into v8. One would have to do a careful analysis of historical security exploits & specific techniques and their ability to prevent to figure out if it's worth adding those abstractions (especially since there is a potential performance tradeoff as you mention). As I said, I think there's insufficient research in this area to establish a compelling body of best practices (not to take away from the contributions of the GraalJS team to this space).

    [1] https://github.com/veselink1/refl-cpp

  9. unordered_dense

    A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion

  10. UNITS

    a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.

    Project mention: Python type hints may not be not for me in practice | news.ycombinator.com | 2024-11-27

    I suspect C++ still comes the closest to what you’re asking for today, at least among mainstream programming languages.

    Matrix dimensions are certainly doable, for example, because templates representing mathematical types like matrices and vectors can be parametrised by integers defining their dimension(s) as well as the type of an individual element.

    You can also use template wizardry to write libraries like mp-units¹ or units² that provide explicit representations for numerical values with units. You can even get fancy with user-defined literals so you can write things like 0.5_m and have a suitably-typed value created (though that particular trick does get less useful once you need arbitrary compound units like kg·m·s⁻²).

    Both of those are fairly well-defined problems and the solutions available do provide a good degree of static checking at compile time.

    IMHO, the range question is the trickiest one of your three examples, because in real mathematical code there are so many different things you might want to constrain. You could define a parametrised type representing open or closed ranges of integers between X and Y easily enough, but how far down the rabbit hole do you go? Fractional values with attached precision/error metadata? The 572 specific varieties of matrix that get defined in a linear algebra textbook, and which variety you get back when you compute a product of any two of them?

    ¹ https://mpusz.github.io/mp-units/

    ² http://nholthaus.github.io/units/

  11. libriscv

    The fastest RISC-V sandbox

    Project mention: An Introduction to Low-Latency Scripting for Game Engines | news.ycombinator.com | 2024-05-27
  12. nanoprintf

    The smallest public printf implementation for its feature set.

  13. SaneCppLibraries

    Platform Abstraction C++ Libraries

    Project mention: Sane C++ Libraries | news.ycombinator.com | 2024-01-27

    That's why I am currently against its use, unless there is a very special case.

    Regarding UniquePtr I used to have one but I later on decided to remove it.

    https://github.com/Pagghiu/SaneCppLibraries/commit/9149e28

    However, that being said the library is lean enough so that you can still use it with smart pointers provided by any other library (including the standard one) if that's your preference.

  14. span-lite

    span lite - A C++20-like span for C++98, C++11 and later in a single-file header-only library

  15. string-view-lite

    string_view lite - A C++17-like string_view for C++98, C++11 and later in a single-file header-only library

  16. expected-lite

    expected lite - Expected objects in C++11 and later in a single-file header-only library

  17. au

    A C++14-compatible physical units library with no dependencies and a single-file delivery option. Emphasis on safety, accessibility, performance, and developer experience. (by aurora-opensource)

  18. leaf

    Lightweight Error Augmentation Framework (by boostorg)

  19. semver

    Semantic Versioning for modern C++ (by Neargye)

  20. uni-algo

    Unicode Algorithms Implementation for C/C++

    Project mention: uni-algo: Unicode Algorithms Implementation for C/C++ | news.ycombinator.com | 2024-03-25
  21. result

    A lightweight C++11-compatible error-handling mechanism (by bitwizeshift)

  22. scope_guard

    A modern C++ scope guard that is easy to use but hard to misuse.

  23. influxdb-cpp

    💜 C++ client for InfluxDB.

  24. ring-span-lite

    ring-span lite - A C++yy-like ring_span type for C++98, C++11 and later in a single-file header-only library

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

C++ no-dependencies discussion

Log in or Post with

C++ no-dependencies related posts

  • `DestroyJavaVM()` failing on OpenJ9?

    2 projects | /r/javahelp | 22 Apr 2023
  • [Cpp] Comment testez-vous la couverture du code C ++? Y a-t-il des solutions multiplateforme viables?

    1 project | /r/enfrancais | 21 Apr 2023
  • Is there a std::string::split or something similar?

    2 projects | /r/cpp_questions | 13 Mar 2023
  • If you limit an std::string in a class to be < 15 characters, can you assume that any time the string is read it will stay on the stack due to SSO?

    3 projects | /r/cpp | 8 Nov 2022
  • std::expected (with monadic interface) implementation in C++20 (P0323, P2505)

    3 projects | /r/cpp | 5 Jun 2022
  • GitHub - martinus/svector: Small Vector optimization

    2 projects | /r/cpp | 25 May 2022
  • C++ Return: std::any, std::optional, or std::variant?

    1 project | /r/cpp | 20 Sep 2021
  • A note from our sponsor - SaaSHub
    www.saashub.com | 20 Jan 2025
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

What are some of the best open-source no-dependency projects in C++? This list will help you:

# Project Stars
1 Catch 18,924
2 entt 10,476
3 Magic Enum C++ 5,116
4 CLI11 3,451
5 Nameof C++ 2,120
6 tomlplusplus 1,630
7 refl-cpp 1,078
8 unordered_dense 990
9 UNITS 978
10 libriscv 689
11 nanoprintf 630
12 SaneCppLibraries 545
13 span-lite 499
14 string-view-lite 429
15 expected-lite 425
16 au 337
17 leaf 318
18 semver 306
19 uni-algo 289
20 result 286
21 scope_guard 185
22 influxdb-cpp 170
23 ring-span-lite 154

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com

Did you know that C++ is
the 7th most popular programming language
based on number of references?