Getting Started with Bark
Supported hosts & targets: Bark builds Browser WebAssembly (WASM32) and Linux x86\_64 native applications (production-verified on Linux, WSL2, Docker, and CI runners), with native Windows x64 (win64) and macOS Apple Silicon (macos-arm64) desktop targets supported via the multi-OS SDK and CI matrix.
1. Install Prerequisites & Bark SDK
On Ubuntu 24.04 / Debian-based Linux (or WSL2):
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
build-essential ca-certificates curl pkg-config \
clang-18 lld-18 wasi-libc libclang-rt-18-dev-wasm32 wabt binaryen \
libssl-dev libxxhash-dev libzstd1 libcurl4-gnutls-dev \
libglew-dev libglfw3-dev libgl-dev libegl-dev \
libfreetype-dev libpng-dev libvulkan1 libopus-dev libasound2-dev
Download the prebuilt Bark SDK tarball from the Bark Publisher Portal (or fetch it in CI using your scoped BARK_PUBLISH_TOKEN):
curl -fsSL -H "Authorization: Bearer $BARK_PUBLISH_TOKEN" \
https://tty.pt/bark/portal/sdk -o bark-sdk.tar.gz
tar -xzf bark-sdk.tar.gz
sh bark-sdk/install.sh "$HOME/.local"
export PATH="$HOME/.local/bin:$PATH"
export PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
export LD_LIBRARY_PATH="$HOME/.local/lib:${LD_LIBRARY_PATH:-}"
2. Scaffold a New Application
bark-init myapp 7100
cd myapp
This creates a ready-to-build project with:
Makefile(include ttypt/bark.mk)src/app.c(single-header<bark/app_main.h>isomorphic native + WASM entry)public/index.html(1-tag browser boot viahttps://tty.pt/bark/runtime/boot.js)worker/index.js(drop-in backend config &X-Bark-Ticketverifier viabark-partner.mjs).github/workflows/release.yml(automated encrypted package publishing)
3. Develop 100% Offline
Build both native and browser packages locally and run a standalone offline local lease and runtime server:
make
bark-dev-lease --dir build/lease-srv --port 8788
No connection to tty.pt is required during local development.
4. Register Your App & Signing Key
- Generate your Ed25519 publisher signing keypair locally (keep
pub.skstrictly secret):
`sh bark-pack --gen-key packaging/pub.sk packaging/pub.pk `
- Open
/bark/portal, review and affirm the
Ethical Use Covenant (/bark/covenant), wait for operator authorization if applying for a new publisher account, and register your app_id, slug, and 64-hex pub.pk (plus any optional split slice IDs).
- Mint two scoped tokens in
/bark/portal:
- CI Publish token (
BARK_PUBLISH_TOKEN) โ for your CI pipeline to download the SDK
and push signed encrypted packages.
- Backend Partner token (
BARK_PARTNER_TOKEN) โ for your app backend to mint and
revoke end-user tokens.