Local Development Setup
Relevant source files
The following files were used as context for generating this wiki page:
This page provides the necessary information to set up and maintain a local development environment for the OpenHWP project. OpenHWP is an open-source HWP/HWPX desktop application that utilizes a thin desktop shell built with Deno and a document engine powered by rhwp (Rust + WebAssembly).
The development environment relies on a single Deno toolchain to manage both the desktop shell and the document engine integration. Currently, the project is in an early stage where the repository contains the scaffold and documentation, with application code planned for future implementation.
Sources: README.en.md:3-13, CONTRIBUTING.md:12-14
Environment Prerequisites
The OpenHWP project is designed to run on a consolidated toolchain to minimize external dependencies.
Required Software
- Deno: Version ≥ 2.9.0 is strictly required because
deno desktopfunctionality was introduced in this version. - Operating Systems: macOS, Windows, and Linux are supported.
Sources: CONTRIBUTING.md:14-16, README.en.md:5-7
Toolchain Architecture
The project avoids using Node.js, bun (except for specific helper scripts), or mise, favoring the native Deno toolchain for all primary tasks.
The diagram shows the central role of the Deno toolchain in managing the different components of the OpenHWP architecture.
Sources: CONTRIBUTING.md:14-15, README.en.md:18-24
Initial Repository Setup
To begin development, clone the repository and initialize the Deno environment.
git clone https://github.com/pleaseai/openhwp.git
cd openhwp
deno install # Caches dependencies defined in deno.json
Sources: CONTRIBUTING.md:9-12
Automated Worktree Setup
If using worktree management tools like Orca, the project includes an orca.yaml configuration to automate the environment setup when a new worktree is created.
scripts:
setup: |
set -e
bunx @pleaseai/worktreeinclude "$ORCA_ROOT_PATH" "$ORCA_WORKTREE_PATH"
[ -f deno.json ] && deno install || true
Sources: orca.yaml:14-18
Development Workflow
The development workflow is standardized around Deno's built-in tooling for linting, formatting, and testing.
Standard Commands
| Task | Command | Description |
|---|---|---|
| Linting | deno lint | Checks code for potential errors and style violations. |
| Formatting | deno fmt --check | Verifies that the code adheres to the project's formatting rules. |
| Testing | deno test | Executes the test suite. |
| Development | deno task dev | Starts the application in development mode (planned). |
Sources: CONTRIBUTING.md:20-25, README.en.md:56-58
Contribution Standards
- Language: All code, comments, documentation, and commit messages must be in English.
- Commits: The project follows the Conventional Commits specification (e.g.,
feat(scope): subject). - Branching: Create feature or fix branches from
main.
Sources: CONTRIBUTING.md:6-7, CONTRIBUTING.md:18-19, CONTRIBUTING.md:28-30
Building and Packaging
OpenHWP uses the CEF (Chromium Embedded Framework) backend to ensure consistent rendering across different operating systems.
Build Commands
To build the application for different targets, use the following commands:
# Build a standalone binary using the Chromium (CEF) backend
deno desktop main.ts --backend cef
# Generate platform-specific installers (.dmg, .msi, .deb)
deno desktop main.ts
The packaging configuration for installers is managed via the desktop.output block within deno.json.
Sources: README.en.md:60-65, README.md:61-66
Security and Conduct
Developers are expected to adhere to the project's security policies and code of conduct during local development and when contributing.
- Security Reports: Vulnerabilities should not be reported via public issues. Use GitHub's private vulnerability reporting or email
security@pleaseai.dev. - Code of Conduct: The project follows the Contributor Covenant. Examples of positive behavior include demonstrating empathy and accepting constructive feedback.
Sources: SECURITY.md:11-18, CODE_OF_CONDUCT.md:1-15
Summary
Setting up a local development environment for OpenHWP requires Deno 2.9.0 or higher. The environment is designed to be lightweight, utilizing Deno's native desktop and webview capabilities alongside WebAssembly-based document processing. While the project is in its early stages, the established workflow emphasizes standard Deno tooling and conventional contribution practices to ensure a stable and consistent codebase.