{"id":44926626,"url":"https://github.com/mohammedsafvan/docling-rs","last_synced_at":"2026-02-18T05:01:04.738Z","repository":{"id":338142819,"uuid":"1153032787","full_name":"mohammedsafvan/docling-rs","owner":"mohammedsafvan","description":"Rust SDK for Docling Serve that makes document conversion simple, reliable, and production-ready in Rust","archived":false,"fork":false,"pushed_at":"2026-02-13T02:13:50.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-13T10:46:39.973Z","etag":null,"topics":["api-client","document-conversion","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohammedsafvan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-08T19:52:57.000Z","updated_at":"2026-02-13T02:13:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mohammedsafvan/docling-rs","commit_stats":null,"previous_names":["mohammedsafvan/docling-rs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mohammedsafvan/docling-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammedsafvan%2Fdocling-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammedsafvan%2Fdocling-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammedsafvan%2Fdocling-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammedsafvan%2Fdocling-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammedsafvan","download_url":"https://codeload.github.com/mohammedsafvan/docling-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammedsafvan%2Fdocling-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29569853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T04:18:28.490Z","status":"ssl_error","status_checked_at":"2026-02-18T04:13:49.018Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","document-conversion","rust"],"created_at":"2026-02-18T05:00:38.433Z","updated_at":"2026-02-18T05:01:04.725Z","avatar_url":"https://github.com/mohammedsafvan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docling_rs\n\nRust SDK for [Docling Serve](https://github.com/docling-project/docling-serve). Convert PDFs, DOCX, PPTX, images, and more into Markdown, JSON, HTML, or plain text.\n\n[![docs.rs](https://img.shields.io/badge/docs.rs-docling__rs-blue)](https://docs.rs/docling_rs)\n\n## Features\n\n- **Async-first HTTP client** — Built on `reqwest` with full async/await support\n- **Synchronous API** — Blocking wrapper available via feature flag for simple scripts\n- **URL \u0026 file conversion** — Convert from HTTP URLs or upload local files via multipart\n- **Sync \u0026 async job handling** — Block until done, or submit and poll for large documents\n- **Fully typed** — All enums and models matching OpenAPI 3.1 spec (v1.12.0)\n- **API key authentication** — Bearer token support for secured endpoints\n- **Structured errors** — Typed errors for network, API, JSON, I/O, task failures, timeouts\n- **Zero unsafe code**\n\n## Installation\n\n```toml\n[dependencies]\ndocling_rs = \"0.1\"\n```\n\nAll dependencies (including `tokio` for the internal runtime) are included automatically.\n\n## Feature Flags\n\n| Feature | Default | Description |\n|---------|---------|-------------|\n| `blocking` | ✅ | Enables synchronous API in `docling_rs::blocking`. |\n\n### Using without blocking API\n\nFor smaller binary size when you only need async:\n\n```toml\n[dependencies]\ndocling_rs = { version = \"0.1\", default-features = false }\n```\n\n## Quick Start\n\n### Blocking API (Simplest)\n\nNo async boilerplate needed. Works in any Rust program:\n\n```rust\nuse docling_rs::blocking::DoclingClient;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let client = DoclingClient::new(\"http://127.0.0.1:5001\");\n    \n    // Convert a URL\n    let result = client\n        .convert_source(\"https://arxiv.org/pdf/2206.01062\", None)?;\n    \n    if let Some(md) = \u0026result.document.md_content {\n        println!(\"{}\", md);\n    }\n    Ok(())\n}\n```\n\n### Async API\n\nFor integration with async Rust code. Requires `tokio` for the async runtime:\n\n```toml\n[dependencies]\ndocling_rs = \"0.1\"\ntokio = { version = \"1\", features = [\"macros\", \"rt-multi-thread\"] }\n```\n\n```rust\nuse docling_rs::DoclingClient;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let client = DoclingClient::new(\"http://127.0.0.1:5001\");\n    \n    // Convert a URL\n    let result = client\n        .convert_source(\"https://arxiv.org/pdf/2206.01062\", None)\n        .await?;\n    \n    if let Some(md) = \u0026result.document.md_content {\n        println!(\"{}\", md);\n    }\n    Ok(())\n}\n```\n\n## Examples\n\n```bash\n# Run Docling Serve\ndocling-serve run --port 5001\n\n# Run examples\ncargo run --example health\ncargo run --example convert_url\ncargo run --example convert_url_async\ncargo run --example convert_file\ncargo run --example convert_file_async\ncargo run --example convert_url_blocking  # No tokio needed\n```\n\n## API Overview\n\n### Blocking API\n\n```rust\nuse docling_rs::blocking::DoclingClient;\n\nlet client = DoclingClient::new(\"http://127.0.0.1:5001\");\n\n// Health \u0026 version\nclient.health()?;\nclient.version()?;\n\n// Basic conversion (options is owned: Option\u003cConvertDocumentsRequestOptions\u003e)\nlet result = client.convert_source(url, options)?;\n\n// File upload (options is borrowed: Option\u003c\u0026ConvertDocumentsRequestOptions\u003e)\nlet result = client.convert_file(paths, options.as_ref(), target)?;\n\n// Async with polling (blocking wrapper)\nlet task = client.convert_source_async(url, options)?;\nlet status = client.poll_task_status(\u0026task.task_id, None)?;\nlet result = client.get_task_result(\u0026task.task_id)?;\n\n// Convenience methods\nlet result = client.wait_for_conversion(url, options, timeout, poll_interval)?;\nlet result = client.wait_for_file_conversion(paths, options.as_ref(), target, timeout, poll_interval)?;\n```\n\n### Async API\n\n```rust\nuse docling_rs::DoclingClient;\n\nlet client = DoclingClient::new(\"http://127.0.0.1:5001\");\n\n// Health \u0026 version\nclient.health().await?;\nclient.version().await?;\n\n// Basic conversion (options is owned: Option\u003cConvertDocumentsRequestOptions\u003e)\nlet result = client.convert_source(url, options).await?;\n\n// File upload (options is borrowed: Option\u003c\u0026ConvertDocumentsRequestOptions\u003e)\nlet result = client.convert_file(paths, options.as_ref(), target).await?;\n\n// Async with polling\nlet task = client.convert_source_async(url, options).await?;\nlet status = client.poll_task_status(\u0026task.task_id, None).await?;\nlet result = client.get_task_result(\u0026task.task_id).await?;\n\n// Convenience methods\nlet result = client.wait_for_conversion(url, options, timeout, poll_interval).await?;\nlet result = client.wait_for_file_conversion(paths, options.as_ref(), target, timeout, poll_interval).await?;\n```\n\n## Error Handling\n\nBoth APIs return the same `DoclingError` variants:\n\n```rust\nuse docling_rs::blocking::DoclingClient;\nuse docling_rs::DoclingError;\n\nlet client = DoclingClient::new(\"http://127.0.0.1:5001\");\n\nmatch client.convert_source(\"https://example.com/doc.pdf\", None) {\n    Ok(result) =\u003e println!(\"Success: {}\", result.status),\n    Err(DoclingError::Http(e)) =\u003e eprintln!(\"Network error: {}\", e),\n    Err(DoclingError::Api { status_code, body }) =\u003e {\n        eprintln!(\"API error {}: {}\", status_code, body);\n    }\n    Err(DoclingError::TaskFailed { task_id, status }) =\u003e {\n        eprintln!(\"Task {} failed: {}\", task_id, status);\n    }\n    Err(DoclingError::Timeout { task_id, elapsed_secs }) =\u003e {\n        eprintln!(\"Task {} timed out after {:.0}s\", task_id, elapsed_secs);\n    }\n    _ =\u003e eprintln!(\"Other error\"),\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammedsafvan%2Fdocling-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammedsafvan%2Fdocling-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammedsafvan%2Fdocling-rs/lists"}