Files
salvium-rs/scripts/build-windows.sh
T
Matt Hess f71176d1f6 v1.0.7-r001: Cross-platform builds, FFI expansion, license, and bug fixes
- Version all crates at 1.0.7-r001 (tracking Salvium C++ 1.0.7)
  - Source-available license: free for author/designees and non-commercial
    use; annual commercial license required for any revenue-generating use
  - Build scripts for Android/iOS/Linux/macOS/Windows producing both
    libsalvium_crypto and libsalvium_ffi
  - CI workflow publishes platform archives to salvium-rs-releases
  - 23 new FFI functions: storage ops, address book, tx notes, attributes,
    staked balance, key derivation, mnemonic
  - Fix stake detection: count owned outputs regardless of spent state
  - Auto-resume testnet integration tests from current chain height
2026-02-23 17:01:33 +00:00

32 lines
885 B
Bash
Executable File

#!/usr/bin/env bash
# Build Salvium shared libraries for Windows (x86_64, cross-compile from Linux)
#
# Produces:
# prebuilt/windows-x86_64/salvium_crypto.dll
# prebuilt/windows-x86_64/salvium_ffi.dll
#
# Prerequisites:
# rustup target add x86_64-pc-windows-gnu
# apt install gcc-mingw-w64-x86-64 (or equivalent)
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROOT_DIR="$SCRIPT_DIR/.."
OUT_DIR="$ROOT_DIR/prebuilt/windows-x86_64"
echo "==> Building Salvium libraries for Windows x86_64..."
cargo build --release \
--target x86_64-pc-windows-gnu \
-p salvium-crypto \
-p salvium-ffi \
--manifest-path "$ROOT_DIR/Cargo.toml"
mkdir -p "$OUT_DIR"
cp "$ROOT_DIR/target/x86_64-pc-windows-gnu/release/salvium_crypto.dll" "$OUT_DIR/"
cp "$ROOT_DIR/target/x86_64-pc-windows-gnu/release/salvium_ffi.dll" "$OUT_DIR/"
echo "==> Done:"
ls -lh "$OUT_DIR/"*.dll