Skip to content

Packaging and Releasing

Robin Kooyman edited this page Oct 29, 2026 · 2 revisions

A plugin goes to Beacon as an archive. The release workflow makes the archives for each platform. You can also make an archive by hand.

Archives

A plugin archive is a gzip tar. Its root holds the manifest, the SQL files and the library:

beacon-plugin.toml
sql/functions.sql
lib/libexample_native.so
Plugin type Archive name
Native, or native and SQL <name>-<version>-df<major>-<target>.tar.gz
SQL only <name>-<version>-any.tar.gz
  • <major> is the DataFusion major version. The pack script reads it from native/Cargo.lock.
  • <target> is the Rust target of the library, such as x86_64-unknown-linux-gnu.
  • SHA256SUMS lists the archives in sha256sum format. Beacon checks the archive against it.

Beacon picks the archive with its own DataFusion major version and its own target. When no native archive matches, it uses the any archive.

Platforms

Build the library on the platform of the Beacon server. The Beacon server image is a Linux image. For that image, build on Linux or in WSL.

Platform Library file Target
Linux, x86-64 libexample_native.so x86_64-unknown-linux-gnu
Linux, ARM64 libexample_native.so aarch64-unknown-linux-gnu
macOS, Apple silicon libexample_native.dylib aarch64-apple-darwin
macOS, Intel libexample_native.dylib x86_64-apple-darwin
Windows, x86-64 example_native.dll x86_64-pc-windows-msvc

Beacon loads only the library file of its own platform.

Pack the plugin

  1. Build the library:

    cargo build --release --locked --manifest-path native/Cargo.toml
  2. Pack the plugin. Use the library file and the target of your platform:

    python3 scripts/package-plugin.py . --out dist --library native/target/release/libexample_native.so --target x86_64-unknown-linux-gnu

The script writes the archive and SHA256SUMS in dist/. dist/ is in .gitignore. For a SQL-only plugin, omit --library and --target.

To build a Linux library on Windows or macOS, use Docker:

docker run --rm -v "$PWD:/src" -w /src rust:1-bookworm cargo build --release --locked --manifest-path native/Cargo.toml

Release the plugin

  1. Set plugin.version in beacon-plugin.toml.

  2. Run the unit tests. See Testing.

  3. Commit the change.

  4. Push a tag v<version>:

    git tag v0.1.0
    git push origin v0.1.0

The workflow .github/workflows/release.yml starts for each tag v*:

  1. It stops when the tag is not v<plugin.version>.
  2. It builds the library on 5 runners.
  3. It packs one archive for each target.
  4. It writes one SHA256SUMS file for all archives.
  5. It attaches the archives and SHA256SUMS to the GitHub release of the tag. It makes the release when it does not exist.
Runner Target
ubuntu-24.04 x86_64-unknown-linux-gnu
ubuntu-24.04-arm aarch64-unknown-linux-gnu
macos-15 aarch64-apple-darwin
macos-15-intel x86_64-apple-darwin
windows-2025 x86_64-pc-windows-msvc
  • To skip a target, remove its row from the matrix.
  • The workflow runs no tests. Run them before you push the tag.
  • The workflow uses cargo build --locked. So commit native/Cargo.lock.

A SQL-only plugin

For a SQL-only plugin, each build job writes the same <name>-<version>-any.tar.gz. The publish job keeps one of them. Keep one row in the matrix for a SQL-only plugin.

Versions

  • Increase plugin.version for each release. A tag is fixed. Do not move a tag.
  • A new SDK ABI or a new DataFusion major version needs a new release. Plugins of the old release do not load in the new Beacon.
  • Keep the old release for servers with the old Beacon. Set plugin.beacon for each release.

Next: Installing.

Clone this wiki locally