Introduction to OpenHWP
Relevant source files
The following files were used as context for generating this wiki page:
OpenHWP is an open-source desktop application designed to view and interact with Korean HWP and HWPX documents across macOS, Windows, and Linux platforms. By leveraging the Deno desktop runtime and the rhwp engine, it provides a cross-platform solution that does not require the installation of Hancom Office. The project is currently in an early development phase, focusing on a thin desktop shell architecture that delegates complex document processing to a specialized Rust-based engine compiled to WebAssembly.
Sources: README.en.md:3-9, README.md:3-9
System Architecture
The architecture of OpenHWP is built on the principle of separating the "document engine" from the "platform shell." It utilizes a single Deno toolchain to manage the application lifecycle and rendering.
Core Components
| Component | Technology | Description |
|---|---|---|
| Desktop Shell | Deno Desktop | A native window webview that displays content served by Deno.serve(). |
| Rendering Backend | CEF (Chromium) | Ensures consistent rendering across operating systems using the Chromium Embedded Framework. |
| Document Engine | rhwp (Rust/WASM) | Handles parsing and rendering of HWP/HWPX documents via WebAssembly. |
| Native Integration | Deno Bindings | Provides access to native menus, windows, and system-level APIs. |
Sources: README.en.md:13-22, README.md:13-22
Application Flow
The following diagram illustrates how OpenHWP initializes and renders a document using its hybrid architecture:
The diagram shows the lifecycle from application startup to the final rendering of a document page.
Sources: README.en.md:13-33, README.md:13-33
Technical Implementation Details
Document Processing with rhwp
The application utilizes two primary NPM packages from the rhwp ecosystem to handle different levels of document interaction.
- @rhwp/core: Used for parsing and viewing. It allows the application to initialize the WASM engine, create an
HwpDocumentinstance from raw bytes, and render specific pages into SVG format. - @rhwp/editor: A full editor UI intended to be embedded as an iframe for document modification.
Sources: README.en.md:24-41, README.md:24-41
File System Interaction
OpenHWP leverages the standard web File System Access API because the CEF backend operates in a secure context (localhost). This eliminates the need for native file picker implementation within the Deno layer, as the browser engine handles these interactions directly.
// Example: Opening a file restricted to .hwp / .hwpx
const [handle] = await window.showOpenFilePicker({
types: [{ accept: { "application/octet-stream": [".hwp", ".hwpx"] } }],
});
const file = await handle.getFile();
const bytes = new Uint8Array(await file.arrayBuffer());
Sources: README.en.md:43-55, README.md:43-55
Development Environment
Toolchain and Dependencies
OpenHWP strictly uses the Deno toolchain (minimum version 2.9.0). It avoids other runtimes like Node.js or Bun. Development workflows are managed via Deno's built-in tasks and linting tools.
- Deno Version: ≥ 2.9.0 (required for
deno desktopsupport). - Workflow Commands:
deno lint: Static code analysis.deno fmt --check: Code style verification.deno test: Test suite execution.deno task dev: Local development execution.
Sources: CONTRIBUTING.md:11-30, README.en.md:65-70, orca.yaml:16-19
Project Roadmap
The development is planned across four major phases:
- Viewer: Basic file opening and SVG rendering.
- Editor: Integration of
@rhwp/editorand persistent disk storage viaFileSystemFileHandle. - Export & Print: Support for PDF generation and system print paths.
- Packaging: Automated CI builds for
.dmg(macOS),.msi(Windows), and various Linux formats (.deb,.AppImage).
Sources: README.en.md:73-82, README.md:73-82
Contribution and Community Standards
The project follows the Contributor Covenant Code of Conduct and uses Conventional Commits for versioning and changelog generation.
Contribution Process
This diagram outlines the gated contribution process where external PRs require initial maintainer approval via an issue or discussion.
Sources: CONTRIBUTING.md:32-60, CODE_OF_CONDUCT.md:1-25
Security Policy
Security vulnerabilities are handled privately. Users are instructed to use GitHub's private vulnerability reporting or contact security@pleaseai.dev directly. Fixes are prioritized for the latest major versions.
Sources: SECURITY.md:1-15, CONTRIBUTING.md:78-79
OpenHWP represents a modern approach to legacy document handling by combining a lightweight Deno-based desktop shell with powerful Rust-based document processing, ensuring high performance and cross-platform consistency.