Re:Roto: A Compiled Scripting Language for Rust
by ijustlovemath on Wednesday May 21, 2025 @10:19AM
(#44051727)
Did you go through many iterations on the API of the registration? If so, which designs did you disqualify and why?
[ Parent
| on HN ]
Re:Roto: A Compiled Scripting Language for Rust
by terts on Wednesday May 21, 2025 @10:31AM
(#44051862)
Not many iterations, but a lot of head scratching was involved haha.
I decided against using a trait and a derive macro because I wanted to avoid running into Rust's orphan rule. We have a crate called routecore where most of our types are declared and then a separate crate called Rotonda which uses those types and uses Roto. I wanted Rotonda to be able to register routecore types.
That's also the downside of the current reflection crates; they require each type to have a derive macro.