Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9a009e8
Add Linux stratum-bridge AppImage packaging and release upload
LiveLaughLove13 Mar 27, 2026
1f88cd3
Move AppImage packaging to bridge/appimage/
LiveLaughLove13 Mar 27, 2026
e55af61
AppImage: set desktop entry display name to RKStratum
LiveLaughLove13 Mar 27, 2026
8edcba7
fix(appimage): symlink .desktop to AppDir root for appimagetool
LiveLaughLove13 Mar 27, 2026
094f548
stratum-bridge{.png,.svg,.xpm} defined in desktop file but not found
LiveLaughLove13 Mar 27, 2026
bd23c14
Visual
LiveLaughLove13 Mar 27, 2026
5eb946b
ci: ship AppImage .tar.gz for preserved executable bit on extract
LiveLaughLove13 Mar 28, 2026
cad63c8
AppImage distributed as .tar.gz only
LiveLaughLove13 Mar 28, 2026
f012e69
Merge branch 'kaspanet:master' into appimage2.0
LiveLaughLove13 Apr 2, 2026
b11301f
mining-ready sync gating (IBD, parity, stability window)
LiveLaughLove13 Apr 3, 2026
1692aff
Merge RKNodeReSynccheck: mining-ready sync gating for stratum bridge
LiveLaughLove13 Apr 3, 2026
8c3d1f6
bridge(kaspaapi): refresh NODE_STATUS when mining-ready (fix stale [N…
LiveLaughLove13 Apr 3, 2026
9a13ee1
Merge RKNodeReSynccheck: NODE_STATUS refresh when mining-ready
LiveLaughLove13 Apr 3, 2026
28f3139
Merge branch 'kaspanet:master' into appimage2.0
LiveLaughLove13 Apr 6, 2026
6c024cc
Start bat
LiveLaughLove13 Apr 9, 2026
03a362e
Update deploy.yaml
LiveLaughLove13 Apr 10, 2026
d68ae48
Update stratum-bridge.png
LiveLaughLove13 Apr 18, 2026
5e3944d
Merge branch 'kaspanet:master' into appimage2.0
LiveLaughLove13 Apr 29, 2026
ca18f42
Merge branch 'kaspanet:master' into appimage2.0
LiveLaughLove13 May 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,32 @@ jobs:
cp target/x86_64-unknown-linux-musl/release/rothschild bin/
cp target/x86_64-unknown-linux-musl/release/kaspa-wallet bin/
cp target/x86_64-unknown-linux-musl/release/stratum-bridge bin/
# Copy bridge configuration file
cp bridge/config.yaml bin/
archive="bin/rusty-kaspa-${{ github.event.release.tag_name }}-linux-amd64.zip"
zip -r "${archive}" ./bin/*
echo "archive=${archive}" >> $GITHUB_ENV

- name: Install AppImage packaging deps (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y librsvg2-bin fuse libfuse2

- name: Build stratum-bridge AppImage (Linux)
id: appimage
if: runner.os == 'Linux'
continue-on-error: true
run: |
cd $GITHUB_WORKSPACE
bash bridge/appimage/build.sh "${{ github.event.release.tag_name }}"

- name: Pack AppImage tarball (preserves executable bit on Linux extract)
if: runner.os == 'Linux' && steps.appimage.outcome == 'success'
run: |
cd "$GITHUB_WORKSPACE"
IMG="stratum-bridge-${{ github.event.release.tag_name }}-x86_64.AppImage"
tar -czf "${IMG}.tar.gz" "$IMG"
echo "appimage_tarball=${GITHUB_WORKSPACE}/${IMG}.tar.gz" >> $GITHUB_ENV

- name: Build on Windows
if: runner.os == 'Windows'
shell: bash
Expand All @@ -79,6 +101,10 @@ jobs:
cp target/release/rothschild.exe bin/
cp target/release/kaspa-wallet.exe bin/
cp target/release/stratum-bridge.exe bin/
# Copy bridge configuration and batch files
cp bridge/config.yaml bin/
cp bridge/Start-Kaspad.bat bin/
cp bridge/Start-stratum-bridge-externalMode.bat bin/
archive="bin/rusty-kaspa-${{ github.event.release.tag_name }}-win64.zip"
powershell "Compress-Archive bin/* \"${archive}\""
echo "archive=${archive}" >> $GITHUB_ENV
Expand All @@ -95,6 +121,8 @@ jobs:
cp target/release/rothschild bin/
cp target/release/kaspa-wallet bin/
cp target/release/stratum-bridge bin/
# Copy bridge configuration file
cp bridge/config.yaml bin/
archive="bin/rusty-kaspa-${{ github.event.release.tag_name }}-osx.zip"
zip -r "${archive}" ./bin/*
echo "archive=${archive}" >> $GITHUB_ENV
Expand All @@ -106,6 +134,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Ship only the tarball: raw .AppImage from browser/GitHub UI often loses +x; tar.gz preserves it on extract.
- name: Upload stratum-bridge AppImage release tarball
if: runner.os == 'Linux' && steps.appimage.outcome == 'success'
uses: softprops/action-gh-release@v2
with:
files: ${{ env.appimage_tarball }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-wasm:
runs-on: ubuntu-latest
name: Building WASM32 SDK
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ Servers.toml
release
package-sizes.js
rustbridge_*.log
bridge/appimage/appimagetool-x86_64.AppImage
26 changes: 26 additions & 0 deletions bridge/Start-Kaspad.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@echo off
REM Kaspa Node Auto-Start Script (Portable Version)

title Kaspa Node - Auto-Restart Script

REM Change to the directory where this script is located
cd /d "%~dp0"

:xxx
echo Starting Kaspa Node (kaspad.exe)...
echo Directory: %cd%
echo.

echo To stop, press Ctrl+C and then 'Y' when prompted.
echo.

REM Run kaspad from the same folder
kaspad.exe --utxoindex --rpclisten=127.0.0.1:16110 --rpclisten-borsh=127.0.0.1:17110

echo.
echo Kaspa Node process exited. Restarting in 5 seconds...
choice /C SR /N /T 5 /D R >nul
if errorlevel 2 goto xxx

echo Stopping by user request.
goto :eof
11 changes: 11 additions & 0 deletions bridge/Start-stratum-bridge-externalMode.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@echo off

REM Force script to run from its own directory
cd /d "%~dp0"

echo Current directory: %cd%
echo.

stratum-bridge.exe --config "config.yaml" --node-mode external --kaspad-address 127.0.0.1:16110

pause
48 changes: 48 additions & 0 deletions bridge/appimage/AppRun
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash
# AppImage entry: run stratum-bridge with optional config in a writable location
# (AppImage mounts are read-only; config lives under XDG_CONFIG_HOME.)
set -euo pipefail

# When opened from a file manager there is usually no TTY — reopen inside a terminal
# so users see logs and know the bridge is running. Set RKSTRATUM_NO_AUTO_TERMINAL=1 to skip.
# APPIMAGE is set by the AppImage runtime to the outer .AppImage path.
if [[ -z "${RKSTRATUM_NO_AUTO_TERMINAL:-}" ]] && ([[ -n "${DISPLAY:-}" ]] || [[ -n "${WAYLAND_DISPLAY:-}" ]]) && ! [[ -t 0 ]] && [[ -n "${APPIMAGE:-}" ]]; then
quote_cmd() {
printf '%q' "$1"
shift || true
for a in "$@"; do printf ' %q' "$a"; done
}
_cmd=$(quote_cmd "$APPIMAGE" "$@")
if command -v x-terminal-emulator >/dev/null 2>&1; then
exec x-terminal-emulator -e bash -lc "exec $_cmd"
elif command -v gnome-terminal >/dev/null 2>&1; then
exec gnome-terminal --title="RKStratum Bridge" -- bash -lc "exec $_cmd"
elif command -v konsole >/dev/null 2>&1; then
exec konsole -p tabtitle="RKStratum Bridge" -e bash -lc "exec $_cmd"
elif command -v xfce4-terminal >/dev/null 2>&1; then
exec xfce4-terminal --title="RKStratum Bridge" -e bash -lc "exec $_cmd"
elif command -v xterm >/dev/null 2>&1; then
exec xterm -title "RKStratum Bridge" -e bash -lc "exec $_cmd"
fi
fi

HERE="$(dirname "$(readlink -f "${0}")")"
BIN="${HERE}/usr/bin/stratum-bridge"
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/stratum-bridge"
CONFIG_FILE="${CONFIG_DIR}/config.yaml"
mkdir -p "${CONFIG_DIR}"
# Do not inject --config if the user passed one (clap rejects duplicate --config).
inject_config=true
for a in "$@"; do
case "$a" in
--config | --config=*)
inject_config=false
break
;;
esac
done
EXTRA_ARGS=()
if [[ "${inject_config}" == true ]] && [[ -f "${CONFIG_FILE}" ]]; then
EXTRA_ARGS+=(--config "${CONFIG_FILE}")
fi
exec "${BIN}" "${EXTRA_ARGS[@]}" "$@"
65 changes: 65 additions & 0 deletions bridge/appimage/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env bash
# Build stratum-bridge AppImage from an existing musl release binary.
# Usage: from repo root, after `cargo build --bin stratum-bridge --release --target x86_64-unknown-linux-musl`:
# bash bridge/appimage/build.sh [version-label]
set -euo pipefail

VERSION="${1:-dev}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
PACK_DIR="${SCRIPT_DIR}"
cd "$ROOT"

BINARY="target/x86_64-unknown-linux-musl/release/stratum-bridge"
if [[ ! -f "$BINARY" ]]; then
echo "error: missing $BINARY — build stratum-bridge for x86_64-unknown-linux-musl first." >&2
exit 1
fi

APPDIR="${PACK_DIR}/StratumBridge.AppDir"
rm -rf "$APPDIR"
mkdir -p "$APPDIR/usr/bin"
cp "$BINARY" "$APPDIR/usr/bin/stratum-bridge"
chmod +x "$APPDIR/usr/bin/stratum-bridge"

cp "${PACK_DIR}/AppRun" "$APPDIR/AppRun"
chmod +x "$APPDIR/AppRun"

mkdir -p "$APPDIR/usr/share/applications"
cp "${PACK_DIR}/stratum-bridge.desktop" "$APPDIR/usr/share/applications/stratum-bridge.desktop"
# appimagetool requires exactly one .desktop at the AppDir root (may be a symlink).
ln -sf "usr/share/applications/stratum-bridge.desktop" "${APPDIR}/stratum-bridge.desktop"

ICON_DIR="$APPDIR/usr/share/icons/hicolor/256x256/apps"
mkdir -p "$ICON_DIR"
SVG="${ROOT}/bridge/static/assets/kaspa.svg"
BUNDLED_PNG="${PACK_DIR}/stratum-bridge.png"
# appimagetool requires Icon=name as name.png at the AppDir root (256x256 recommended).
if [[ -f "$SVG" ]] && command -v rsvg-convert >/dev/null 2>&1; then
rsvg-convert -w 256 -h 256 "$SVG" -o "${ICON_DIR}/stratum-bridge.png"
elif [[ -f "$BUNDLED_PNG" ]]; then
cp "$BUNDLED_PNG" "${ICON_DIR}/stratum-bridge.png"
elif [[ -f "$SVG" ]]; then
echo "error: rsvg-convert not found and no ${BUNDLED_PNG}; cannot produce stratum-bridge.png for AppImage." >&2
exit 1
else
echo "error: missing kaspa.svg and bundled stratum-bridge.png; cannot produce app icon." >&2
exit 1
fi
cp "${ICON_DIR}/stratum-bridge.png" "${APPDIR}/stratum-bridge.png"
cp "${ICON_DIR}/stratum-bridge.png" "${APPDIR}/.DirIcon"

TOOL="${PACK_DIR}/appimagetool-x86_64.AppImage"
if [[ ! -x "$TOOL" ]]; then
echo "Downloading appimagetool..."
wget -qO "$TOOL" "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x "$TOOL"
fi

export ARCH=x86_64
# Allow appimagetool to run without FUSE (e.g. GitHub Actions, CI).
export APPIMAGE_EXTRACT_AND_RUN=1
OUT="${ROOT}/stratum-bridge-${VERSION}-x86_64.AppImage"
rm -f "$OUT"
"$TOOL" "$APPDIR" "$OUT"
echo "Built: $OUT"
8 changes: 8 additions & 0 deletions bridge/appimage/stratum-bridge.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=RKStratum
Comment=Stratum bridge for Kaspa mining
Exec=stratum-bridge
Icon=stratum-bridge
Categories=Network;
Terminal=true
Binary file added bridge/appimage/stratum-bridge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion bridge/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ The bridge can run against:
- **External** node (you run `kaspad` yourself)
- **In-process** node (the bridge starts `kaspad` in the same process)


### Running from a release

If you are running from GitHub Releases (without `cargo run`):
Expand All @@ -36,6 +35,14 @@ Then run in external mode:
./stratum-bridge --config bridge/config.yaml --node-mode external
```

**Linux AppImage (optional):** Releases ship `stratum-bridge-<version>-x86_64.AppImage.tar.gz` only (the AppImage inside
preserves `+x` after `tar -xzf ...` or your archive manager). Extract, then run the `.AppImage`. When launched from a desktop
(no terminal), `AppRun` tries to open a system terminal window so startup logs stay visible; set `RKSTRATUM_NO_AUTO_TERMINAL=1` to
disable that. The AppImage looks for `config.yaml` at `$XDG_CONFIG_HOME/stratum-bridge/config.yaml` (usually
`~/.config/stratum-bridge/config.yaml`) when that file exists; otherwise it uses built-in defaults. Extra CLI arguments are
forwarded to the bridge (an explicit `--config` skips that default). To build the AppImage locally after a musl `stratum-bridge`
release build: `bash bridge/appimage/build.sh <version-label>`.

### CLI Help

For detailed command-line options:
Expand Down
Loading
Loading