PyO3: Python解释器的Rust绑定-python

时间:2021-06-18 18:14:18
【文件属性】:
文件名称:PyO3: Python解释器的Rust绑定-python
文件大小:502KB
文件格式:ZIP
更新时间:2021-06-18 18:14:18
其它杂项 PyO3: Python解释器的Rust绑定 Python 解释器的 PyO3 Rust 绑定。 用户指南 API 文档 Cargo 包:pyo3 PyO3 在 Apache-2.0 许可下获得许可。 Python 是根据 Python 许可证获得许可的。 支持的 Python 版本:Python 2.7、Python 3.5 及更高版本支持的 Rust 版本:Rust 1.23.0-nightly 2017-11-07 或更高版本用法要使用 pyo3,请将其添加到您的 Cargo.toml:[dependencies] pyo3 = "0.2" 示例显示 sys.version 值的程序:extern crate pyo3; 使用 pyo3::{Python, PyDict, PyResult, ObjectProtocol}; fn main() { let gil = Python::acquire_gil(); 你好(gil.python()).unwrap(); } fn hello(py: Python) -> PyResult { let sys =

网友评论