Installation

bext-lite is two binaries that work together:

  • bext-lite-build is the AOT exporter. It takes a PRISM app's source and emits a self-contained dist-lite/ directory (bundles plus a manifest plus static assets).
  • bext-lite is the runtime host. It serves an exported dist-lite/, packs it into a single binary, checks it, and drives the mobile packaging commands.

You build both from the bext monorepo.

Prerequisites#

  • Rust, nightly toolchain. The monorepo builds on nightly. Install rustup and add the nightly toolchain:

    rustup toolchain install nightly
    
  • A C toolchain (a system cc), for the bundled QuickJS and SQLite that the runtime links. Already present on most dev machines.

  • bun is needed only by the exporter, and only when your app has "use client" React pages (the exporter runs a real React SSR build for those). A string-builder-only PRISM app needs neither bun nor React. Install it from bun.sh if you use React pages.

There is no Node runtime anywhere in the picture, at build time or at run time.

Build the binaries#

From the root of the bext monorepo:

# The runtime host: bext-lite (serve / pack / check / keygen / publish / mobile).
cargo +nightly build --release -p bext-lite --bin bext-lite

# The AOT exporter: bext-lite-build.
cargo +nightly build --release -p bext-turbopack --bin bext-lite-build

Both land in target/release/. The runtime is intentionally lean: its only heavy dependency is QuickJS (rquickjs) plus bundled SQLite. There is no V8 and no turbopack in the runtime binary.

Put them on your PATH for convenience:

cp target/release/bext-lite target/release/bext-lite-build ~/.local/bin/
Tip

The exporter (bext-lite-build) links the full compile pipeline (ts-rs plus the turbopack bundler), so it is the heavier of the two builds. The runtime (bext-lite) is small and fast to compile.

Verify it works#

Check the two binaries respond:

bext-lite --help
bext-lite-build --help

bext-lite --help prints the command list (serve, pack, keygen, publish, check, mobile). bext-lite-build --help prints usage: bext-lite-build <site_dir> [-o <out_dir>].

To confirm the whole chain end to end, export and serve a real app. The repo ships a runnable example, crates/bext-lite/examples/device-playground. From the repo root:

# Export it (the example has React pages, so point the build at the vendored
# React and the shared framework).
BEXT_LITE_VENDOR_NODE_MODULES="$PWD/vendor/node_modules" \
BEXT_SHARED_FRAMEWORK_DIR="$PWD/sites/shared/framework" \
  bext-lite-build crates/bext-lite/examples/device-playground -o /tmp/dp

# Serve it.
bext-lite serve /tmp/dp --port 8080

Then in another terminal:

curl -s http://127.0.0.1:8080/

A full HTML document confirms the runtime is rendering. The Quickstart walks through this example in detail.

Note

bext-lite serve defaults to 127.0.0.1:8787 when you omit --port and --host. The example above uses --port 8080 to match the runnable demo.