Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
generate rust somehow to uniformly define how a struct gets "deserialized" into python -- potential perf boost #7371
We add zipkin spans to the rust code in the v2 engine in #7342, and one of the things we get from that is a dict of the new rust
If we were to support having python code know more about the structure of rust objects it receives, we could consider declaring some schema in python code in
Alternatively, if going back and forth over the FFI boundary is about as fast as trying to generate a python dict all in one go (the second checkbox above), then we could avoid trying to do anything in python, and just try to satisfy the first checkbox by using either rust macros or a trait somehow to make converting rust objects into python objects more declarative.
. @illicitonion experimented with using
But I'm not sure when to do something like this vs switching to embedding starlark... embedding starlark would net us "completely identical strings" and "rust-introspectable built-in structs" for example. See https://docs.rs/starlark/0.2.0/starlark/values/index.html