Skip to main content

MoviePilot-Rust

MoviePilot Rust 加速模块。

  • PyPI 包名:moviepilot-rust
  • Python 导入名:moviepilot_rust
  • 支持版本:Python 3.11+
  • 构建工具: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 -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-cp311-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 分支提交 bump requirements.in 的 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.2.9

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

Total release size: 35.5 MB

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

Download URL moviepilot_rust-0.2.9-cp314-cp314t-win_amd64.whl
Size 2.4 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
354b1875aee7788105ca86b9b2e9ea796f2aaecf5fc954fa99232e3cf9f6124a
BLAKE2b-256 checksum
How to use checksums
9bf7ae698a049a490ef7a30d662282494230632e5b3b84f2d61edb1656d08e21
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 Aug 23, 2026.

Transparency log

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

Download URL moviepilot_rust-0.2.9-cp314-cp314t-musllinux_1_2_x86_64.whl
Size 2.8 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
17e27953ecda23baebec1aee868da207a2e158c944198bbbf217521bce6d2ee0
BLAKE2b-256 checksum
How to use checksums
d003b7e63e6acf2a579a2973d942f4ecfee0a1c62bfc80f1a9533dfbc8043c82
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 Aug 23, 2026.

Transparency log

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

Download URL moviepilot_rust-0.2.9-cp314-cp314t-musllinux_1_2_aarch64.whl
Size 2.7 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
bbc6e76ff5f44b5034529c7999e6e48f72149b8ca161c035b31bcc6871e56fbc
BLAKE2b-256 checksum
How to use checksums
e2baa91bc4851cfde7c27e5639c80f97404c3ea7ebbd9640082cc8ef07ac8bc3
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 Aug 23, 2026.

Transparency log

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

Download URL moviepilot_rust-0.2.9-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.6 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
265ff25104d0c18312c8e426cf38fa703555177dee2fd6c92f48d2656c654f1f
BLAKE2b-256 checksum
How to use checksums
b79e05f8380206d4f610aaf19e55b33709e52f7766f0901706b05149204b005a
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 Aug 23, 2026.

Transparency log

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

Download URL moviepilot_rust-0.2.9-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.5 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
2bf354c3a7bb1571292fbb77ce3999fde3c24275b7596cd0e296dc7ccfe5058d
BLAKE2b-256 checksum
How to use checksums
cb6dd4e9f4ddce0a7a0851dbd2754c773c29f8dce351a0b1bc5821bc9e4292a1
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 Aug 23, 2026.

Transparency log

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

Download URL moviepilot_rust-0.2.9-cp314-cp314t-macosx_11_0_arm64.whl
Size 2.3 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e14189dd0ad8b37920e8bfb38a0b1a886ffd60f2f888192d18b286ae3d063347
BLAKE2b-256 checksum
How to use checksums
77b5ba1ccb86192be6f66dbfd0029f095671773604330f0bd2fbceec86d9bd9d
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 Aug 23, 2026.

Transparency log

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

Download URL moviepilot_rust-0.2.9-cp314-cp314t-macosx_10_12_x86_64.whl
Size 2.4 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
82e18353dec514a58ffd18eb220b0872b0cb75f82a313419071a99967e74d3db
BLAKE2b-256 checksum
How to use checksums
e5cf77faa9e326acdbc8e33dd186f1e97475e85ec4a2956322f9321dd0c93f1c
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 Aug 23, 2026.

Transparency log

Release files / moviepilot_rust-0.2.9-cp311-abi3-win_amd64.whl

Download URL moviepilot_rust-0.2.9-cp311-abi3-win_amd64.whl
Size 2.4 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
9c55ff1d871b0805d3fd7107ce5966e05879dac779929d3db98192015138aa7b
BLAKE2b-256 checksum
How to use checksums
fb6ec2d99715416287b26c59de2ea9645e2d17fda0d15b20bdec656c3db6404f
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 Aug 23, 2026.

Transparency log

Release files / moviepilot_rust-0.2.9-cp311-abi3-musllinux_1_1_x86_64.whl

Download URL moviepilot_rust-0.2.9-cp311-abi3-musllinux_1_1_x86_64.whl
Size 2.8 MB
Tags CPython 3.11 Linux musl 1.1+ x86-64 abi3
SHA-256 checksum
How to use checksums
699c6a238c85275549c79f64d64187a9229ba833ca1d3300d61c04ff26c14f20
BLAKE2b-256 checksum
How to use checksums
1a85be0cf88d9b85b448213572cef3db04f24babb8a8ceae39ea75a574c8103d
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 Aug 23, 2026.

Transparency log

Release files / moviepilot_rust-0.2.9-cp311-abi3-musllinux_1_1_aarch64.whl

Download URL moviepilot_rust-0.2.9-cp311-abi3-musllinux_1_1_aarch64.whl
Size 2.7 MB
Tags CPython 3.11 Linux musl 1.1+ ARM64 abi3
SHA-256 checksum
How to use checksums
f88d1cfc2a63ae2fc5468a36d75a7e23730e6cd27fb9dbed92ebc148fb2e9b72
BLAKE2b-256 checksum
How to use checksums
339fe8ae43b47dafc823c4805d4f0af5690d5d96b58a32761f0ac0f54a74747c
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 Aug 23, 2026.

Transparency log

Release files / moviepilot_rust-0.2.9-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL moviepilot_rust-0.2.9-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.6 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
c096bee2544d041d956a814084bd58c09771f9ef65fb27a94ef12a85692e3ef1
BLAKE2b-256 checksum
How to use checksums
f84d0587b585a5c2a0ad2dd2cfb91fc531c74138f24984c0dd9777ad5dedac94
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 Aug 23, 2026.

Transparency log

Release files / moviepilot_rust-0.2.9-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL moviepilot_rust-0.2.9-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.5 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
65c572d1fb4c0ed39912eb41408a7f17f855ac701d6421fdbc5921f86e866b7b
BLAKE2b-256 checksum
How to use checksums
929bb70344e3710784e5ecc100e2df5e3778bceb9dda76df82632b60874d84b8
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 Aug 23, 2026.

Transparency log

Release files / moviepilot_rust-0.2.9-cp311-abi3-macosx_11_0_arm64.whl

Download URL moviepilot_rust-0.2.9-cp311-abi3-macosx_11_0_arm64.whl
Size 2.3 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
03fe38256cdb35a67211761706cab6bb3462b1a2e043848b5d40a80dcf6827ee
BLAKE2b-256 checksum
How to use checksums
cf29103e5f2ffe412daae00ce0f278d567d22399a2394b97787ae293fab8ceab
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 Aug 23, 2026.

Transparency log

Release files / moviepilot_rust-0.2.9-cp311-abi3-macosx_10_12_x86_64.whl

Download URL moviepilot_rust-0.2.9-cp311-abi3-macosx_10_12_x86_64.whl
Size 2.4 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
35b49c88d77ff5e7e603a0f1c7461d37d92e9bbef456be025cb399e4729ec1b0
BLAKE2b-256 checksum
How to use checksums
eebd9e63736cd84c84472b55d02c52d574c5d83475881c7181fd3d276aaf4dd6
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 Aug 23, 2026.

Transparency log

Release history Release notifications | RSS feed

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

This release

0.2.9 This release

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