on-internet
← Community

Embedding Python in Rust to call external Python libraries

Stack Overflow ·

I'm trying to learn how to embed Python into a Rust application. For learning purposes, I want to create a Rust script/app that runs a forever loop. This loop sleeps for a set interval, and upon waking, it uses the Python requests library to fetch the current time from an internet time server. While this isn't a practical application, my goal is to understand how to call external Python libraries from Rust. My ultimate goal is to see if I can integrate a Python BACnet stack into a Rust application. My Setup main.rs use pyo3::prelude::*; use pyo3::types::IntoPyDict; use std::thread; use std::ti

Comments

Sign in or sign up to comment and upvote.

No comments yet.