mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-09-29 21:02:09 +02:00
Replace the Go backend with the Rust workspace and route Android/iOS through UniFFI bindings. Include the migrated extension runtime, network, providers, media metadata, downloads and library operations, with version 5.0.0+147. Remove Go sources, adapters, native build selection and CI dependencies. Build Rust unconditionally and lock the iOS Rust pod using a relative path. Retain legacy source and migration evidence in a local ignored archive. Validation: Android Kotlin compile and 53 native tests; Swift Rust-branch equivalence and syntax; CocoaPods install; workflow, shell, Ruby, plist and diff checks. Reuse the preceding 100 Rust tests, fmt/Clippy and five-ABI build checkpoint; no new APK or iOS application build for this cleanup. Known follow-up: URL/URLSearchParams globals are missing from the Rust JS runtime. A controlled extension replay confirms a URL-resolution regression; this commit does not fix that runtime gap.
43 lines
905 B
Bash
43 lines
905 B
Bash
#!/usr/bin/env bash
|
|
# Check the production Rust workspace without local migration archives.
|
|
|
|
set -euo pipefail
|
|
|
|
usage() {
|
|
cat <<'EOF'
|
|
Usage: check_rust_backend.sh
|
|
|
|
Run Rust formatting, Clippy, and unit tests.
|
|
--help Show this help text.
|
|
EOF
|
|
}
|
|
|
|
if (( $# > 1 )); then
|
|
echo "Error: unexpected arguments: $*" >&2
|
|
usage >&2
|
|
exit 2
|
|
fi
|
|
if (( $# == 1 )); then
|
|
case "$1" in
|
|
--help|-h)
|
|
usage
|
|
exit 0
|
|
;;
|
|
*)
|
|
echo "Error: unknown argument: $1" >&2
|
|
usage >&2
|
|
exit 2
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
|
|
|
|
cd "$PROJECT_DIR/rust_backend"
|
|
# Exercise the same runtime-detected AES backend as the release build.
|
|
export RUSTFLAGS="${RUSTFLAGS:-} --cfg aes_armv8"
|
|
cargo fmt --all -- --check
|
|
cargo clippy --workspace --all-targets --locked -- -D warnings
|
|
cargo test --workspace --locked
|