Move your problems to compile-time and get new capabilities out of it

Rustaceans love it when their compiler tells them 'No'. It's hours of debugging work saved, and prevents whomever uses their software from having to deal with many problems that should never have reached production code. With the const-eval machinery of the Rust compiler rustaceans can write their own custom logic to perform checks at compile-time, and polish those failures to produce errors that their colleagues can understand. It can also be used to offload some work and checks to compile-time instead of performing it at every startup of the program.

So wouldn't it be great if you could write some library code that can never be run at runtime at all? All checked by the compiler and you even get new features that would literally be impossible at runtime?

If you think that, then you've come to the right talk: In this talk I'm going to introduce the various ideas for comptime, reflection, and other new const-eval capabilities. Some of these you can already try out on nightly, others are very much in the design phase.

Speaker

Oli Scherer

Oli has been contributing and maintaining the Rust compiler for a decade. From scratching their own itch by adding more things that can be const evaluated to refactoring the query graph to coax out incremental improvements or enable new features, Oli likes working in every part of the compiler and enjoys spending significant amounts of work time on reviews. Since May Oli has been employed at RustNL to sustainably keep maintaining the Rust compiler, doing lots of reviews, and performing their various moderation team activities.