Skip to main content

MoviePilot-Rust

MoviePilot Rust 加速模块。

  • PyPI 包名:moviepilot-rust
  • Python 导入名:moviepilot_rust
  • 支持版本:Python 3.14+
  • 构建工具:PyO3 + maturin

项目结构

src/
├── bindings/   # Python API、输入快照和输出对象转换
├── filter/     # 类型化过滤规则、表达式 AST 和执行引擎
├── indexer/    # Indexer 配置模型、HTML 选择器和字段解析
├── metainfo/   # 元信息模型、配置、正则规则和影视标题解析
├── metamusic/  # 音乐元信息模型、正则规则和标题解析
├── rss/        # RSS/Atom 数据模型和流式解析器
└── support/    # 与业务无关的有界缓存等基础设施

业务模块只接收和返回纯 Rust 类型,不直接持有 Python 对象。bindings 负责 PyO3 边界转换,因此核心解析器可以独立单测,并可在转换完成后释放 Python GIL。

本地开发安装

在本仓库根目录创建 .venv,并把 Rust 扩展直接安装到这个虚拟环境:

python3.14 -m venv .venv
.venv/bin/python -m pip install "maturin>=1.9,<2"
.venv/bin/python -m maturin develop --release

验证扩展是否可导入:

.venv/bin/python -c "import moviepilot_rust; print(moviepilot_rust.is_available())"

输出 True 表示本地编译安装成功。

本地检查

优先使用项目目录下的 .venv,一次编译后运行 Rust 和 Python 两层测试:

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
.venv/bin/python -m maturin develop
cargo test --lib
.venv/bin/python -m pytest -q

本地打包

使用仓库内脚本构建当前平台 wheel 和源码包:

scripts/build_wheels.sh

产物会输出到 dist/,例如:

dist/moviepilot_rust-x.x.x-cp314-abi3-macosx_11_0_arm64.whl
dist/moviepilot_rust-x.x.x.tar.gz

脚本默认使用本仓库 .venv/bin/python。

在 MoviePilot 主项目中使用

主项目通过普通 pip 依赖使用本模块,不再从主项目源码内编译 Rust。

以下命令在 MoviePilot 主项目根目录执行。

安装 PyPI 版本:

.venv/bin/pip install moviepilot-rust

安装本地刚构建的 wheel:

.venv/bin/pip install --force-reinstall ../MoviePilot-Rust/dist/moviepilot_rust-*.whl

在 MoviePilot 主项目里验证运行时状态:

.venv/bin/python -c "from app.utils import rust_accel; print(rust_accel.status())"

available=True 表示扩展已安装可用,enabled=True 表示 MoviePilot 当前配置开关允许使用 Rust 加速。

发布

更新 Cargo.toml 中的 package version 并推送到 v3 后,GitHub Actions 会自动创建对应的 v版本号 Release,构建 Linux(glibc/musl)、macOS、Windows wheel 并发布到 PyPI;发布成功后还会向 MoviePilot 的 v3 分支提交更新 pyproject.toml 与 uv.lock 的 PR(需配置 MOVIEPILOT_REPO_TOKEN)。

# 修改 Cargo.toml 中的 version = "x.x.x"
git push origin v3

手动在 GitHub 上 Publish Release 仍会触发同一套发布流程,但 Release tag 必须与 Cargo.toml 中的 package version 一致,例如 v0.2.1。

