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.10

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

Total release size: 80.0 MB

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

Download URL moviepilot_rust-0.3.10-cp314-cp314t-win_amd64.whl
Size 5.6 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
c1d45b0883b2f168e5bfb9d0ed3ef800d2ee7edd4e06ad435bef66f898d20ff6
BLAKE2b-256 checksum
How to use checksums
336fd740f33cfabf83bd3943cf69abaccf7e5bf254d5c02eb67b2cc499832b61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-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
ecf43a0294977100a1a166b199b9c851b209f1ae7ac9ee8b323a7ce8f4f54c24
BLAKE2b-256 checksum
How to use checksums
1200def05dbba5e5045bd079d03409b72c16e20ee27af0d7b000b15d4d57da02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

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

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.8 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8027cc8384794260f358fd1d5f3bc390f355428ee2cb975b0528261bb577984c
BLAKE2b-256 checksum
How to use checksums
2324aa6cf9803f2466c4ff3bc4ba2be199c1ac350f1d9302b77e7d7a7d6ced27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.6 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
1bcc59f788bac8f8a902f064cb02c55247fed87484f8b9b28cf890bae46391a1
BLAKE2b-256 checksum
How to use checksums
4b89136ba58f440a03a785e2e10e0222ec2ee5c8515047ebb2176877f50ca4c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-cp314-cp314t-macosx_11_0_arm64.whl
Size 5.5 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1fc8d48cb0aa09b74b0a1476920fa4462638f24c6c3d018e2afb95c904d6ba5e
BLAKE2b-256 checksum
How to use checksums
b09fbc093e8f55eca715bcd7e5978780fd414f16659b3322ae7b1e8bff305b03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-cp314-cp314t-macosx_10_12_x86_64.whl
Size 5.6 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a19f0f6b77a74c1bde9ee3b07f26e0bc2bc0c590393c498b36f88cd297ec6b75
BLAKE2b-256 checksum
How to use checksums
dad40b51c619230a93df15b8882b681ce77595de586b2579a3d217586514afbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-cp314-abi3-win_amd64.whl
Size 5.6 MB
Tags CPython 3.14 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
65d9cfebcb9a75db6071068a329927e104f59e79e1f3eb8cf27519acae52a42a
BLAKE2b-256 checksum
How to use checksums
d1dd63f46da9f29e1c98094d25328b8dd11ae8642df461f3f181530cf7795658
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-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
0d052e9848ff80403bf843046f10a8cf6211ea53bdc2d64ddd177af76300bf45
BLAKE2b-256 checksum
How to use checksums
86518500319095109e5708dea538288da4a15ee54edfcc8fe4043a7bfaf627e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-cp314-abi3-musllinux_1_1_aarch64.whl
Size 5.8 MB
Tags CPython 3.14 Linux musl 1.1+ ARM64 abi3
SHA-256 checksum
How to use checksums
a43f7f60b4142207e724c1cd469ebd14db9f8276a2ace0bbd8f978054f73ee65
BLAKE2b-256 checksum
How to use checksums
a8fd0440fb145d0f953a22b2556482245a328cbd707054c2f05a0b3ba70d33bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.8 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
5c1cd3b3b2708f2175c71f7df279d55d66e442306a0ed9d185af02824777df75
BLAKE2b-256 checksum
How to use checksums
5228ca66fec978adf913eff84afadd4d1dc3e9cac5921de46fa3ed75ee786c2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.6 MB
Tags CPython 3.14 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
0468dabf0bc7bdf240ac5f13a1b4e4759e1af3011c7f27cdab28c457855d80b3
BLAKE2b-256 checksum
How to use checksums
867c5fe995d8bf0fd6589b80d2fcbe41c4f89000e5aa20a1801ba0ebe30f5d03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-cp314-abi3-macosx_11_0_arm64.whl
Size 5.5 MB
Tags CPython 3.14 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8d6e3c5aaf20d366d8323790868dbbc8be1ddfc90ae413f0851fdb159dbc167f
BLAKE2b-256 checksum
How to use checksums
a24b162b0b3ba443296843770b66febe37f5f08601e2e8620a6368d47fff5a9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

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

Download URL moviepilot_rust-0.3.10-cp314-abi3-macosx_10_12_x86_64.whl
Size 5.6 MB
Tags CPython 3.14 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
40a6c0e420cdf3a88829b5a80cbb14401df1b329d4454f1e0c4e3b10fa282a55
BLAKE2b-256 checksum
How to use checksums
e9a2c0ca69d9cecfd8a16e5966fc88b768b3b86c45c888d22c88ebfe9d736020
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 22, 2026.

Transparency log

Security for moviepilot-rust 0.3.10

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.

Full provenance

All 14 files in this release have been uploaded with provenance metadata.

Select from 14 files

Attestation for moviepilot_rust-0.3.10-cp314-cp314t-win_amd64.whl

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 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.10 This release

14 release files Full provenance

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