Skip to main content

Make it better!

Project description

项目介绍

这是一个 Python 和 Rust 混合编程的项目,主要目的是比较 Rust 和 Python 的性能差异。

说明

目前已经支持 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

版本说明

  1. Python 3.11
  2. Rust 1.74.1

注意事项

需要重新编译部分内容

更新

  1. 推送到 main
  2. 修改 Cargo.toml 中的版本号
  3. 打标签:git tag v0.1.7
  4. 通过推送标签进行升级:git push origin v0.1.7

镜像推送

  1. docker build -t jindaxiang/newopen .
  2. docker tag local-image:tagname jindaxiang/new-repo:tagname
  3. docker push jindaxiang/new-repo:tagname

查看

  1. PyPI 版本 RShare 版本

贡献代码

  1. maturin 项目
  2. maturin 文档

Project details


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.8.tar.gz (18.3 kB view hashes)

Uploaded Source

Built Distributions

rshare-0.1.8-cp38-abi3-win_amd64.whl (1.6 MB view hashes)

Uploaded CPython 3.8+ Windows x86-64

rshare-0.1.8-cp38-abi3-manylinux_2_34_x86_64.whl (5.2 MB view hashes)

Uploaded CPython 3.8+ manylinux: glibc 2.34+ x86-64

rshare-0.1.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.4 MB view hashes)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ ARM64

rshare-0.1.8-cp38-abi3-macosx_11_0_arm64.whl (1.9 MB view hashes)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

rshare-0.1.8-cp38-abi3-macosx_10_12_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page