Jupyter和IPython魔法,用于编译用Rust编写的Python扩展
项目描述
rustimport_jupyter
这是一个用于编译用Rust编写的Python扩展的Jupyter和IPython魔法。该项目基于rustimport,并添加了IPython魔法。
安装
- 按照Rust的入门指南安装Rust。
- 安装包:
pip install rustimport_jupyter
使用方法
rustimport_jupyter
在Jupyter笔记本中编译用Rust编写的Python扩展。我们通过在Jupyter笔记本中加载 rustimport_jupyter
扩展来启用此功能
%load_ext rustimport_jupyter
接下来,我们在一个单元格前面加上 %%rustimport
标记来编译它
%%rustimport
use pyo3::prelude::*;
#[pyfunction]
fn square(x: i32) -> i32 {
x * x
}
笔记本示例
- Rust中的NumPy - 使用
rustimport_jupyter
在Rust中编写NumPy代码!在Google Colab中运行 💻 - 在Google Colab中运行 - 对于Google Colab,需要首先安装
rustimport_jupyter
和rust
工具链。在Google Colab中运行 💻。 - Polars表达式插件 - 使用
rustimport_jupyter
快速迭代 Polars表达式插件。在Google Colab中运行 💻。
许可证
rustimport_jupyter
使用 MIT 许可协议进行分发。
项目详情
下载文件
下载适用于您平台的项目文件。如果您不确定选择哪一个,请了解有关 安装包 的更多信息。
源代码分发
rustimport_jupyter-0.1.3.tar.gz (11.5 kB 查看哈希值)
构建分发
关闭
rustimport_jupyter-0.1.3.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 9e04c8c41df6f5931fe99f35dcf2664ffb82e48fb33843369da7b45059f88375 |
|
MD5 | 99e4a2336dd36e84ff8847e448646389 |
|
BLAKE2b-256 | 6f97d3473b0e38ef997e678854a538626588d5306f06e0aabf2f90967230ba83 |
关闭
rustimport_jupyter-0.1.3-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 3051e7df124c206061ef364840da658062a2393975aa66b04a50ca0903b41d5e |
|
MD5 | 940286116c28bfc19269c34fe4d60885 |
|
BLAKE2b-256 | f42d01687211606fdd5ab806659e9c0f21a33a4a8b96e02869ad6b414155f354 |