Release files for moviepilot-rust 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for moviepilot-rust 0.3.4
File
moviepilot_rust-0.3.4-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
moviepilot_rust-0.3.4-cp314-cp314t-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 Details
moviepilot_rust-0.3.4-cp314-cp314t-musllinux_1_2_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ ARM64 Details
moviepilot_rust-0.3.4-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Details
moviepilot_rust-0.3.4-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64 Details
moviepilot_rust-0.3.4-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
moviepilot_rust-0.3.4-cp314-cp314t-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64 Details
moviepilot_rust-0.3.4-cp314-abi3-win_amd64.whl CPython 3.14 abi3 Windows x86-64 Details
moviepilot_rust-0.3.4-cp314-abi3-musllinux_1_1_x86_64.whl CPython 3.14 abi3 Linux musl 1.1+ x86-64 Details
moviepilot_rust-0.3.4-cp314-abi3-musllinux_1_1_aarch64.whl CPython 3.14 abi3 Linux musl 1.1+ ARM64 Details
moviepilot_rust-0.3.4-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 abi3 Linux glibc 2.17+ x86-64 Details
moviepilot_rust-0.3.4-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 abi3 Linux glibc 2.17+ ARM64 Details
moviepilot_rust-0.3.4-cp314-abi3-macosx_11_0_arm64.whl CPython 3.14 abi3 macOS 11.0+ ARM64 Details
moviepilot_rust-0.3.4-cp314-abi3-macosx_10_12_x86_64.whl CPython 3.14 abi3 macOS 10.12+ x86-64 Details

Total release size: 78.4 MB

Release files / moviepilot_rust-0.3.4-cp314-cp314t-win_amd64.whl

Download URL moviepilot_rust-0.3.4-cp314-cp314t-win_amd64.whl
Size 5.5 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
be343508c81f48d573cb3104ee50e6a77b2770271141e2fae525392bf48b42c9
BLAKE2b-256 checksum
How to use checksums
66ed9ddd211da8d53c6d8cc36635b5e4010c0ac8ebbc8ba6860a4dcfd11b8799
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-cp314t-musllinux_1_2_x86_64.whl

Download URL moviepilot_rust-0.3.4-cp314-cp314t-musllinux_1_2_x86_64.whl
Size 5.9 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
791301727b9029e2b84c2d0d3e84578872380ff556a4d79fe724a2ba83841032
BLAKE2b-256 checksum
How to use checksums
9007d60b2fa94acb658c55a51ba0f6e40a726875f3a25f0827b80f444b986b34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-cp314t-musllinux_1_2_aarch64.whl

Download URL moviepilot_rust-0.3.4-cp314-cp314t-musllinux_1_2_aarch64.whl
Size 5.7 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
d901cd877b56f349828a05bfaba33fa53b2ae52f2e9dcb643f592540ebf40fa3
BLAKE2b-256 checksum
How to use checksums
c81d5ef94be3b7bc0a0182aa44544ff56a8b7f1476a1639464b33144707a1f57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL moviepilot_rust-0.3.4-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.7 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0c7ae88a36f2d02f8264c74eb7e7c256b14c188a9553ae882232fcb5e6edf677
BLAKE2b-256 checksum
How to use checksums
9f35cd87eba73c85cc36d46ce2252cdf7446247761e3f29b9ebe532de4a499e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL moviepilot_rust-0.3.4-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.5 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
1a6037379bec52248fe5a74559d27fa0c37915edd56fd501b8783c3412b52d57
BLAKE2b-256 checksum
How to use checksums
88cc6337700b18af7c6ce4f3b218c40630e3e1848fb6e237df00efa7c0a1abcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-cp314t-macosx_11_0_arm64.whl

Download URL moviepilot_rust-0.3.4-cp314-cp314t-macosx_11_0_arm64.whl
Size 5.4 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a3e0b13fe13de6f8d1e004691f1cba6e5b755f3dd56b06c83317edf97d928782
BLAKE2b-256 checksum
How to use checksums
6bd686d5e7091c7afc1b1c2759efe132b1f5fa1fb9f03685044dc5968f249529
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-cp314t-macosx_10_12_x86_64.whl

Download URL moviepilot_rust-0.3.4-cp314-cp314t-macosx_10_12_x86_64.whl
Size 5.5 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2deddbedf71e1e0a2d6c8f8b8a12d072ea60e6b986367ce5fed15041b9671ce2
BLAKE2b-256 checksum
How to use checksums
52f5851c3d598676f884e7a9c0ee3bc3227fb14762b26b255e8ec26a085d9cd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-abi3-win_amd64.whl

