Introducing a new way to review your PRs.

Read the announcement

imputnet / helium

Private, fast, and honest web browser

View on GitHub

17 documents · Updated Nov 23, 2026

docs / build-configuration-and-downloads

Build configuration and downloads

The build input model turns a selected Chromium release into a repeatable Helium source tree. GN flags choose build behavior. Download manifests pin source and extra assets. Version files identify the result. Pruning and resource lists keep the source and branding inputs aligned with the intended build.

Build input model

The repository describes build inputs as a set of related contracts rather than as one build file. The Chromium version selects the upstream source. The manifests select archives and their destinations. The lists select source files to remove or resources to copy. The resulting tree is then ready for patching and compilation.

flowchart LR
    V[Version inputs] --> S[Chromium source selection]
    M[Download manifests] --> A[Source and extra assets]
    S --> T[Build source tree]
    A --> T
    P[Pruning rules] --> T
    R[Resource lists] --> T
    F[GN flags] --> C[GN build configuration]
    T --> C
    C --> O[Helium build outputs]

The main source archive comes from downloads.ini. Additional archives come from deps.ini, so a source checkout and its post-checkout assets remain separate inputs. The current Chromium source input is release 152.0.7977.64. The CI workflow uses the version and both manifests as the cache key. This makes a change to a pinned input produce a new download cache. References: .github/…/ci.yml• L70-99, downloads.ini• L1-8, deps.ini• L1-25, chromium_version.txt• L1

GN build configuration

GN flags provide the fixed build choices that shape the Chromium build. The checked-in flags.gn disables selected services and test settings, controls API-key use, enables Widevine, and sets version and warning behavior for this product build. References: flags.gn#L1-L17

The flags file is also a small, machine-checked contract. Its keys must be sorted and must not repeat. devutils/validate_config.py includes this check with the broader configuration checks, so a malformed flag set can stop configuration validation before build work proceeds. References: devutils/check_gn_flags.py• L7-16, devutils/check_gn_flags.py• L28-57, devutils/validate_config.py• L12-20, devutils/validate_config.py• L46-50

Download manifests

Download manifests describe files that are needed after the repository is cloned. Each entry names a source URL and local file name. It can also define a version, an expected hash, an archive type, a destination, and a directory to remove during extraction. This turns a remote asset into a named and checked build input.

The Chromium manifest uses the version from chromium_version.txt in its URL and archive name. It can obtain Chromium hashes from the official hash file. The dependency manifest holds extra assets such as search-engine data, onboarding content, and uBlock Origin. The current entries pin search-engine data to 202607242007, onboarding to 202608281912, and uBlock Origin to 1.74.0. Each dependency has its own release version and SHA-256 value. References: downloads.ini• L1-8, chromium_version.txt• L1, deps.ini• L3-25, utils/_common.py• L118-120, utils/downloads.py• L46-77

The download flow separates retrieval from unpacking. Retrieval fills a cache and checks the configured hashes. Unpacking places each checked archive at its manifest destination. A named component can be selected when only part of a manifest is needed. The download management page explains this flow in more detail. References: utils/downloads.py• L265-323, utils/downloads.py• L333-375, utils/downloads.py• L391-410

Source pruning

Pruning rules define which files are not part of the intended source input. pruning.list records paths to remove. The current list covers generated test data and other optional source content across Chromium areas. The pruning tool also removes contingent directories when the selected source form does not need them. These directories include optional tools, large test data, and platform areas that do not belong in the lite source tree.

The rules are generated from the unpacked source and compared with the checked-in list in CI. This keeps the declared source boundary tied to the selected Chromium version and the current pruning logic. The generator also accounts for symlinks and reports patterns that no longer match source files. References: pruning.list#L1-L25, utils/prune_binaries.py• L18-19, utils/prune_binaries.py• L61-145, utils/prune_binaries.py• L158-177, utils/prune_binaries.py• L205-224, devutils/update_lists.py• L322-364, .github/…/ci.yml• L104-139

Pruning is conditional for some paths. A build can keep contingent paths for Google tooling, or keep a selected sysroot. Files needed to preserve build metadata remain protected when a contingent directory is cleared. References: utils/prune_binaries.py• L147-155, utils/prune_binaries.py• L180-224, utils/prune_binaries.py• L246-259

Version inputs

The version inputs identify both the upstream base and the Helium revision. chromium_version.txt selects Chromium release 152.0.7977.64. version.txt supplies the Helium major part. revision.txt supplies the Helium patch part, which is currently 3. utils/helium_version.py combines these values and can add a platform revision when a platform tree is present.

