• ANNOUNCE: undroidwish for Apple Silicon (arm64): notarized DMG, borg + BLE on macOS

    From decentespresso@gmail.com@user21123@newsgrouper.org.invalid to comp.lang.tcl on Sat Jul 11 17:33:00 2026
    From Newsgroup: comp.lang.tcl


    I've built a native Apple Silicon (arm64) version of AndroWish's
    undroidwish -- the batteries-included, single-file SDL2 wish -- and
    packaged it as a signed, Apple-notarized .dmg that's ready to run. No
    Rosetta, no Gatekeeper warnings.

    Download https://github.com/johnbuckman/undroidwish-arm64-batteries-included/releases/latest

    It's a self-contained wish with ~60 statically-linked Tcl/Tk extensions
    (Img, tls, tdom, BLT, tkpath, itk, tktreectrl, snack, mpexpr, ...)
    running natively on arm64. tclsh8.6/wish report arm64, and the Tcl
    regression suite passes (46090 tests, 1 environment-only failure). It's
    an early (alpha) release, but complete -- I use it to run de1app.

    Why bother? Apple is retiring Rosetta 2. At WWDC 2025 they said it would
    stay only "through macOS 27"; macOS 26.4 already warns when you launch
    an Intel-only app, and macOS 28 (expected fall 2027) drops it. Stock undroidwish is x86-64 and runs on Apple Silicon only through Rosetta --
    so once Rosetta is gone, so is the stock build. A native arm64 binary is
    how AndroWish/Tk apps (e.g. de1app) keep running on the Mac. It's faster,
    too: roughly 1.5x on compute and 1.25x on cold startup versus the x86
    build under Rosetta (median of 5 on an M4 MacBook Air; per-metric numbers
    are on the wiki page).

    Three things also came across from the iWish (iOS) side:

    * borg on the desktop. Stock undroidwish is "AndroWish sans the borg".
    This build adds a self-contained macOS implementation of the borg
    command (package require Borg) with the same subcommand surface as
    the Android original: toast, TTS via say, beep, screen brightness,
    osbuildinfo / displaymetrics / locale / networkinfo, USB
    enumeration, a typed prefs store, and so on. Where there's no macOS
    analogue (NFC, telephony, Android content providers/intents) it's a
    safe no-op, so AndroWish code that calls borg runs unmodified.

    * ble on the desktop. A native CoreBluetooth driver exposing the same
    ble command set as AndroWish on Android (scan / connect / discover /
    read / write / subscribe), marshalled onto the Tcl event loop. It
    drives a Decent DE1 espresso machine and a BLE scale in real time.

    * A File > Demos submenu in the Tk console (on a bare launch) with a
    borg demo, a Bluetooth-LE debugger, and the bundled AndroWish demos.

    The repo is a "recipe" -- a small set of patches plus documentation,
    not a fork -- so you can build it yourself against an AndroWish
    checkout as well. The core fix is that AndroWish's SDL2 configure
    mistakes an arm64 Mac for iOS (its arm*-apple-darwin* label swallows
    arm64 Macs) and builds the UIKit/GLES path instead of Cocoa; the rest
    are modern-clang strictness, old autoconf probes, x86-only SIMD, and a
    couple of bundled-library codec gaps. All patched and documented.

    Recipe, patches, docs:
    https://github.com/johnbuckman/undroidwish-arm64-batteries-included

    Wiki page:
    https://wiki.tcl-lang.org/page/undroidwish-arm64-batteries-included

    Everything I wrote is under the Tcl/Tk license; AndroWish and the
    bundled third-party libraries keep their own licenses.

    Feedback and bug reports welcome.

    -- John Buckman
    --- Synchronet 3.22a-Linux NewsLink 1.2