Build a static Linux x86_64 binary with zig cc, linking OpenSSL in and serving it to moonbitlang/async through a dlopen shim. CI publishes it to the rolling release on every push to main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
670 B
Makefile
24 lines
670 B
Makefile
# List recipes.
|
|
default:
|
|
@just --list
|
|
|
|
# Build the release binary.
|
|
build:
|
|
moon build --target native --release
|
|
|
|
# Build a static binary with Zig's musl toolchain (dist/orbit-linux-x86_64).
|
|
build-musl:
|
|
scripts/build-musl.sh
|
|
|
|
# Run the unit tests.
|
|
test:
|
|
moon test --target native
|
|
|
|
# Install Orbit to ~/.local/bin and set up its package PATH for Bash.
|
|
install: build
|
|
install -Dm755 _build/native/release/build/main/main.exe "$HOME/.local/bin/orbit"
|
|
@line='export PATH="${ORBIT_ROOT:-$HOME/.orbit}/bin:$PATH"'; rc="$HOME/.bashrc"; \
|
|
if [ ! -f "$rc" ] || ! grep -Fqx -- "$line" "$rc"; then \
|
|
printf '\n%s\n' "$line" >> "$rc"; \
|
|
fi
|