Make it better!
Project description
项目介绍
这是一个 Python 和 Rust 混合编程的项目,主要目的是比较 Rust 和 Python 的性能差异。目前这个项目是 rshare
说明
目前已经支持 64 位操作系统,包括 Windows,Linux,macOS 和 ARM64 架构的 Linux 系统。
安装
通过 pip install rshare --upgrade
来安装 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.10.tar.gz
(20.3 kB
view hashes)
Built Distributions
Close
Hashes for rshare-0.1.10-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fd6392f006a14382428417adb8491eb68eb37c5cf609c54e1003f8263a83790 |
|
MD5 | 13878e0c1bb14d89f0e8c1a3c4981b69 |
|
BLAKE2b-256 | a7b651fe591c7d933215b5e64897406934ab4a678bf9072f420ea721d4ae74fc |
Close
Hashes for rshare-0.1.10-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd13cc5900da9364598e271441f3ce4f63302e2e93eba20c00f06e7358e66221 |
|
MD5 | e0964e21a0f3de49aa75de45de36b3cd |
|
BLAKE2b-256 | bae677e4e802c25b15ef93dab22a5cf51f3600101111078272dcd2d2a321ba1b |
Close
Hashes for rshare-0.1.10-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 034ef9cf1223403cbc418163e32a9ad6df5cefa9938c47e3173bb905b2d830bb |
|
MD5 | 78ad945e07b79dd04e535c19644823f9 |
|
BLAKE2b-256 | 228cbc3ce2cc41fe6ca41208cbe36d6fc5487481ab182ab5d4b656e1883f9b5a |
Close
Hashes for rshare-0.1.10-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d6d938277dc3de3bff8af4174a8faf875e0be70c329fb9aac375b5bbe503dd4 |
|
MD5 | 6848748d188092dc95662be7a1bcb415 |
|
BLAKE2b-256 | 0b46dae9441b4380903d096fb75717a76f2facc3dd0c79754cd18b9126891d7e |
Close
Hashes for rshare-0.1.10-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a901c71545c18d55a90dc542d1fcb6c9c58c8d0417a550f1dd3d65d34fb73fa5 |
|
MD5 | 0925b77ae93d27e39054d4682280b5d9 |
|
BLAKE2b-256 | f21e7af161b8c10d42a735a4ac81c186f2342af7eef0edb3fed3e09185ce12f5 |