Skip to content

GH Actions: add i586-unknown-linux-musl build for iSH (iPad) #3

Description

@theuseless-ai

Context

plit-tui runs successfully on iPad via iSH (Alpine Linux, i586 emulation, no SSE).

Build Recipe

Target: i586-unknown-linux-musl (NOT i686 — iSH has no SSE)

Tool: cross (Docker-based cross-compilation required — host musl-gcc only has amd64 headers, breaks uint64_t on 32-bit)

TLS: native-tls-vendored (aws-lc-rs from rustls requires SSE; vendored OpenSSL compiles clean under cross's proper i586 toolchain)

cross build --release --target i586-unknown-linux-musl \
  --no-default-features --features native-tls-vendored
strip target/i586-unknown-linux-musl/release/plit-tui

Produces ~8.8MB statically-linked ELF 32-bit binary.

What to implement

  • Add GH Actions workflow job for i586-unknown-linux-musl
  • Use cross in CI (install via cargo install cross)
  • Build with --no-default-features --features native-tls-vendored
  • Strip binary, upload as release artifact
  • Name artifact plit-tui-i586-linux-musl (or similar, consistent with other release targets)

Cargo.toml changes already done

  • TLS backend is now feature-selectable: rustls-tls (default) vs native-tls-vendored
  • reqwest and tokio-tungstenite base deps have no TLS features hardcoded

Why not other approaches

  • a-Shell (WASM): Dead end — no threads, no sockets, no raw terminal in WASI
  • a-Shell (native iOS): a-Shell rejects Mach-O binaries; native commands require forking a-Shell itself
  • i686-unknown-linux-musl: SSE2 enabled by default in Rust, iSH doesn't support SSE
  • Host musl-gcc with -m32: Broken — amd64 musl headers define uint64_t as unsigned long (4 bytes under -m32)

Also fixed in this session

  • UTF-8 panic in message_list.rs:25wrap_text sliced by byte index into multi-byte chars (box-drawing ). Fixed to use char_indices().
  • Cargo.toml[features] section was inserted mid-dependencies, orphaning futures-util, serde, clap, etc. under [features] instead of [dependencies].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions