faiface / par

⅋ — session types for Rust
MIT License
116 stars 0 forks source link

Proc macro to generate tests on user code #1

Open khionu opened 1 month ago

khionu commented 1 month ago

First off, super exciting project, my head is spinning with possibilities. Thank you for making this.

Second, I had the realization that using session types, it would be much easier to test FSMs. You could even generate the tests based on the branches with minimal annotation. This would extend the crate's static validation capabilities drastically.

faiface commented 1 month ago

Hey! I'm so glad you find it so exciting, I do too!

And that's true and a good idea, actually. Reminds me of QuickCheck for Haskell, except there it "only" covers functional algebraic types, whereas the same techniques could be used here for entire processes...

Defining macros is an area of Rust I have very little skill at, so if somebody (perhpas you) would be interested in making that, that would be very cool.

Thanks for sharing the idea!

khionu commented 1 month ago

I'd be happy to! I'm currently planning out my time still for the next few weeks, but I'm sure I could at least do some more thorough design work by end of next week. Will keep you posted!

faiface commented 1 month ago

@khionu Thanks, that will be great!