Download URL moviepilot_rust-0.3.4-cp314-abi3-win_amd64.whl
Size 5.5 MB
Tags CPython 3.14 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
51ee9123a82af94aab3ec95b068017caaf37acac44b5e5263e92d5021e231d35
BLAKE2b-256 checksum
How to use checksums
97aa902c96101d0947e6fd5859c20e99b8fc1df850effccc3d6a0279cae86aef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-abi3-musllinux_1_1_x86_64.whl

Download URL moviepilot_rust-0.3.4-cp314-abi3-musllinux_1_1_x86_64.whl
Size 5.9 MB
Tags CPython 3.14 Linux musl 1.1+ x86-64 abi3
SHA-256 checksum
How to use checksums
2a10f37eb1a625ab8cfc0f43708679fe7edfd70a6944a2a87c89ded178d5ddfe
BLAKE2b-256 checksum
How to use checksums
0f5209d87dba5fe81b27b66b3a406d8358eb338628ff1a48abafc8df9bde650b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-abi3-musllinux_1_1_aarch64.whl

Download URL moviepilot_rust-0.3.4-cp314-abi3-musllinux_1_1_aarch64.whl
Size 5.7 MB
Tags CPython 3.14 Linux musl 1.1+ ARM64 abi3
SHA-256 checksum
How to use checksums
0e9f1f9eeec31c706f11e552f1a0de7b6df259abfd8d78694ffcd937f2f91130
BLAKE2b-256 checksum
How to use checksums
1a5db65f067098145c9f056166a160ee5663945e84109d38d927a441e28e89ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL moviepilot_rust-0.3.4-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.7 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
0e44ddb801945e095fd7090fd6661f5d8b4acd82162e302d82437bda524dcca4
BLAKE2b-256 checksum
How to use checksums
388ec2171f77c96ca98f653178769684797c23431e1aeb15413f2e57c888fbc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL moviepilot_rust-0.3.4-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.5 MB
Tags CPython 3.14 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
611baf0141fe56c1587f5956639ef0ace8a865fae4f349c9a658699f80dcf915
BLAKE2b-256 checksum
How to use checksums
d6212177eadf3e4b3cd513e271dc2323ce3b95cc2d4bb9dd1d839d323f0f1cef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-abi3-macosx_11_0_arm64.whl

Download URL moviepilot_rust-0.3.4-cp314-abi3-macosx_11_0_arm64.whl
Size 5.4 MB
Tags CPython 3.14 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9c1a9d0116014381d118baf9b9e6986df0b11d7f10d92f22fd07dc0508509f66
BLAKE2b-256 checksum
How to use checksums
87e6ea7125027732efbf43b7f95a64c05c48f44bd2c61bfba418e868e881f070
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / moviepilot_rust-0.3.4-cp314-abi3-macosx_10_12_x86_64.whl

Download URL moviepilot_rust-0.3.4-cp314-abi3-macosx_10_12_x86_64.whl
Size 5.5 MB
Tags CPython 3.14 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
87d56d3fae2ecdee9a79e8caa7b33665b3d981c949844142e5ae3b5e186f72b7
BLAKE2b-256 checksum
How to use checksums
aa4da49a999c3d0aca0a83c0fc2cd370466bd2e519fc991f56e78b0aa6ec7590
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.7

14 release files

0.3.6

14 release files

This release

0.3.4 This release

14 release files

0.3.3

14 release files

0.3.2

21 release files

0.3.1

21 release files

0.3.0

21 release files

0.2.9

14 release files

0.2.8

7 release files

0.2.7

7 release files

0.2.6

7 release files

0.2.5

7 release files

0.2.4

7 release files

0.2.3

7 release files

0.2.2

7 release files

0.2.1

7 release files

0.2.0

7 release files

0.1.14

7 release files

0.1.13

7 release files

0.1.12

7 release files

0.1.11

7 release files

0.1.10

7 release files

0.1.9

7 release files

0.1.8

7 release files

0.1.7

7 release files

0.1.6

7 release files

0.1.5

7 release files

0.1.4

7 release files

0.1.3

7 release files

0.1.2

7 release files

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page