Skip to content
All posts
2 min readtebakopackagingtutorial

Basic payloads: Run your first package (1 of 5)

The basic payloads series, hands-on: run your first package.

The Tebako team

github.com/tamatebako
Note

Post 1 of 5 in the series Basic payloads.

● ○ ○ ○ ○

Note

Reference guide: Install tebako and Run a packaged app.

This series teaches tebako v2 hands-on, one subject per post: run a package, make payloads, package applications, publish them. Every step is a command that can be run as written.

The subject of this post is the first one: running a package. The task requires no Ruby, no other language, and no toolchain — only tebako itself.

Run your first package install once brew install tebako or the shell installer tebako add-registry … point at any payload registry tebako install hello downloads + verifies what you get a command on PATH hello the ruby runtime downloads on first run, shared or: a fat executable download, chmod, run both ways run the same bytes — no ruby installed, nothing compiled

Figure 1 — Installing tebako once and installing a payload from any registry produces an ordinary command; a fat executable works the other way, with no install at all.

Install tebako

# macOS or Linux — pick one
$ brew install tamatebako/tap/tebako
$ curl -fsSL https://tebako.org/install.sh | sh

$ tebako --version
Tebako executable packager version 2.1.8

Install a payload and run it

Payloads live in registries — a registry is a YAML file hosted next to a publisher’s releases. Add one registry, install from it, and run:

$ tebako add-registry tfs:github:tamatebako/hello
$ tebako install hello
$ hello
Hello, world!

An ordinary command has appeared on the PATH. That command is a shim: a small link that dispatches, on every invocation, to the right payload version and runtime. Version pinning is covered in the last chapter of this series.

The other way: a fat executable

Some projects ship a single executable with everything carried inside. The user downloads it, makes it runnable, and runs it; the runtime it needs is resolved and verified on first run, then shared with every other tebako package on the machine:

$ chmod +x ./metanorma-1.16.9-arm64-macos
$ ./metanorma-1.16.9-arm64-macos compile document.adoc
resolving runtime: ruby >= 3.3, < 5.0 (arm64-macos)
runtime ruby-3.3.7 (downloaded, verified)

Both ways run the same bytes. What the preceding commands exercised is the whole model from the architecture series: a bootstrap, a mounted runtime, and payload slices. The next post builds a first payload.

Note

Continue with part 2 of 5: Data payloads: make one, read one.