-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust python binding #16
Conversation
Creates a basic prototype for parsing dataflows delared in YAML files using `serde`/`serde_yaml`. The dataflow file format is just an example, we can adjust this however we like. To visualize the parsed dataflow, the main executable outputs a flowchart in mermaid syntax. GitHub supports this format natively in markdown files, alternatively it can be converted to an image on <https://mermaid.live>.
So just for information, it is not possible to have multiple python instance run by pyo3 PyO3/pyo3#576 . So basically, each time we're going to call a Python function it's going to be queued on the asyncio Event Loop and executed when the single thread is ready. In case we want to run multiple models with different latency to prevent Deadlines. We shall do that on separate node. This is however not true for pure rust node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some minor comments, but otherwise this looks good to me!
Pyo3 async only work with a main derived from the proc macro pyo3 asyncio main. If this is removed Python async call does not work.
…ements Some improvements to new Python bindings
I think this is ready to be merged. It should give us a good foundation for follow-up work. |
Rust based Python API
This demo gives us an insight at how to run async python function within Rust async function and bind it on Zenoh subscription.