Skip to content

Full generic relations (from powdr-labs)#32

Merged
ekzhang merged 43 commits intomainfrom
powdr-labs/main
Dec 14, 2025
Merged

Full generic relations (from powdr-labs)#32
ekzhang merged 43 commits intomainfrom
powdr-labs/main

Conversation

@ekzhang
Copy link
Owner

@ekzhang ekzhang commented Dec 13, 2025

Via @chriseth

This adds:

  • Full generics support including validating which trait bounds all of the generics in relations need,
  • Many excellent examples

It also makes the auto-generated Crepe struct and functions like run() public outside of the module, which helps with ergonomics.


I didn't include the upstream implementation of profiling because this code is always generated even when profiling is turned off. I wasn't confident enough in the Rust compiler that it would understand that a bunch of HashMap function calls would have no side-effects and can be optimized away in the run() method so I'm removing this for now.

chriseth and others added 12 commits December 10, 2025 15:24
Make interface functions public.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This reverts commit b2171d8.
Co-authored-by: chriseth <9073706+chriseth@users.noreply.github.com>
[WIP] Address feedback on profiling removal from original PR
Co-authored-by: chriseth <9073706+chriseth@users.noreply.github.com>
Use Itertools::sorted_by() to avoid cloning rules vector in profiling report
@ekzhang ekzhang changed the title Generic lifetimes and profiling (from powdr-labs) Full generic relations (from powdr-labs) Dec 14, 2025
This code is always generated even when profiling is turned off. I wasn't confident enough in the Rust compiler that it would understand that a bunch of `HashMap` function calls would have no side-effects and can be optimized away in the `run()` method so I'm removing this for now.
@ekzhang ekzhang merged commit 865b000 into main Dec 14, 2025
3 checks passed
@ekzhang ekzhang deleted the powdr-labs/main branch December 14, 2025 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants