#reflection #compile-time #information #static #forms #compiler #zero

nightly static-reflect

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

16 releases

0.2.0-alpha.6 Dec 20, 2021
0.2.0-alpha.5 Dec 13, 2021
0.2.0-alpha.3 Nov 6, 2021
0.2.0-alpha.2 Aug 12, 2021
0.1.0 Apr 20, 2021

#1235 in Development tools


Used in static-reflect-derive

MIT license

58KB
924 lines

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–620KB
~12K SLoC