Reflection

Open-source projects categorized as Reflection

Top 23 Reflection Open-Source Projects

  • 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.

  • Pry

    A runtime developer console and IRB alternative with powerful introspection capabilities.

    Project mention: Ruby 3.3 | news.ycombinator.com | 2023-12-24

    that's surprising considering `pry`[1] is such an amazing debugger IMO.

    [1] https://github.com/pry/pry

  • 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.

  • 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

    Project mention: What C++ library do you wish existed but hasn’t been created yet? | /r/cpp | 2023-07-08

    I'm not sure this is quite what you're asking for, but this library has been super helpful to me in the past : https://github.com/Neargye/magic_enum

  • reflect-metadata

    Prototype for a Metadata Reflection API for ECMAScript

    Project mention: TypeScript please give us types | news.ycombinator.com | 2023-07-07

    Counter to this post, as soon as I read the title I knew what this was, & I knew it was speaking exactly to something we've wanted for a long time. This is asking for more official & better supported https://github.com/rbuckton/reflect-metadata .

    TypeScript is a compiler. It has a lot of type information during compilation. We could write that type information out into a file. Instead what we do is throw that information out when the compile ends. Taking all that typing information & throwing it away at the end of compile time is a bad dumb & silly limitation. Especially for a language like JavaScript, which historically could be semi-proud it had such a strong Everything Is An Object philosophy running through it (such as the malleable prototype-based inheritance system); so much type information should be on that Class object. Reflect-metadata for example defined new methods on Reflect to store this metadata.

    I could not be more delighted to see the pennon of this website go up. We needed a rallying point for this. We needed a rallying point for keeping class data around. A rallying point for enriching the runtime with good actionable data is a good rallying point.

    It's not what's afoot here, but I think you're a bit off-base about the impossibility of adding even some type-safety. We might not be able to get exact TS type safety. But we can definitely build some safety in. Owing to the malleable prototype-based type system in JS, we can add getters/setters to objects to do a lot of type checking. This doesn't even begin to explore the possibility of what we might do with es2015's proxies, which could allow even more interesting checks to be layered in. I also wish JS had an official AST (and renderer), so had more official options for code-rewriting that might let us weave in type checks.

    What we can do as programmers is limited by what we have at our disposal. Not throwing out all the typing information, keeping it around at runtime, opens a lot of interesting doors.

  • rttr

    C++ Reflection Library

  • Nameof C++

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

  • cista

    Cista is a simple, high-performance, zero-copy C++ serialization & reflection library.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • Better Enums

    C++ compile-time enum to string, iteration, in a single header file

    Project mention: How to convert an enum to string in C++ | news.ycombinator.com | 2023-09-30

    I really like better_enums instead of magic_enums. There’s no limit on enum size with it: http://aantron.github.io/better-enums/

    It was heavily used at a former employer of mine, so definitely a solid production-ready solution.

  • dotNext

    Next generation API for .NET

    Project mention: How Do Nested Static Generic Types Work When Their Outer Types Are Also Generic? | /r/csharp | 2023-04-25

    Your example runs as I'd expect. I'm using DotNext's TypeMap and am not understanding why underlying arrays (entries) are indexed differently for two instances of the same type am seeing what I expected. I obviously idioted.

  • pfr

    std::tuple like methods for user defined types without any macro or boilerplate code

    Project mention: Rooting for P1061 "Structured Bindings can introduce a Pack" | /r/cpp | 2023-10-19

    This single feature opens a world of new possiblities. For example, it makes implementing "getting the number of fields" trivial. Furthrmore, and much more importantly, it enables turning a struct into a tuple. Currently, this can only be done by enumerating cases (therefore it's not fully generic), as with Boost PFR. By the way, PFR greatly simplifies our codebases, especially for parts with serialization and/or reflection.

  • Runtime

    A Swift Runtime library for viewing type info, and the dynamic getting and setting of properties. (by wickwirew)

  • schemats

    Generate typescript interface definitions from SQL database schema

  • 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

  • EVReflection

    Reflection based (Dictionary, CKRecord, NSManagedObject, Realm, JSON and XML) object mapping with extensions for Alamofire and Moya with RxSwift or ReactiveSwift

  • protobuf-ts

    Protobuf and RPC for TypeScript

    Project mention: tRPC – Move Fast and Break Nothing. End-to-end typesafe APIs made easy | news.ycombinator.com | 2023-08-12

    DX for front or back end? The beauty of tRPC is that the types are derived/inferred from the backend runtime code (like, as you type). It would be nigh impossible to do that with grpc(-web) using proto files as the source of truth.

    It's possible there's a project out there which could automatically produce proto files from something like zod, json-schema, etc. which could be directly interpreted by TS to provide similar (as you type) DX while still allowing some other language backend to consume the derived proto files (though the DX there would be less than ideal).

    If you're just looking for similar TS clients/interfaces for grpc-web then I'd recommend https://github.com/timostamm/protobuf-ts which operates on plain JS objects (no new MyMessage().serialize(), instead the code generator mostly produces TS interfaces for you to work against: const myMessage: MyMessage = pojoConformingToInterface; const binary = MyMessage.toBinary(myMessage);)

  • glaze

    Extremely fast, in memory, JSON and interface library for modern C++

    Project mention: [C++20] to_tuple with compile-time names | /r/cpp | 2023-12-05
  • Reflection

    DEPRECATED

  • Smart-Contract-Audits

    Smart Contract security audit reports (by TechRate)

    Project mention: Pepe Inu🐸 | 280K Mcap Gem | born on 4/20 | building the next Memetoken🚀 | ETH | /r/AllCryptoBets | 2023-04-25

    Techrate.org (http://techrate.org/) Smart Contract Audit

  • ExpressionEvaluator

    A Simple Math and Pseudo C# Expression Evaluator in One C# File. Can also execute small C# like scripts

  • BackwardCompatibilityCheck

    :ab: Tool to compare two revisions of a class API to check for BC breaks

    Project mention: Some thoughts on the Interface Default Methods RFC | /r/PHP | 2023-06-28

    It's also not a big risk because if it does fail it will fail every time you just load the class that implements the interface so probably your while site will error. If you do cursory testing of the new version before you deploy it you can find the problem quickly before it becomes a problem. You can also do static analysis checks on your code to make sure its compatible with the libraries you use including when you upgrade them. And library maintainers can run Roave/BackwardCompatibilityCheck/ to make sure they don't accidentally introduce a new interface method without declaring a new major version.

  • reflections

    High level abstractions over the Go reflect library (by oleiade)

  • Serilog.Exceptions

    Log exception details and custom properties that are not output in Exception.ToString().

    Project mention: How can I fix logger maximum destructuring reached error when using Serilog C#? | /r/csharp | 2023-05-11

    You might also wanna check out Serilog.Exceptions if not already using it. I think that they have some examples of how you could intercept these yourself.

  • harmony-reflect

    ES5 shim for ES6 Reflect and Proxy objects

  • SaaSHub

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

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). The latest post mention was on 2024-04-17.

Reflection related posts

Index

What are some of the best open-source Reflection projects? This list will help you:

Project Stars
1 entt 9,428
2 Pry 6,715
3 Magic Enum C++ 4,390
4 reflect-metadata 3,119
5 rttr 2,971
6 Nameof C++ 1,933
7 cista 1,638
8 Better Enums 1,590
9 dotNext 1,510
10 pfr 1,257
11 Runtime 1,056
12 schemats 1,024
13 refl-cpp 986
14 EVReflection 965
15 protobuf-ts 939
16 glaze 882
17 Reflection 600
18 Smart-Contract-Audits 562
19 ExpressionEvaluator 562
20 BackwardCompatibilityCheck 558
21 reflections 503
22 Serilog.Exceptions 478
23 harmony-reflect 469
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com