Skip to content

saidvandeklundert/rust_from_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calling Rust from Python

Example where Rust is being called from Python. In the examples, I used CPython 3.9.2 and Rust 1.56.0. The Rust code relies on the std. The Python side relies on ctypes, something that comes with Python.

rust_lib_1

Contains Rust code that can be called from Python to print strings and integers.

rust_lib_2

Contains and example where on the Python side, a Pydantic Basemodel is used as an argument to a Rust function. Also includes an example to release memory. In the example, Pydantic version 1.8.2 was used.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published