Skip to content

Release builds: bindings next to the executable, optional static libyaml - #89

Merged
tmori merged 1 commit into
mainfrom
fix/release-bindings-yaml
Nov 8, 2026
Merged

tmori merged 1 commit into
mainfrom
fix/release-bindings-yaml

Conversation

@tmori

@tmori tmori commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

A released athrill3 did not run away from the source tree it was built from, for two reasons:

  • it looked for the bindings only in the build-time source path, unless ATHRILL_DEVICE_BINDINGS_DIR was set;
  • it linked Homebrew's (or the distribution's) shared libyaml.

Change

  • Bindings: ATHRILL_DEVICE_BINDINGS_DIR, else bindings/ next to the executable (macOS _NSGetExecutablePath, Linux /proc/self/exe), else the build-time default. Without any of them Athrill still stops and names the directory it looked for.
  • ATHRILL_DEVICE_STATIC_YAML (OFF by default) links libyaml.a. The release tarballs of the targets will ship athrill3 plus bindings/.

Checked

  • A static STM32 build configured with a nonexistent default bindings directory, copied away from the sources:
    • without bindings/ it stops with bindings directory /nonexistent/bindings not found;
    • with bindings/ beside it, it runs Zephyr hello_world on nucleo-f767zi (macOS) and the bare-metal hello (Docker Ubuntu 24.04).
  • otool -L / ldd: no libyaml.
  • ctest 661/661 on macOS and Linux, with no new warnings.
  • Homebrew's libyaml.a is built for macOS 14, so a static macOS build targets macOS 14.

🤖 Generated with Claude Code

A released athrill3 runs away from the source tree it was built from:
- the bindings directory is ATHRILL_DEVICE_BINDINGS_DIR, else bindings/
  next to the executable (macOS _NSGetExecutablePath, Linux /proc/self/exe),
  else the build-time default. Without any, Athrill stops naming the
  directory it looked for, as before.
- ATHRILL_DEVICE_STATIC_YAML (OFF by default) links libyaml.a, so the
  binary does not depend on an installed libyaml.

Checked: a static build away from the sources runs Zephyr hello_world on
nucleo-f767zi (macOS) and the bare-metal hello (Linux, Ubuntu 24.04) with
bindings/ beside it, and stops with the directory named without it; otool /
ldd show no libyaml; ctest 661/661 on macOS and Linux.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmori
tmori merged commit ff23daf into main Nov 8, 2026
10 checks passed
@tmori
tmori deleted the fix/release-bindings-yaml branch November 8, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant