Bitool - Rust + Python 混合架构工具集
Project description
Bitool
基于 Maturin 的 Rust + Python 混合架构工具集,将性能瓶颈和共性部分使用 Rust 实现,接口和逻辑部分使用 Python 实现。
特性
- 高性能:核心计算和 I/O 操作使用 Rust 实现
- 易用性:Python 提供简洁的 API 接口
- 可扩展:插件系统支持功能扩展
- 跨平台:支持 Windows、Linux、macOS
安装
pip install bitool
开发
快速开始(推荐)
# 安装开发环境(自动构建 Rust + Python 双包)
pymake ia
# 验证安装
pymake t
常用命令
# 构建所有包(Rust + Python)
pymake ba
# 代码格式化与检查
pymake lint
# 运行测试
pymake t
# 清理所有构建产物
pymake ca
# 查看完整帮助
pymake help
手动构建(可选)
# 构建 Rust 核心模块
cd bitool-core && maturin develop
# 构建 Python 主包
cd .. && pip install -e .
# 构建发布包
cd bitool-core && maturin build -r
cd .. && python -m build
📖 详细文档:PyMake 使用指南 | 双包构建指南
项目结构
bitool/
├── bitool-core/ # Rust 核心模块
│ ├── src/ # Rust 源代码
│ │ ├── core/ # 核心功能模块
│ │ ├── plugins/ # 插件系统核心
│ │ └── python/ # Python 绑定
│ ├── Cargo.toml # Rust 依赖配置
│ └── pyproject.toml # Maturin 构建配置
├── src/bitool/ # Python 主包
│ ├── core/ # 核心业务逻辑
│ ├── cmd/ # 命令系统
│ ├── scripts/ # CLI 工具集
│ ├── utils/ # 工具模块
│ └── cli/ # 命令行入口
├── docs/ # 项目文档
├── pyproject.toml # Python 包配置
├── Makefile # 构建脚本(可选)
└── build_all.py # Python 构建脚本
使用示例
from bitool import FileOps, TextProcessor
# 文件操作
file_ops = FileOps()
files = file_ops.scan_directory("/path/to/dir")
# 文本处理
processor = TextProcessor()
result = processor.regex_search(pattern, text)
许可证
MIT License
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
bitool-0.1.4.tar.gz
(1.1 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
bitool-0.1.4-py3-none-any.whl
(204.4 kB
view details)
File details
Details for the file bitool-0.1.4.tar.gz.
File metadata
- Download URL: bitool-0.1.4.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.12.11 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e6c6cbe67a9a8f86e1a51b01e08f15a0c0d4a6abc0da40914b2de9a1b56b120
|
|
| MD5 |
f69c4bfc931b29fbe044549c1e066024
|
|
| BLAKE2b-256 |
270aa6ef17d56d6a05e6c8977267d2e9c1d2262618734600b7071d8d99abdb57
|
File details
Details for the file bitool-0.1.4-py3-none-any.whl.
File metadata
- Download URL: bitool-0.1.4-py3-none-any.whl
- Upload date:
- Size: 204.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.12.11 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2e6baf328ade442460bac2fac14ae522684df0d78e392a98b74e7a74af8f9bb
|
|
| MD5 |
7468021775075fce45ffaaea8011196f
|
|
| BLAKE2b-256 |
ea848194729d9b750f5c860343a8add2afe0683f1ca73689a388b55f2f6383f8
|