Make it better!
Project description
项目介绍
这是一个 Python 和 Rust 混合编程的项目,主要目的是比较 Rust 和 Python 的性能差异。目前这个项目是 rshare
说明
目前已经支持 64 位操作系统,包括 Windows,Linux,macOS 和 ARM64 架构的 Linux 系统。
安装
通过 pip install rshare --upgrade -i https://pypi.org/simple
来安装 rshare
体验 Rust 的极致性能!
使用
import rshare as rk
# Rust 接口
fetch_title_str = rk.fetch_title(url="https://www.baidu.com")
print(fetch_title_str)
# Python 接口
fetch_name_str = rk.fetch_name(url="https://www.baidu.com")
print(fetch_name_str)
构建
maturin build
maturin develop --release
版本说明
目前主要是说明开发的软件版本:
- Python 3.11
- Rust 1.74.1
注意事项
需要重新编译部分内容
更新
- 推送到 main 分支
- 修改
Cargo.toml
中的版本号 - 打标签:
git tag v0.1.7
- 通过推送标签进行升级:
git push origin v0.1.7
镜像推送
- 基于原始镜像:
ghcr.io/rust-cross/manylinux2014-cross:aarch64
docker build -t jindaxiang/newopen .
docker tag local-image:tagname jindaxiang/new-repo:tagname
docker push jindaxiang/new-repo:tagname
查看
贡献代码
关注 .vscode
用于 debug 代码,新增 .vscode 文件夹
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rshare-0.1.12.tar.gz
(20.3 kB
view hashes)
Built Distributions
Close
Hashes for rshare-0.1.12-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 514c48f582fd82cee07eb973219c4d83abd2d80f35e9517a7b032c7499647377 |
|
MD5 | 12f6d8240c74a2bae1ec233295f8cd50 |
|
BLAKE2b-256 | 1ca9bad96cea7e557a64aa4d85cb872316109730d2fd8a095f50dc991bf4c8a8 |
Close
Hashes for rshare-0.1.12-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ef0390b17d3a5cc5cf1bc92ed328ea60aae97ffd547d9563676d023cb728b7e |
|
MD5 | e9c2955d670b1ce5f1e18590ecffda4a |
|
BLAKE2b-256 | 0ac069d49542bee127d313c073130f0d784f391c5fb426b341e97beafa20c9c9 |
Close
Hashes for rshare-0.1.12-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 334a5e2b4042ac096b3d365e59c3995d7627315362b6407e7405198268d6512e |
|
MD5 | 999fe1092ec84d31b7acdf8561d6c7dc |
|
BLAKE2b-256 | 784fac85c0f9d873befe44b3dd24bb114e1fc7603994c826ff227d220f4cc28e |
Close
Hashes for rshare-0.1.12-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 911dc84fc1b8ce22fb4215f6203ecd3f99473d2fe81e1d4857432193fe1fd761 |
|
MD5 | ade46ff507eaea02d1e15b4bfaac910a |
|
BLAKE2b-256 | a5772a3d7858b4d89e915d1301a119de46a55ac0ebe296c6347905e7415e04ba |
Close
Hashes for rshare-0.1.12-cp38-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dea7b893346da6ee52791a5ddf53319332dbc0d45effa640d67d9592664dbc7e |
|
MD5 | df319c65ffaa3bf3e3f2576db1c3b718 |
|
BLAKE2b-256 | 57c50df9e2abbcdad6750ff70f0f0cc2c90275a8c1cfab114bca31fca02cddf1 |