SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 compile-time Open-Source Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
lazy_importer
library for importing functions from dlls in a hidden, reverse engineer unfriendly way
-
UNITS
a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
ctpg
Compile Time Parser Generator is a C++ single header library which takes a language description as a C++ code and turns it into a LR1 table parser with a deterministic finite automaton lexical analyzer, all in compile time.
-
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)
-
nimja
typed and compiled template engine inspired by jinja2, twig and onionhammer/nim-templates for Nim.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
CTRE (https://github.com/hanickadot/compile-time-regular-expressions) ranges::views (filter, transform, etc.) (C++20) str.find() + str.substr() freopen to stdin + cin >> extraction Parser libraries
In case you didn't know https://github.com/juhaku/utoipa is really nice to generate openapi spec and have a swagger!
C++ Version
Project mention: Aspect Injector VS Metalama - a user suggested alternative | libhunt.com/r/aspect-injector | 2023-12-07
Let me know what you think, and if you think you can help out with an issue that affects library authors, please share your insights!
Since other people are posting other lang implementations... someone did it for zig too (probably less polished than this C++ lib) [1]. It is nice that the regexes can be used at compile time too ().
--
: I think the difference between C++ template language and Zig comptime is that Zig's comptime is almost equal as Zig's regular language, whereas the experience of programming C++ templates almost feels like learning a separate, equally complex language.
1: https://github.com/alexnask/ctregex.zig
Anything with a finite (200 is small even) number of units misses the algebraic structure of the problem mentioned in https://news.ycombinator.com/item?id=36988497 wherein multiplying|dividing two things gives you a (potentially) new unit which implies an open ended "space" of units.
To be concrete (hah!), in C++ a template meta-type with 12 signed integer parameters (6 numerators & 6 denominators for rational exponents of SI base units) might be one way to model it.
Unlike C++ template stuff, Nim macros (like Lisp macros) makes metaprogramming more like procedural programming - just against abstract syntax trees. I think that helps to shield some of this type complexity from users, but the documentation README https://github.com/SciNim/Unchained does better job than I can in an HN comment.
Of course, for unit system conversion, the number of dimensions (6 in SI, 3 in CGS/Gaussian) changes. So, for full generality you need compile-time (if you want static type integration/CT errors) linear algebra over a rational field (at least & conventionally) to project|inverse project. That might be theoretically possible in C++. I would think it very un-fun and unlikely to ever have been done. There's probably a Mathematica package, though.
compile-time related posts
-
todo_by: Compile-time lifetimes for comments.
-
Error formatter for template specializations
-
Compile-Time 'Fun' with Std.ranges
-
Is there comptime reflection in Rust proc-macro?
-
Force compiler to construct strings dynamically on the stack (win64)
-
Code criticism on decrypt function
-
Konst for Rust: Const equivalents of std functions, comparison, and parsing
-
A note from our sponsor - SaaSHub
www.saashub.com | 2 May 2024
Index
What are some of the best open-source compile-time projects? This list will help you:
Project | Stars | |
---|---|---|
1 | BuildTimeAnalyzer | 4,279 |
2 | compile-time-regular-expressions | 3,163 |
3 | utoipa | 1,847 |
4 | lazy_importer | 1,492 |
5 | cocoapods-binary | 1,293 |
6 | xorstr | 1,057 |
7 | UNITS | 921 |
8 | Aspect Injector | 728 |
9 | raytracer.hpp | 667 |
10 | Rugby | 652 |
11 | static-assertions | 554 |
12 | ctpg | 448 |
13 | Python-Raytracer | 447 |
14 | reflekt | 337 |
15 | au | 279 |
16 | pure_simd | 227 |
17 | mp | 201 |
18 | eternal | 189 |
19 | nimja | 169 |
20 | todo_by | 117 |
21 | ctregex.zig | 117 |
22 | Unchained | 106 |
23 | compile-time-ray-tracer-in-rust | 85 |
Sponsored