Skip to main content

MinerU Rust

English | 简体中文

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.

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(())
}

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

See the Chinese usage guide or English usage guide for service configuration and complete options.

Python

Wheels support CPython 3.9 and newer:

pip install mineru-rs

The wheel installs two equivalent console commands, mineru and mineru-rs, both entering mineru_rs._cli:main. The mineru-rs name makes uvx mineru-rs --help work without a local checkout. 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.

import mineru_rs

print(mineru_rs.canonical_stem("a bad/pdf"))
mineru_rs.validate_pdf_options(0, None, True, True, True)

Python currently exposes only canonical stem handling and PDF-option validation. It does not expose asynchronous document parsing. Releases are wheels only; there is no sdist or source fallback for unsupported platforms or PyPy.

Node.js

npm install @alexsun-top/mineru

The root package installs two equivalent binaries, mineru and mineru-rs, both pointing at bin/mineru.js, so node_modules/.bin/mineru-rs is available after install. The six platform packages intentionally ship no binary. Prefer mineru-rs if another mineru command is already on PATH.

const mineru = require('@alexsun-top/mineru')

console.log(mineru.canonicalStem('a bad/pdf'))
mineru.validatePdfOptions(0, null, true, true, true)

Node.js currently exposes only canonical stem handling and PDF-option validation. It does not expose asynchronous document parsing. Node.js 18 or newer is required.

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mineru_rs-0.2.4-cp39-abi3-win_amd64.whl (35.6 MB view details)

Uploaded CPython 3.9+Windows x86-64

mineru_rs-0.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (40.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

mineru_rs-0.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (38.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

mineru_rs-0.2.4-cp39-abi3-macosx_11_0_arm64.whl (37.6 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

mineru_rs-0.2.4-cp39-abi3-macosx_10_12_x86_64.whl (38.1 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file mineru_rs-0.2.4-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: mineru_rs-0.2.4-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

Hashes for mineru_rs-0.2.4-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4727cc06b807f36b69c09a4e9e2df31d2669a90adaf80b0bfafbb6830ca06068
MD5 fad283a0e1c7d65364ed5bf75d66c5c9
BLAKE2b-256 5b0de2dfddbcb0c8e7942cb164a7449e665b516e22121551f300bf87c883e265

See more details on using hashes here.

Provenance

The following attestation bundles were made for mineru_rs-0.2.4-cp39-abi3-win_amd64.whl:

Publisher: release.yml on agentsyaml/mineru-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mineru_rs-0.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mineru_rs-0.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f1ec27ee516586a2ac3e3d93e906662d93330f344bece447b0b0104ef5a2160c
MD5 c08228389cf1a14eaf4d3d6c3634fd2c
BLAKE2b-256 dec5c42e8a379b70f3131f36abd6844d39d8aed24be35d35b778dac4e772980b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mineru_rs-0.2.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on agentsyaml/mineru-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mineru_rs-0.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mineru_rs-0.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4715590ef32e9bf522428df8de63f639857c8aaf9248507ae9fcc4aa8f9dff43
MD5 5a4b2917b0708166594397c1ac76e424
BLAKE2b-256 2f63f1897b5d6f8274f7fcf82e252f38d77043e9ef7bae01408a7e0c0db9cfe6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mineru_rs-0.2.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on agentsyaml/mineru-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mineru_rs-0.2.4-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mineru_rs-0.2.4-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6dc27ca6f1ac792279da7752de99b6da691c4e198c1e0c1c5ed910f2c3effe3f
MD5 ea69035b08d9e56825e1286c0aa9ebee
BLAKE2b-256 33abb84ec5073086619cc5176ce0a45f4054ce332d5e295451f18fcd9095a840

See more details on using hashes here.

Provenance

The following attestation bundles were made for mineru_rs-0.2.4-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on agentsyaml/mineru-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mineru_rs-0.2.4-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mineru_rs-0.2.4-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 24015a875606cda2f12baaf536d5f94d69efe51de9db9038be00de0490a5e089
MD5 80e40a87b1342c6af3c848a87e293a04
BLAKE2b-256 87e093bb9f29ed5fc0e359baa1ff1d513dc0dbb424a892735e60196db98b2fca

See more details on using hashes here.

Provenance

The following attestation bundles were made for mineru_rs-0.2.4-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on agentsyaml/mineru-rs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.0

5 files

0.2.9

5 files

0.2.8

5 files

0.2.7

5 files

0.2.6

5 files

0.2.5

5 files

This release

0.2.4 This release

5 files

0.2.3

5 files

0.2.2

5 files

0.2.1

5 files

0.2.0

5 files

0.1.1

5 files

0.1.0

5 files

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