Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Library From Python

Simple example of using PyO3 to call a Rust function from Python.

Setup

This code assumes both Rust and Python are installed.

  1. Create virtual environment: python -m venv .venv
  2. Activate virtual environment: source .venv/bin/activate
  3. Install requirements: pip install -r requirements.txt
  4. Install the Rust package inside the Python virtualenv: maturin develop

Run

To run the Python example: python main.py

About

Simple example of using PyO3 to call a Rust function from Python

Topics

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.