~/talk

How to stop fighting with coherence and star writing context-generic trait impls

Talkat RustLab 2025 · 2025-11-03..11-04· [rust, compilers-and-language-design]
slides:none on file

Proposes Context-Generic Programming (CGP) and a released CGP30 crate that generates provider traits and type-level lookup tables so multiple overlapping, formerly-illegal trait implementations compile as distinct providers; uses macros like CGB component and delegate components macro to wire providers into a concrete context. Demonstrated on a messaging library where switching the context changes serialization (hex vs base64) without touching library code; works today but has steep learning curve and noisy error messages.

AI-written summary · about

  1. 0:00Introduction
  2. 1:14Rust trait system and coherence
  3. 5:49Hash table problem and coherence
  4. 8:59Existing coherence solutions
  5. 11:47Specialization limitations
  6. 13:51Remote trait pattern with Serde
  7. 15:56Provider traits bypass coherence
  8. 19:47Context and implicit parameters
  9. 23:44Context-driven programming
  10. 24:48CGP30 crate and compatibility
  11. 28:58Demo of modular serialization
  12. 33:13Hash problem solved with CGP
  13. 34:39CGP use cases and future
  14. 35:20CGP challenges and learning
  15. 37:06Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.