The combined value is used in two ways. It can be printed for tags and release checks. It can also be appended to Chromium's version file as Helium-specific version fields. The release workflow compares the computed value before creating a release. References: chromium_version.txt• L1, version.txt• L1, revision.txt• L1, utils/helium_version.py• L14-24, utils/helium_version.py• L49-79, .github/…/release-and-tag.yml• L18-50

Version changes also affect asset identity. The Chromium archive URL and the CI cache key use the Chromium version. Dependency versions affect the same cache key through deps.ini. A version bump therefore has to update the source or asset manifest that owns the changed input. References: downloads.ini• L3-8, deps.ini• L3-24, .github/…/ci.yml• L70-75

Resource lists

Resource lists define the branding files that enter the Chromium tree. helium_resources.txt maps files in the repository's resource area to target paths in Chromium. The replacement step copies those files into the source tree, so the list is the contract between Helium branding and Chromium resource locations.

Generated resources use a second list. generate_resources.txt maps one source app icon to several output sizes. The generator scales the source image and writes the outputs before the replacement list consumes them. This separates asset creation from asset placement. The build asset generation page covers the asset flow in more detail. References: resources/helium_resources.txt• L1-70, resources/generate_resources.txt• L1-8, utils/replace_resources.py• L15-35, utils/generate_resources.py• L17-59

Resource list lines have a strict shape. Replacement entries have a source and destination. Generated entries have a source and either a destination or a target size plus destination. Invalid lines stop the operation instead of producing a partial, silent mapping. References: utils/replace_resources.py• L20-35, utils/generate_resources.py• L37-59

Input validation

Configuration validation protects the contracts that can silently change the source tree or build result. The validation entry point checks patch references as well as GN flag order and download manifest shape. CI separately regenerates source lists and compares them with the checked-in lists.

These checks do not prove that every remote service is available. They verify that the repository's declared inputs have the expected form and that generated source boundaries match the checked-in record. References: devutils/validate_config.py• L7-23, devutils/check_downloads_ini.py• L7-16, devutils/check_downloads_ini.py• L28-40, .github/…/ci.yml• L101-139

Change checklist

When these files or sections are changed, remember to consider these:

  • When chromium_version.txt changes, update the Chromium archive URL and its hash input. Rebuild the generated pruning and domain lists against the new source tree.
  • When a deps.ini entry changes, update its release version, archive name, hash, and destination as one contract. Check consumers that read the entry directly, such as onboarding string generation.
  • When a download destination or stripped directory changes, inspect the source paths that later patching, generation, or build steps expect.
  • When pruning.list changes, regenerate it from the selected source form and confirm that contingent-path exceptions still match the intended build.
  • When a resource mapping changes, keep generated asset outputs and replacement destinations consistent. A copied file must exist at the path expected by Chromium.
  • When version inputs change, check both the computed release tag and the version fields written into Chromium's version file.

Important failure modes

TriggerConsequenceGuard
An archive hash does not match its manifest or official hash fileRetrieval stops before the archive is usedutils/downloads.py verifies every configured hash before unpacking.
A manifest entry points to a missing or invalid fieldThe entry cannot be parsed as a download inputThe download schema check runs through devutils/check_downloads_ini.py.
A checked-in pruning list differs from the list generated for the selected sourceThe source boundary is no longer reproducible from the declared rulesCI compares pruning.list with the generated list.
A GN key is duplicated or out of orderBuild configuration can be ambiguous or fail repository validationdevutils/check_gn_flags.py rejects duplicate and unsorted entries.
A resource list line has the wrong number of fieldsResource generation or replacement stops instead of applying a complete mappingBoth resource tools validate each non-comment line.
Helium version fields already exist in Chromium's version fileVersion injection can add conflicting product valuesutils/helium_version.py checks for existing Helium fields first.

Key files

FileWhy to read it
flags.gnSee the fixed GN choices for the Helium build.
downloads.iniSee how the Chromium source archive is selected and checked.
deps.iniSee the pinned post-clone assets and their destinations.
chromium_version.txtSee the upstream Chromium release input.
version.txt and revision.txtSee the Helium release parts used for version assembly.
pruning.listSee the declared files removed from the source input.
utils/prune_binaries.pyUnderstand the boundary between required source and contingent content.
resources/helium_resources.txtSee the branding source-to-Chromium resource mappings.
resources/generate_resources.txtSee the generated icon size inputs.
utils/downloads.pyFollow manifest parsing, cache retrieval, hash checks, and unpacking.
utils/helium_version.pyFollow version assembly and injection into Chromium.
.github/…/ci.ymlSee how CI combines caches, downloads, unpacking, and generated-list checks.