-
Notifications
You must be signed in to change notification settings - Fork 73
docs(plugin): add comprehensive README for wasmedge_ocr #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: mrhapile <allinonegaming3456@gmail.com>
|
@hydai can you check again I have raised the plugin-ocr-docs pr in wasmedge docs repo where you asked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds comprehensive documentation for the wasmedge_ocr plug-in, which provides Optical Character Recognition capabilities to WasmEdge applications through integration with Tesseract OCR. The documentation addresses a gap where this plug-in previously lacked any dedicated user-facing documentation.
Changes:
- Adds a complete README covering installation, build configuration, API reference, usage examples, and troubleshooting
- Documents the plug-in's stateful OCR API, security considerations, and output format (TSV)
- Provides detailed quick start guide, Rust code examples, and common pitfalls to help users avoid runtime errors
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| brew install tesseract leptonica | ||
| ``` | ||
|
|
||
| 2. **Build Plugin** |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent capitalization in section heading. The word "Plugin" should be "Plug-in" (hyphenated and lowercase 'l') to match the established convention in other plugin documentation files.
References:
- docs/contribute/source/plugin/ebpf.md:9 ("Build the eBPF Plug-in")
- docs/contribute/source/plugin/process.md:13 ("Build WasmEdge with WasmEdge-Process Plug-in")
| > [!WARNING] | ||
| > **Security Notice**: This plugin accesses files on the **Host Filesystem** using direct paths provided by the Wasm module. This explicitly **bypasses the WASI sandbox** isolation. Only use this plugin with properly reviewed and trusted Wasm modules, as they can probe for files on your host system. |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent admonition syntax. This documentation uses Docusaurus, which has a different syntax for admonitions. The GitHub-style alert syntax (> [!WARNING]) should be changed to Docusaurus-style admonition syntax for consistency with other documentation files.
The correct format should be:
:::warning
**Security Notice**: This plug-in accesses files on the **Host Filesystem** using direct paths provided by the Wasm module. This explicitly **bypasses the WASI sandbox** isolation. Only use this plug-in with properly reviewed and trusted Wasm modules, as they can probe for files on your host system.
:::
References:
- docs/contribute/source/plugin/wasi_logging.md:10-13
- docs/contribute/source/plugin/process.md:26-28
| @@ -0,0 +1,287 @@ | |||
| # wasmedge_ocr Plugin | |||
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filename "README.md" is inconsistent with other plugin documentation files in this directory. All other plugin documentation files follow the pattern of using a descriptive name (e.g., "ebpf.md", "process.md", "rusttls.md", "wasi_logging.md"). This file should be renamed to "wasmedge_ocr.md" to follow the established convention in the codebase.
References:
- docs/contribute/source/plugin/ebpf.md
- docs/contribute/source/plugin/process.md
- docs/contribute/source/plugin/rusttls.md
- docs/contribute/source/plugin/wasi_logging.md
| @@ -0,0 +1,287 @@ | |||
| # wasmedge_ocr Plugin | |||
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing frontmatter metadata. All other plugin documentation files in this directory include YAML frontmatter with at least a "sidebar_position" field. This file should include the frontmatter at the top of the file (before line 1) to be consistent with the established pattern.
Example from other plugin docs:
---
sidebar_position: X
---References:
- docs/contribute/source/plugin/ebpf.md:1-3
- docs/contribute/source/plugin/process.md:1-3
- docs/contribute/source/plugin/wasi_logging.md:1-3
| ### Intended Use Cases | ||
| - Extracting text from artifacts (scanned documents, photos). | ||
| - Getting bounding box coordinates for text in images (layout analysis). | ||
| - processing images where the file resides on the host system. |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent capitalization. The word "processing" should be capitalized to match the style and parallel structure of the other items in this list.
| - processing images where the file resides on the host system. | |
| - Processing images where the file resides on the host system. |
| @@ -0,0 +1,287 @@ | |||
| # wasmedge_ocr Plugin | |||
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main title format is inconsistent with other plugin documentation files. Other plugin docs use titles that start with "Build..." (e.g., "Build with eBPF Plug-in", "Build WasmEdge With WasmEdge-Process Plug-in", "Build WasmEdge With WASI-Logging Plug-in"). This title should follow a similar pattern, such as "Build WasmEdge With wasmedge_ocr Plug-in" to maintain consistency.
References:
- docs/contribute/source/plugin/ebpf.md:5
- docs/contribute/source/plugin/process.md:5
- docs/contribute/source/plugin/wasi_logging.md:5
| @@ -0,0 +1,287 @@ | |||
| # wasmedge_ocr Plugin | |||
|
|
|||
| The `wasmedge_ocr` plugin provides Optical Character Recognition (OCR) capabilities to WasmEdge applications by integrating with the Tesseract OCR engine. It allows WebAssembly modules to extract text and layout information from images located on the host filesystem. | |||
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent terminology. The established convention in this codebase is to use "plug-in" (hyphenated) when referring to plugins in descriptive text. The word "plugin" (unhyphenated) should be changed to "plug-in" throughout the document for consistency, except in technical contexts like environment variable names (WASMEDGE_PLUGIN_PATH), file paths, or code identifiers where the unhyphenated form is required.
References:
- docs/contribute/source/plugin/ebpf.md:7
- docs/contribute/source/plugin/process.md:7
- docs/contribute/source/plugin/wasi_logging.md:6
This PR adds a comprehensive README for the wasmedge_ocr plugin to improve usability, discoverability, and contributor onboarding.
The documentation is based strictly on the current implementation and covers the full lifecycle of using the plugin—from build configuration to runtime usage—without introducing or assuming any new features.
Why this change is needed
Providing a complete README significantly improves developer experience and aligns this plugin with other well-documented WasmEdge plugins (e.g. wasm_bpf).