Early developmentPre-1.0: syntax may change.Release historyGitHub
Build an add-on

Start a Rune library

Scaffold a Rune library, link it from an app, and test an imported route.

Create and test the package

Generate a manifest, sample route, README, smoke test, Rune-Web usage guide, and workflows for Pages and catalog updates.

vectrune deps init my-addon
cd my-addon
vectrune test tests/smoke.test.rune

To use MIT, add --mit-license with your copyright holder name. This also sets the package license metadata.

A Rune add-on is a directory of ordinary .rune files. Share routes, functions, schemas, or components supported by the consumer’s runtime. The starter ships GET /my-addon. This health route shows the same pattern. Pick section names and routes that can coexist with those in the consuming app.

health.rune
#!RUNE

@Route/GET/health
run:
    respond 200 "OK"

Test from a checkout

From the consuming project, link the add-on directory. Rune edits are picked up on the next run. The link stays outside your project manifest and lockfile. Check that vectrune deps install --help shows PATH.

cd ..
mkdir consumer
cd consumer
vectrune deps install ../my-addon

In the consumer directory, save this as app.rune. Put imports before sections. The alias is my-addon and the path after it is relative to the add-on’s root.

app.rune
import "pkg:my-addon/my-addon.rune"

@App
type = REST
port = 3000
vectrune app.rune

From another terminal, call the scaffolded route. It returns OK. Edit the add-on and restart the app to try the change.

curl http://127.0.0.1:3000/my-addon
Built entirely with Rune-Web