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。

自定义识别词缓存

识别词随不可变解析选项整批解析、编译并缓存,标题解析直接复用整份词表的正则。 单份词表不会因超过 256 或 1024 条正则而发生循环淘汰;替换、屏蔽、集数偏移的 规则顺序保持不变,无效正则继续按未匹配处理。

缓存仍受解析选项的容量上限约束(配置值键与外部配置键各 64 份),淘汰时释放 整份配置;已在使用的选项由 Arc 保持有效。修改词表后应传入新配置;使用 _cache_key 的调用方须同步变更该键,沿用已有的配置版本约定。

本地开发安装

在本仓库根目录创建 .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。

Metadata

Release files for moviepilot-rust 0.3.8

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.8
File
moviepilot_rust-0.3.8-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
moviepilot_rust-0.3.8-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.8-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.8-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.8-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.8-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
moviepilot_rust-0.3.8-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.8-cp314-abi3-win_amd64.whl CPython 3.14 abi3 Windows x86-64 Details
moviepilot_rust-0.3.8-cp314-abi3-musllinux_1_1_x86_64.whl CPython 3.14 abi3 Linux musl 1.1+ x86-64 Details
moviepilot_rust-0.3.8-cp314-abi3-musllinux_1_1_aarch64.whl CPython 3.14 abi3 Linux musl 1.1+ ARM64 Details
moviepilot_rust-0.3.8-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.8-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 abi3 Linux glibc 2.17+ ARM64 Details
moviepilot_rust-0.3.8-cp314-abi3-macosx_11_0_arm64.whl CPython 3.14 abi3 macOS 11.0+ ARM64 Details
moviepilot_rust-0.3.8-cp314-abi3-macosx_10_12_x86_64.whl CPython 3.14 abi3 macOS 10.12+ x86-64 Details

Total release size: 78.7 MB

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

Download URL moviepilot_rust-0.3.8-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
0355d90035638243cfc96540b7efac84446ce50fa28ab765fb3c6da5ba6331ae
BLAKE2b-256 checksum
How to use checksums
882ed14a1ad91a478a8fae21d451ab31158d94bdf54f6cea004a26c8d124ee11
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-cp314-cp314t-musllinux_1_2_x86_64.whl
Size 6.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
a8754c8ecb56af24e3293328bdc4e835a7bf79e58f9716deda51000eb185d143
BLAKE2b-256 checksum
How to use checksums
c9c6d429a00addf46c35c63173bb6b0658a0f774f41e8b34c95e1d54de4d4f44
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-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
67ac46b4b0580b2b5e25c27b06e42bc4be1fdc3c410a9a410805632bbb297c8b
BLAKE2b-256 checksum
How to use checksums
f765c4c742559e8d8874c252f60d8f15558bd30872766c6c33494c8c19d3f7a5
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-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
a662300d76dbfd49a496d72e77e9ff1067c68da0e3c47b0973d5d3505357d381
BLAKE2b-256 checksum
How to use checksums
c0f9d5582d87b5275fc1f024d7272d8c3ab40fcb8e4ef72b5877dd0d340fd238
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-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
1fd83cb5d1546e4f91e6aa41d603df657d135d30a16d8f1105999dae92825453
BLAKE2b-256 checksum
How to use checksums
f8d32a2cd0058f012b7c62cf894001839cf829c67be70e178141eb6012ba9ef0
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-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
f85dd7e31c8f8d17d864b0f2cb5faf983ababdb03e776afaf6a8efba6d43ff28
BLAKE2b-256 checksum
How to use checksums
f6fe732378e42e49b5eb9ec8feb33fe4a77a8de30a24fb761af6983b6cc817e9
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-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
cf50bdc1d4ba76bbc02c5d884631dde1dcaaa6f7164aa7bfc02d8e16d6097032
BLAKE2b-256 checksum
How to use checksums
e535b76bf0fcee704d49874a615c07bca32e13b55f273d0fc6e964992af2d12c
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-cp314-abi3-win_amd64.whl
Size 5.5 MB
Tags CPython 3.14 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
b25da71670788e3cfffa33b306d70d3274536237364bc7fb046ebb9afb64832a
BLAKE2b-256 checksum
How to use checksums
6aff53da82073d7e0ba826b84c152e5ea7742fded1dbfb4fc86b0621c284fb87
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-cp314-abi3-musllinux_1_1_x86_64.whl
Size 6.0 MB
Tags CPython 3.14 Linux musl 1.1+ x86-64 abi3
SHA-256 checksum
How to use checksums
4ea664e8cf01a516180e4288399a7a8bcfd51edae97e50b90c8c5e695be9c1d3
BLAKE2b-256 checksum
How to use checksums
0150bbafb29de3a689550b065a04bc86868a74f7496303dc8c11f8170826467d
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-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
7d94de57ec93c2de4934573dfcc27f3d945d9c57c862648ded372d6a4720f550
BLAKE2b-256 checksum
How to use checksums
8ef1af150e50c2e51503269f97dc87626f0199a22f9210e389c63ad31249ee5e
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-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
a37741d2aff17f0e661439bd9c9f2823a6fa639f57e1bb4743fb5aea1a18177f
BLAKE2b-256 checksum
How to use checksums
f0066125c803992ac59fa0d5756e00631a505fd69325b498fd221e94d02f746f
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-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
35adb706e121414e0cfccfbe8c1aed703c7adf3ced7dc445ce5cf10d3f7072a8
BLAKE2b-256 checksum
How to use checksums
7c0911f99b1069731e0bbb95f4158f30fbcd69c4a31dc351f8069cd83217c34a
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-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
7bf96ccb3d9912eeed5ee58e0ff8db79b41e8b3fa732b69b4db9aea65849b4cf
BLAKE2b-256 checksum
How to use checksums
05132cdd2e8d823cd6bff7d7332afd24b9bf00203c92459f71bbdbd6ffd5b9e9
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 Oct 12, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.8-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
c11fce3e2ad78d58c7722865835d5b28ddae8ca9d82cf165cb0e080a3aa41550
BLAKE2b-256 checksum
How to use checksums
dbb8c2b7c78f49636a0ca1ee7ec59abd89512c1ef6657479f89aeea77af08b75
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 Oct 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.8 This release

14 release files

0.3.7

14 release files

0.3.6

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