#jit-compiler #compile-time #reflection #run-time #zero #information #forms

nightly static-reflect

Static type information, giving a form of compile-time reflection

18 releases

0.2.0-alpha.8 Jul 14, 2024
0.2.0-alpha.6 Dec 20, 2021
0.2.0-alpha.3 Nov 6, 2021
0.2.0-alpha.2 Aug 12, 2021
0.1.0 Apr 20, 2021

#708 in Programming languages

Download history 6/week @ 2024-07-29 19/week @ 2024-09-16 2/week @ 2024-09-23 13/week @ 2024-09-30

795 downloads per month
Used in static-reflect-derive

MIT license

59KB
1K SLoC

rust-static-reflect

Compile-time reflection in rust!

The original use case is type-checking generated code in a JIT compiler (with zero runtime cost). However, other use cases are certainly possible :)

Contributions are welcome! I'd be happy to add more features as long as they align with the general philosophy of compile-time reflection.

Unfortunately, there is very little documentation right now. Hopefully that will change in the future.


lib.rs:

A system for getting static type information.

This effectively gives (some) of the power of reflection without any of the runtime cost!

The original use case was type-checking generated code in a JIT compiler (with zero runtime cost). However, other use cases are certainly possible :)

Contributions are welcome! I'd be happy to add more features as long as they align with the general philosophy of compile-time reflection.

Dependencies

~0–300KB