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 主包 (src layout)
│ │ ├── apps/ # 应用程序 (alarmclock, pypack)
│ │ ├── cmd/ # 命令系统
│ │ ├── core/ # 核心业务逻辑 (config, logger, env)
│ │ ├── gui/ # GUI 组件和主题
│ │ ├── models/ # 数据模型
│ │ ├── skills/ # CLI 工具集
│ │ ├── utils/ # 工具模块 (executor, profiler, task)
│ │ ├── __init__.py # 包初始化
│ │ ├── consts.py # 常量定义
│ │ └── types.py # 类型定义
│ └── tests/ # 测试代码
│ ├── apps/ # 应用测试
│ ├── cmd/ # 命令系统测试
│ ├── core/ # 核心模块测试
│ ├── skills/ # 技能工具测试
│ └── utils/ # 工具模块测试
├── docs/ # 项目文档
├── pyproject.toml # Python 包配置
└── README.md # 项目说明
使用示例
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.5.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.5-py3-none-any.whl
(169.9 kB
view details)
File details
Details for the file bitool-0.1.5.tar.gz.
File metadata
- Download URL: bitool-0.1.5.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 |
3690881a52645a5a30a9662d0440d025c30aaa47a15a8e026df3c29066ccae1f
|
|
| MD5 |
d3656a0a8443f5bfa38eca04f9ba4dbf
|
|
| BLAKE2b-256 |
bc815a06254ee6de143a65ffc96ce4e1c149f8979bdc79ffe47bf5342efeab02
|
File details
Details for the file bitool-0.1.5-py3-none-any.whl.
File metadata
- Download URL: bitool-0.1.5-py3-none-any.whl
- Upload date:
- Size: 169.9 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 |
acbf07e466bd53cb99e5b8a2285c2d279bd50285b9c83636a0efb5205b2b1f71
|
|
| MD5 |
45fb56c3c2f69199f29fe9445d541cc8
|
|
| BLAKE2b-256 |
d36b109d430b581186b6f315fe024c1232e2afe5d4cf8078064741b41b9f1af3
|