MinerU Rust
Rust client library, command-line tools, and local API server for parsing PDF, image, and Office documents with an external OpenAI-compatible MinerU VLM service. PDF rendering uses pure Rust; no model is downloaded or run locally.
Within the MinerU 3.4.4 VLM scope, MinerU Rust is a drop-in replacement for the
MinerU Python SDK's vlm-http-client path and can replace that VLM workflow
completely. It does not implement or claim compatibility with non-VLM backends.
See the compatibility contract, the
Chinese usage guide, and the English usage guide.
Document-limit controls and their CLI/API applicability are summarized in the usage guides.
Requires Rust 1.89 or newer.
Quickstart
Configure the VLM service with three environment variables:
| Variable | Meaning | Example |
|---|---|---|
MINERU_VL_SERVER |
VLM service base URL | https://host/v1 |
MINERU_VL_MODEL_NAME |
Model ID | model-id |
MINERU_VL_API_KEY |
Bearer token | your-key |
Install the mineru command with Cargo, pip, or npm:
cargo install mineru # Rust
pip install mineru-rs # Python
npm install @alexsun-top/mineru # Node.js
Then parse a document:
mineru -p input.pdf -o out/
Your markdown appears in out/.
Rust library
cargo add mineru
use mineru::{ClientConfig, MinerUClient, ParseOptions, PdfInput};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = MinerUClient::new(ClientConfig::new(
"https://example.test/v1",
"model-id",
)?)?;
let document = client
.parse_pdf(PdfInput::Path("input.pdf".into()), ParseOptions::default())
.await?;
println!("{} pages", document.pages.len());
Ok(())
}
Python
Wheels support CPython 3.9 and newer. Install with uv or pip:
uv add mineru-rs
# or: pip install mineru-rs
parse() returns the markdown string in memory; save it yourself:
import asyncio
from pathlib import Path
import mineru_rs
async def main() -> None:
result = await mineru_rs.parse("input.pdf")
Path("out.md").write_text(result.markdown, encoding="utf-8")
asyncio.run(main())
run() writes the full output tree to an output directory instead (see the
English usage guide). The wheel installs two equivalent
console commands, mineru and mineru-rs; prefer mineru-rs when the
upstream Python mineru package is also installed, since both provide a
mineru entry point and the one earlier on PATH wins. Releases are wheels
only; there is no sdist or source fallback for unsupported platforms or PyPy.
Node.js
Requires Node.js 18 or newer. Install with pnpm or npm:
pnpm add @alexsun-top/mineru
# or: npm install @alexsun-top/mineru
const fs = require('fs')
const mineru = require('@alexsun-top/mineru')
async function main() {
const { markdown } = await mineru.parse({ path: 'input.pdf' })
fs.writeFileSync('out.md', markdown)
}
main()
run({ path, output }) writes the full output tree to output instead (see
the English usage guide). The root package installs two
equivalent binaries, mineru and mineru-rs, both pointing at
bin/mineru.js; prefer mineru-rs if another mineru command is already on
PATH.
CLI and API server
cargo install mineru
mineru --help
The package installs the mineru, mineru-api, mineru-vlm, and
mineru-vlm-api binaries. To also install the mineru-office-convert Office
conversion helper, build with --features office:
cargo install mineru --features office
--api-key can pass a Bearer token, but prefer MINERU_VL_API_KEY: a key on
the command line is visible in the process list.
See the Chinese usage guide or English usage guide for service configuration and complete options.
Examples
- examples/python-uv — Python with
uv - examples/node-pnpm — Node.js with
pnpm
License
Licensed under either Apache-2.0 or MIT, at your option.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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
File details
Details for the file mineru_rs-0.2.5-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: mineru_rs-0.2.5-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 35.6 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43e8685d440ea53de79d69d25f222a3d412cef6d51d82da5767a0f210ff34f77
|
|
| MD5 |
1a9ffab5a51908214092ab7da44176fe
|
|
| BLAKE2b-256 |
dc7f8bcc345c2f1f496257bcc6d8f9c757580a7d789b2f79a54212cf2a166191
|
Provenance
The following attestation bundles were made for mineru_rs-0.2.5-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on agentsyaml/mineru-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mineru_rs-0.2.5-cp39-abi3-win_amd64.whl -
Subject digest:
43e8685d440ea53de79d69d25f222a3d412cef6d51d82da5767a0f210ff34f77 - Sigstore transparency entry: 2371727215
- Sigstore integration time:
-
Permalink:
agentsyaml/mineru-rs@c73c81880a224c1d43a770558193b5485990abcf -
Branch / Tag:
refs/heads/main - Owner: https://github.com/agentsyaml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c73c81880a224c1d43a770558193b5485990abcf -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mineru_rs-0.2.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mineru_rs-0.2.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 40.8 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1448590e9bc236aa0401a8c875177afca7005abde46671036c811cad4b3f40a7
|
|
| MD5 |
f6524ebf8a09bc35d70f63b2856e6eb3
|
|
| BLAKE2b-256 |
00c23b2f42e1906bf468213647c4c417edd9db37a958d15d230f440e11c072ba
|
Provenance
The following attestation bundles were made for mineru_rs-0.2.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on agentsyaml/mineru-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mineru_rs-0.2.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
1448590e9bc236aa0401a8c875177afca7005abde46671036c811cad4b3f40a7 - Sigstore transparency entry: 2371727186
- Sigstore integration time:
-
Permalink:
agentsyaml/mineru-rs@c73c81880a224c1d43a770558193b5485990abcf -
Branch / Tag:
refs/heads/main - Owner: https://github.com/agentsyaml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c73c81880a224c1d43a770558193b5485990abcf -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mineru_rs-0.2.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: mineru_rs-0.2.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 38.9 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6666e399cd5c21243dcdebd5bc81527eeb5d4b48d85b3ca9877255e9f6d253c5
|
|
| MD5 |
5a969afd722026556ee8c62d908964a7
|
|
| BLAKE2b-256 |
3e14f5bcf6d4d348f32745137c0125d776a258a06c98ff9f0585d0366d3ebf41
|
Provenance
The following attestation bundles were made for mineru_rs-0.2.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on agentsyaml/mineru-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mineru_rs-0.2.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
6666e399cd5c21243dcdebd5bc81527eeb5d4b48d85b3ca9877255e9f6d253c5 - Sigstore transparency entry: 2371727170
- Sigstore integration time:
-
Permalink:
agentsyaml/mineru-rs@c73c81880a224c1d43a770558193b5485990abcf -
Branch / Tag:
refs/heads/main - Owner: https://github.com/agentsyaml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c73c81880a224c1d43a770558193b5485990abcf -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mineru_rs-0.2.5-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: mineru_rs-0.2.5-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 37.7 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c78fa77192c883f080bcdd97b4e46f4e644bb35f09fb5ab44109c93e0d39a15d
|
|
| MD5 |
4d408a2b715de8e8ac9b0547a1210b02
|
|
| BLAKE2b-256 |
edff677171c284a2f819e8ebc44ad7a29de724d7fb28bcbae1ecd67a3b9d42dd
|
Provenance
The following attestation bundles were made for mineru_rs-0.2.5-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on agentsyaml/mineru-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mineru_rs-0.2.5-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
c78fa77192c883f080bcdd97b4e46f4e644bb35f09fb5ab44109c93e0d39a15d - Sigstore transparency entry: 2371727178
- Sigstore integration time:
-
Permalink:
agentsyaml/mineru-rs@c73c81880a224c1d43a770558193b5485990abcf -
Branch / Tag:
refs/heads/main - Owner: https://github.com/agentsyaml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c73c81880a224c1d43a770558193b5485990abcf -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mineru_rs-0.2.5-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: mineru_rs-0.2.5-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 38.1 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b979cfc51a12bef45d236d137f56a1829ade726c96e2edd95cdc92166531654
|
|
| MD5 |
3e1128ef7a3f30642421785c5b49de53
|
|
| BLAKE2b-256 |
ad56013eb212d0bd770ddc4885731667d4410c992acab938c2c4a2e887c2ac40
|
Provenance
The following attestation bundles were made for mineru_rs-0.2.5-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on agentsyaml/mineru-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mineru_rs-0.2.5-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
4b979cfc51a12bef45d236d137f56a1829ade726c96e2edd95cdc92166531654 - Sigstore transparency entry: 2371727205
- Sigstore integration time:
-
Permalink:
agentsyaml/mineru-rs@c73c81880a224c1d43a770558193b5485990abcf -
Branch / Tag:
refs/heads/main - Owner: https://github.com/agentsyaml
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c73c81880a224c1d43a770558193b5485990abcf -
Trigger Event:
workflow_dispatch
-
Statement type: