Where Are the Generated Files in Automattic/harper? A Complete Guide to Build Outputs

Generated files in the Automattic/harper monorepo are deliberately excluded from version control and produced on-demand during the build process, appearing in target/ for Rust components and dist/ (or build/) directories for JavaScript packages.

The Harper grammar checker is organized as a multi-language monorepo containing Rust core libraries, WebAssembly bindings, browser extensions, and web applications. Because these build artifacts are listed in .gitignore, they do not appear in the GitHub file tree; instead, they materialize locally when you execute the appropriate build commands according to the Automattic/harper source code.

Rust Core Artifacts: The target/ Directory

The Rust workspace defined in Cargo.toml at the repository root outputs compiled binaries to standard Cargo directories that vary by build profile.

Debug Builds

Running cargo build compiles development versions of harper-core, harper-cli, and harper-wasm into target/debug/. This directory contains unoptimized binaries including the harper-cli executable and the harper-wasm.wasm file used for WebAssembly development.

Release Builds

For optimized production artifacts, cargo build --release writes files to target/release/. As implemented in Automattic/harper, these folders hold the final compiled binaries intended for distribution and deployment.

JavaScript and TypeScript Package Outputs

JavaScript packages across the workspace follow a consistent pattern defined in their respective package.json files, emitting bundles to local dist/ directories when you run pnpm run build.

The dist/ Convention for Library Packages

Each package writes its build output into a dist/ folder at the package root:

  • packages/harper.js/dist/ – Contains the ESM bundle and accompanying WebAssembly file produced by the build script in packages/harper.js/package.json.
  • packages/chrome-plugin/dist/ – Holds the compiled Chrome and Firefox extension files, including the manifest and bundled JavaScript, ready for browser loading.
  • packages/wordpress-plugin/dist/ – Stores the built WordPress plugin assets generated by the scripts defined in packages/wordpress-plugin/package.json.

Web Application Static Files

The documentation site in packages/web uses Vite as configured in packages/web/vite.config.ts. Running pnpm run build generates:

  • packages/web/.vite/ – Vite's internal cache directory containing intermediate processing data.
  • packages/web/dist/ – The static HTML, CSS, and JavaScript files that are served on writewithharper.com.

Desktop Application Bundles

The Tauri-based desktop application builds through commands defined in the justfile. Executing just build-desktop-linux or just build-desktop-macos emits platform-specific installable bundles (such as AppImage for Linux or DMG for macOS) into harper-desktop/target/release/bundle/. These generated paths remain excluded from source control while containing the final distributable applications.

How to Generate These Files Locally

Run these commands from the repository root to produce the respective build artifacts:


# Rust core libraries, CLI, and WASM

cargo build           # → target/debug/

cargo build --release # → target/release/

# JavaScript/TypeScript packages (requires pnpm)

pnpm install          # Install workspace dependencies once

pnpm run build        # Runs build scripts across all packages, producing dist/

# Individual package examples

cd packages/harper.js && pnpm run build        # → packages/harper.js/dist/

cd packages/chrome-plugin && pnpm run build   # → packages/chrome-plugin/dist/

cd packages/wordpress-plugin && pnpm run build # → packages/wordpress-plugin/dist/

# Web application

cd packages/web && pnpm run build             # → packages/web/.vite/ and packages/web/dist/

# Desktop application (Linux example)

just build-desktop-linux                      # → harper-desktop/target/release/bundle/

Key Configuration Files Defining Output Locations

Several configuration files establish where generated files are written:

  • Cargo.toml – Defines the Rust workspace structure and implicitly sets target/ as the build output root for all crates.
  • packages/web/vite.config.ts – Configures Vite to write static assets to dist/ and cache metadata to .vite/.
  • packages/harper.js/package.json – Contains the "build" script that determines the contents of packages/harper.js/dist/.
  • packages/chrome-plugin/package.json – Defines the extension compilation process targeting packages/chrome-plugin/dist/.
  • packages/wordpress-plugin/package.json – Specifies build steps for WordPress plugin assets output to dist/.
  • justfile – Defines desktop build tasks like build-desktop-linux that output to harper-desktop/target/release/bundle/.

Summary

  • Rust components generate binaries in target/debug/ (development) and target/release/ (production) at the workspace root.
  • JavaScript packages write bundles to individual dist/ directories (e.g., packages/harper.js/dist/, packages/chrome-plugin/dist/).
  • Web applications output static files to packages/web/dist/ with Vite cache in packages/web/.vite/.
  • Desktop applications are assembled in harper-desktop/target/release/bundle/ via just commands.
  • All these locations are excluded from Git via .gitignore and must be generated locally using cargo build, pnpm run build, or just tasks.

Frequently Asked Questions

Why don't I see the target/ or dist/ folders when browsing the repository on GitHub?

These directories are listed in .gitignore to prevent build artifacts from being committed to version control. According to the Automattic/harper source code, only source files are tracked; you must clone the repository and run the build commands locally to generate these folders.

What command generates the WebAssembly file needed for the browser extensions?

Running cargo build --release in the workspace root produces target/release/harper-wasm.wasm. The JavaScript packages then reference or copy this file into their respective dist/ directories during their own build process defined in package.json.

Can I change the output location for build artifacts?

For Rust components, set the CARGO_TARGET_DIR environment variable to redirect target/ elsewhere. For JavaScript packages, modify the build script in the respective package.json (such as in packages/harper.js/package.json) or adjust the Vite configuration in packages/web/vite.config.ts to change the dist/ output path.

Where are the installable files for the Harper desktop application?

The packaged applications (AppImage for Linux, DMG for macOS) are generated in harper-desktop/target/release/bundle/ when you run just build-desktop-linux or just build-desktop-macos. These files are not stored in the repository and must be built locally or downloaded from the project's releases page.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →