Skip to content
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

Merged
merged 15 commits into from
Mar 23, 2022
Merged

Rust python binding #16

merged 15 commits into from
Mar 23, 2022

Conversation

haixuanTao
Copy link
Collaborator

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.

phil-opp and others added 4 commits March 2, 2022 19:57
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>.
@haixuanTao
Copy link
Collaborator Author

haixuanTao commented Mar 21, 2022

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.

Copy link
Collaborator

@phil-opp phil-opp left a 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!

Cargo.toml Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
src/server.rs Outdated Show resolved Hide resolved
src/server.rs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@phil-opp
Copy link
Collaborator

I think this is ready to be merged. It should give us a good foundation for follow-up work.

@haixuanTao haixuanTao merged commit 6ca35fd into main Mar 23, 2022
@haixuanTao haixuanTao deleted the rust-python-binding branch June 23, 2022 09:46
phil-opp pushed a commit that referenced this pull request Aug 25, 2023
Add test with changing DDS
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.

2 participants