Skip to content

reflection and comptime #406

@nikomatsakis

Description

@nikomatsakis
Metadata
Point of contact @oli-obk
Team(s) compiler, lang, libs-api, types
Goal document 2026/reflection-and-comptime

Summary

Finish the implemented reflection scheme based on const fn that can only be called at compile time.
Valdiate it against existing reflection libraries by giving them a nightly feature that obsoletes having derives and makes the derives no-ops.
Obtain T-lang and T-libs-api buy-in for the scheme and write an RFC.
This proposal is solely for producing const eval values, not for putting types back into the type system.
That will be a follow-up once this proposal has a merged MVP.

Tasks and status


Note: we have updated the body to match the 2026 goal. Your original text is preserved below.

Details

Metadata
Point of contact @oli-obk
Team(s) compiler, lang, libs
Goal document 2025h2/reflection-and-comptime

Summary

Design, implement and experimentally land a reflection scheme based on const fn that can only be called at compile time.
This proposal is solely for producing const eval values, not for putting types back into the type system.
That will be a follow-up once this proposal has a merged MVP.

Tasks and status

  • Discussion and moral support (lang Team)
  • Do the work ()

Design language feature to solve problem

Implement language feature

  • Implementation ()
  • Standard reviews (compiler Team)
  • Design meeting (lang Team)
  • Author call for testing blog post

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions