Skip to main content

Runtime Kit is the public plug between your app and Bitfield. Your app reads named data, sends target requests, and stays out of the setup work that makes packages, storage, and runnable slots work.

What this is

Runtime Kit lets a product use Bitfield without turning every screen, feature, and package into one tangled codebase.Start with the product moment:
The public JavaScript surface is intentionally small:
That small surface is not a small system. It is the stable app-facing edge of a larger Runtime Kit flow:
React is one surface in that flow. It is not the whole Runtime Kit.If you want the full concept chain first, read Runtime Kit concept map. If you want the full build path first, read Package to screen. It walks through the first complete Runtime Kit feature: package folder, boundary file, package admission, named data read, target request, React surface, verification, and failure checks.

Choose your path

Runtime Kit has several reader paths. Pick the one that matches your job.

The first feature shape

Most Runtime Kit features start as the same four-part slice:That slice can power a welcome panel, a search box, a settings screen, a local game menu, a support assistant, or a dashboard card. The feature changes. The boundary shape stays steady.

The mental model

Think of Runtime Kit as the plug board for your product.Your package says what it brings: data to store, bytes it owns, or callable slots. Bitfield admits that package into local state. Runtime Kit prepares the app-facing view. Your app then does one of two jobs: read data that is already prepared for it, or ask a named target to do work.The important part is what your app does not do. It does not open storage files. It does not choose data plumbing. It does not parse package files. It does not import or call the callable target implementation. That is the point. Your feature code stays calm while Runtime Kit can get faster, more flexible, and more replaceable.The fastest way to ruin the architecture is to let the first feature bypass the public API. If the first screen imports a package file directly, the second screen will copy that direct import, the third screen will add another direct import, and by month six the product has a maze instead of an architecture.

How it works technically

Runtime Kit separates four public roles:The public app call chain looks like this:
The public package chain looks like this:

What app code should own

App code should own names and product behavior:
  • Which named data a component wants.
  • Which target a button or action calls.
  • How to render loading, empty, error, and success states.
  • How to decode reply bytes when the target returns JSON, text, or another public format.
App code should not own Runtime Kit setup:
  • No direct package parsing.
  • No hand-built storage addresses.
  • No low-level data wiring choices.
  • No unpublished Runtime Kit deep imports.
  • No private implementation wiring.

Before / after

The two app-facing calls

useBitfieldData(...)

Use this when a component needs named data.
The hook returns:
Read the focused guide: Read data in React.

sendRequestToBitfieldTarget(...)

Use this when app code needs a named target to do work.
The reply is bytes. Decode it according to the action reply shape your package exposes.Read the focused guide: Send a request.

Runtime Kit is not React-only

React is the first documented app surface because a lot of products start there. Runtime Kit is broader than that.The public invariant is the same outside React:
React gives you useBitfieldData(...) today. The Runtime Kit idea is bigger than one UI framework.

Terms to keep straight

Common mistakes

Treating the hook like a database queryuseBitfieldData(...) reads data Runtime Kit has already prepared for the surface. It is not where app code should build storage addresses or recreate package setup.Turning target names into importsA target name like product.search is the public call. Keep calling that target. Do not import the private implementation from your component.Making React the architectureReact is a surface. Runtime Kit is the boundary. If you build a non-React surface later, the Runtime Kit idea stays the same: named data reads and named target requests.Publishing secrets in package examplesPackage records and stored bytes are product material. Do not put private keys, tokens, or account secrets into public package examples.Triggering Runtime Kit for static public pagesDo not add Runtime Kit just to render static copy, images, links, or a brochure page. Use Use Runtime Kit where it should run before wiring public pages that do not need live Bitfield data or Bitfield request bytes.

Quick reference

Now build the bigger version

Build one complete feature slice with the Runtime Kit shape.
  1. Declare one package record for data the UI reads.
  2. Declare one package-owned file for help, copy, rules, or config.
  3. Declare one slot target for work the user can trigger.
  4. Read the named data with useBitfieldData(...).
  5. Call the target with sendRequestToBitfieldTarget(...).
That is enough to build a real feature without scattering feature setup through the app.
Repeat that slice for the next feature. The 10th feature should still have the same calm shape as the first.

Contract to keep beside the code

For each feature, write the public Runtime Kit contract in the feature ticket or README:
That tiny contract prevents three common failures: app code reading package files, buttons importing target implementations, and new features inventing a second data path.
Last modified on May 11, 2026