BakeNative is under active development. APIs may change.
Skip to Content
BakeNative

manifest.json

The file that describes a native bundle and pairs its pieces.

Every native bundle has a manifest.json. A bundle loaded from a folder without one is refused, because it is the contract between your build, your update server and the app.

{
  "target": "ios",
  "renderer": { "module": "bake:renderer", "target": "universal", "text": "host",
                "capabilities": ["scoped-styles", "visibility", "class-name-alias"] },
  "hostProtocol": 4,
  "batchDigest": "0x<FNV-1a 64 of the batch stream schema>",
  "hermesBytecode": 100,
  "react": "19.3.1",
  "files": {
    "app.js": "<sha256>", "app.css": "<sha256>", "app.hbc": "<sha256>", "app.baked": "<sha256>"
  },
  "frame": {
    "file": "app.baked", "format": 4, "hbcFnv": "<identity of app.hbc>", "target": "ios",
    "hosts": 35, "restyled": 0, "pageRestyle": false, "styles": [12, 12], "bytes": 6440
  },
  "requires": {
    "format": 1,
    "batch": {
      "stream": "<FNV-1a 64 of the shared encoding>",
      "seed": { "count": 52, "hash": "<FNV-1a 64 of the seed strings>" },
      "ops": { "create": { "tag": 1, "shape": "<FNV-1a 64 of its fields>" } }
    },
    "events": ["click", "input"],
    "style": ["color", "padding"],
    "modules": ["Share"]
  }
}
FieldMeaning
targetThe target this bundle was built for
rendererNative renderer settings the bundle was compiled with
hostProtocolVersion of the commands the bundle sends to the native host. The host checks the supported protocol range. The first BakeNative release requires protocol 4
batchDigestDigest of the binary renderer batch stream app.hbc writes (native/rust/schema/batch.oschema), also in every batch it sends. The core reads the bundle's batches by the op names in requires.batch; without requires, the digest must equal the core's own
hermesBytecodeHermes bytecode version of app.hbc. The app also reads it from the file itself and refuses other versions
react or octaneVersion of the framework used to build the bundle
filesSHA-256 of each file in the bundle. Used by download integrity checks and before paint for localized bake files
assetsThe bundled images and media (asset://<file>): each source path and the hashed file it became
fontsThe @font-face faces the host registers before the first frame, in source order: descriptors, sources (files next to app.hbc) and the canonical rule body
frameThe first-screen snapshot, required on React native builds, or null for an unbaked Octane bundle
requiresWhat the bundle uses, which the runtime and its app package must provide (below)

requires

Written by bake build. A bundle runs where every requirement is provided with the same shape; anything it does not use may be added, changed or removed. The Rust core checks it on every platform (Packaging: OTA compatibility).

FieldMeaningProvided by
formatVersion of this block (1). A runtime refuses formats it does not know
batch.streamHash of what every renderer op shares (encoding, header, interned tables)the core: equal
batch.seedHow many built-in strings the bundle's writer knows, and their hashthe core: the bundle's are a prefix of its own
batch.opsEvery op the writer may send: its tag and a hash of its fields (the tag left out)the core: each op by name with the same hash; a different tag is mapped
eventsEvents the markup listens to (onClick → click)the core dispatches each
styleCSS properties in app.css and literal inline stylesthe core knows each
packagePackaged apps: the package idthe package: equal
nativePackaged apps: { "<Module>.<member>": "<signature>" } of each native member called; a dynamic access lists the whole modulethe package: each member with the same signature
nativeBuildOnly when the app declares it: the lowest package nativeBuildthe package: at least it
runtimeOnly when the app declares a runtime rangethe core's version is in it
nativeModulesThe native modules the app's own code calls unguarded (first-party ones and dynamic access left out); the root checks each is registered before the bundle runsthe root's registry
optionalNativeModulesThe ones it calls guarded (hasNative, in native): registered when presentthe root's registry, if any
views{ "<View>": "<signature>" } of each native view the bundle renders (the FNV-1a 64 of the spec's signature lines)the host / package: each with the same signature
modulesThe first-party modules (Clipboard, Linking, Share) the bundle calls after tree-shaking, sorted. The host links only these (System modules)a package: each is in its provides.modules. A package without modules predates them and has them all. A bundle without the field requires none

A manifest without requires (built before it existed) is accepted when its batchDigest equals the core's exactly; an old native block is checked by its package and uses member signatures, and its native.fingerprint is ignored.

locales and frames

With locales in bake.config.ts, locales lists them (the first is the default) and frames holds each locale's first screen, by tag, with the fields of frame below. The default's file is app.baked, which frame describes too; the others are app.<tag>.baked. Each file is also in files with its sha256.

{
  "locales": ["en", "ko"],
  "frame": { "file": "app.baked", "format": 4, "hbcFnv": "<identity of app.hbc>" },
  "frames": {
    "en": { "file": "app.baked", "format": 4, "hbcFnv": "<identity of app.hbc>" },
    "ko": { "file": "app.ko.baked", "format": 4, "hbcFnv": "<identity of app.hbc>" }
  }
}
  • Which file a screen opens. The core resolves the app locale from locales (the app's saved choice, then the device's languages, then the default). The host opens frames[<the app locale>].file when it names that locale's canonical file. If the entry names another file or the canonical file is missing, the screen mounts from JavaScript.
  • Without locales. The manifest has neither key, and the host opens app.baked as frame describes it. A bundle built before frames existed is read the same way.
  • The direction is not in the manifest. It follows from the tag (ar, he, fa and other right-to-left languages and scripts), at bake time and on the device alike.
  • A frame of another build. Every entry's hbcFnv is the identity in its file's header, and the runtime checks the header against app.hbc at open. A frame baked from another app.hbc is not shown.
  • A localized frame with different bytes. Before layout or prewarm, the runtime also checks the selected bake against its SHA-256 in files when present. A mismatch mounts from JavaScript. Device cache frames use the cache slot identity instead.

The byte layout and which facts the file itself carries: .baked format.

frame

FieldMeaning
fileSnapshot file name
format.baked version (4)
hbcFnvIdentity of the app.hbc it was baked from: FNV-1a 64 of the SHA-1 hermesc writes in the bytecode's last 20 bytes. The snapshot is only used with that bytecode, and the app checks it without reading the whole file
targetThe target it was baked for (ios, android, mac, windows), the bundle's target. Platform-specific values are applied on device (Targets)
hostsElements in the first commit
restyledElements restyled on device because their style depends on the viewport
pageRestyletrue if the page itself depends on the viewport, so everything is restyled
stylesDistinct computed styles for light and dark
bytesSnapshot size

The values in the example are illustrative.

On this page