4 Commits

Author SHA1 Message Date
spinline
e329275956 ci: use cross-rs image with Rust for proper sysroot, cache builder image
All checks were successful
Build MIPS Binary / build (push) Successful in 7m39s
2026-02-06 19:10:57 +03:00
spinline
1f7af5fe30 ci: remove RUSTFLAGS, musl target is static by default
All checks were successful
Build MIPS Binary / build (push) Successful in 13m49s
2026-02-06 18:51:49 +03:00
spinline
bf54d2699e ci: force static linking with crt-static and -static flags
Some checks failed
Build MIPS Binary / build (push) Failing after 10m7s
2026-02-06 18:39:40 +03:00
spinline
46d61b5562 fix: suppress unused_assignments warning for got_first_message
Some checks failed
Build MIPS Binary / build (push) Has been cancelled
2026-02-06 18:33:18 +03:00
2 changed files with 17 additions and 15 deletions

View File

@@ -33,27 +33,29 @@ jobs:
npm install npm install
trunk build --release trunk build --release
- name: Install Cross - name: Build MIPS Builder Image
run: | run: |
if ! command -v cross &> /dev/null; then if ! docker image inspect vibetorrent-mips-builder >/dev/null 2>&1; then
cargo install cross --locked docker build --platform linux/amd64 -t vibetorrent-mips-builder -f - . <<'DOCKERFILE'
FROM ghcr.io/cross-rs/mips-unknown-linux-musl:main
RUN apt-get update -qq && \
apt-get install -y -qq curl ca-certificates && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly --component rust-src && \
rm -rf /var/lib/apt/lists/*
ENV PATH="/root/.cargo/bin:${PATH}"
DOCKERFILE
fi fi
- name: Build Backend (MIPS) - name: Build Backend (MIPS)
run: | run: |
docker run --rm --platform linux/amd64 \ docker run --rm \
-v "$PWD":/project \ -v "$PWD":/project \
-v cargo-cache:/usr/local/cargo/registry \ -v cargo-mips-registry:/root/.cargo/registry \
-w /project \ -w /project/backend \
rust:latest \ vibetorrent-mips-builder \
bash -c ' bash -c '
rustup toolchain install nightly --component rust-src && cargo build --target mips-unknown-linux-musl --release -Z build-std=std,panic_abort &&
apt-get update -qq && apt-get install -y -qq musl-tools wget >/dev/null 2>&1 && file /project/target/mips-unknown-linux-musl/release/backend
wget -qO- https://musl.cc/mips-linux-musl-cross.tgz | tar xz -C /opt/ &&
export PATH="/opt/mips-linux-musl-cross/bin:$PATH" &&
export CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-linux-musl-gcc &&
cd backend &&
cargo +nightly build --target mips-unknown-linux-musl --release -Z build-std=std,panic_abort
' '
- name: Rename Binary - name: Rename Binary

View File

@@ -145,7 +145,7 @@ pub fn provide_torrent_store() {
let max_backoff_ms: u32 = 30000; // Max 30 seconds let max_backoff_ms: u32 = 30000; // Max 30 seconds
let mut was_connected = false; let mut was_connected = false;
let mut disconnect_notified = false; // Track if we already showed disconnect toast let mut disconnect_notified = false; // Track if we already showed disconnect toast
let mut got_first_message = false; // Only count as "connected" after receiving data let mut got_first_message; // Only count as "connected" after receiving data
loop { loop {
let es_result = EventSource::new("/api/events"); let es_result = EventSource::new("/api/events");