[{"data":1,"prerenderedAt":1656},["ShallowReactive",2],{"home":3,"content-query-SsPpX3zQRn":931},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":11,"body":20,"_type":925,"_id":926,"_source":927,"_file":928,"_stem":929,"_extension":930},"\u002Fposts\u002Fgetting-a-rust-cli-to-run-on-ish-ios","posts",false,"","Getting a Rust CLI to actually run on iSH (chasing down 'Illegal instruction')","A Rust binary that cross-compiled cleanly for iSH still crashed the instant it touched the network. Turned out to be three separate problems stacked on top of each other.","2026-09-18T11:56:27+05:30",[12,13,14,15,16,17,18,19],"Rust","iSH","iOS","TLS","Cross-compiling","musl","Cryptography","Debugging",{"type":21,"children":22,"toc":916},"root",[23,48,53,60,89,94,103,108,114,126,134,139,145,150,170,178,191,211,219,224,230,282,290,302,338,351,359,364,372,377,397,408,419,424,432,438,465,478,486,491,499,512,716,743,770,783,792,819,824,832,837,843,855,897],{"type":24,"tag":25,"props":26,"children":27},"element","p",{},[28,31,38,40,46],{"type":29,"value":30},"text","I've got a little Tauri app that reads YouTube videos as text instead of watching them, and alongside the desktop app there's a plain terminal client that shares the same SQLite database — mostly so I can run it somewhere the desktop app can't go, like iSH on my phone. Cross-compiling it for iSH sounded like a five-minute job: pick the right target triple, ",{"type":24,"tag":32,"props":33,"children":35},"code",{"className":34},[],[36],{"type":29,"value":37},"cargo build --release",{"type":29,"value":39},", copy the binary over. It was not a five-minute job. It took three separate, unrelated bugs stacked on top of each other, and the error message the whole time was just ",{"type":24,"tag":32,"props":41,"children":43},{"className":42},[],[44],{"type":29,"value":45},"Illegal instruction",{"type":29,"value":47},", no stack trace, no panic message, nothing.",{"type":24,"tag":25,"props":49,"children":50},{},[51],{"type":29,"value":52},"Writing this down because every one of the three problems had a completely different fix, and I want to remember the order I found them in next time this happens.",{"type":24,"tag":54,"props":55,"children":57},"h2",{"id":56},"first-it-built-fine-then-died-on-the-first-network-call",[58],{"type":29,"value":59},"First: it built fine, then died on the first network call",{"type":24,"tag":25,"props":61,"children":62},{},[63,65,71,73,79,81,87],{"type":29,"value":64},"iSH runs a real Alpine Linux userland on an emulated x86 CPU, so getting a binary onto it is normally just a matter of cross-compiling for ",{"type":24,"tag":32,"props":66,"children":68},{"className":67},[],[69],{"type":29,"value":70},"i686-unknown-linux-musl",{"type":29,"value":72}," and copying the file over — ",{"type":24,"tag":32,"props":74,"children":76},{"className":75},[],[77],{"type":29,"value":78},"python3 -m http.server",{"type":29,"value":80}," on the Mac, ",{"type":24,"tag":32,"props":82,"children":84},{"className":83},[],[85],{"type":29,"value":86},"wget",{"type":29,"value":88}," from iSH. That part worked exactly like it's supposed to. The binary ran, the menus showed up, reading list stuff worked fine since it's all local SQLite.",{"type":24,"tag":25,"props":90,"children":91},{},[92],{"type":29,"value":93},"Then I searched for a channel, which needs an actual HTTPS request to YouTube, and the whole thing just died:",{"type":24,"tag":95,"props":96,"children":98},"pre",{"code":97},"Search channels: being honest\nIllegal instruction\n",[99],{"type":24,"tag":32,"props":100,"children":101},{"__ignoreMap":7},[102],{"type":29,"value":97},{"type":24,"tag":25,"props":104,"children":105},{},[106],{"type":29,"value":107},"No Rust panic, no backtrace. Just gone. On the Mac, the exact same code searching the exact same thing worked instantly.",{"type":24,"tag":54,"props":109,"children":111},{"id":110},"ruling-out-the-network-itself",[112],{"type":29,"value":113},"Ruling out the network itself",{"type":24,"tag":25,"props":115,"children":116},{},[117,119,124],{"type":29,"value":118},"Before touching any Rust code I wanted to know if this was even a Rust problem. iSH ships busybox, and busybox has ",{"type":24,"tag":32,"props":120,"children":122},{"className":121},[],[123],{"type":29,"value":86},{"type":29,"value":125},", so:",{"type":24,"tag":95,"props":127,"children":129},{"code":128},"wget -O- https:\u002F\u002Fwww.youtube.com 2>&1 | head -c 300\n",[130],{"type":24,"tag":32,"props":131,"children":132},{"__ignoreMap":7},[133],{"type":29,"value":128},{"type":24,"tag":25,"props":135,"children":136},{},[137],{"type":29,"value":138},"That worked fine — full page back, no errors. So the network path was healthy and iSH's own TLS stack could talk to the same host with no trouble. Whatever was crashing was specific to my binary.",{"type":24,"tag":54,"props":140,"children":142},{"id":141},"cause-1-ish-has-no-sse2-and-rusts-i686-target-assumes-it-does",[143],{"type":29,"value":144},"Cause #1: iSH has no SSE2, and Rust's i686 target assumes it does",{"type":24,"tag":25,"props":146,"children":147},{},[148],{"type":29,"value":149},"iSH emulates a 32-bit x86 CPU, and — this is apparently a well-known limitation, it's the same reason Node.js doesn't run there — it doesn't implement SSE2 at all. Just doesn't have it.",{"type":24,"tag":25,"props":151,"children":152},{},[153,155,160,162,168],{"type":29,"value":154},"The problem is that Rust's regular ",{"type":24,"tag":32,"props":156,"children":158},{"className":157},[],[159],{"type":29,"value":70},{"type":29,"value":161}," target ",{"type":24,"tag":163,"props":164,"children":165},"em",{},[166],{"type":29,"value":167},"assumes",{"type":29,"value":169}," SSE2 is available, because that's what the target's calling convention is built on:",{"type":24,"tag":95,"props":171,"children":173},{"code":172},"$ rustc --target i686-unknown-linux-musl --print cfg | grep feature\ntarget_feature=\"crt-static\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\n",[174],{"type":24,"tag":32,"props":175,"children":176},{"__ignoreMap":7},[177],{"type":29,"value":172},{"type":24,"tag":25,"props":179,"children":180},{},[181,183,189],{"type":29,"value":182},"So every ",{"type":24,"tag":32,"props":184,"children":186},{"className":185},[],[187],{"type":29,"value":188},"i686",{"type":29,"value":190}," binary you build with the normal target has SSE2 instructions baked into it just from the standard library alone, and iSH has no way to run those. That right there explains the crash, or so I thought.",{"type":24,"tag":25,"props":192,"children":193},{},[194,196,201,203,209],{"type":29,"value":195},"The fix for ",{"type":24,"tag":163,"props":197,"children":198},{},[199],{"type":29,"value":200},"this",{"type":29,"value":202}," part is targeting ",{"type":24,"tag":32,"props":204,"children":206},{"className":205},[],[207],{"type":29,"value":208},"i586-unknown-linux-musl",{"type":29,"value":210}," instead, which has no SSE baseline at all — it falls back to old-style x87 floating point:",{"type":24,"tag":95,"props":212,"children":214},{"code":213},"$ rustc --target i586-unknown-linux-musl --print cfg | grep feature\ntarget_feature=\"crt-static\"\n",[215],{"type":24,"tag":32,"props":216,"children":217},{"__ignoreMap":7},[218],{"type":29,"value":213},{"type":24,"tag":25,"props":220,"children":221},{},[222],{"type":29,"value":223},"Nothing else listed. That's the target I actually wanted.",{"type":24,"tag":54,"props":225,"children":227},{"id":226},"cause-2-the-tls-crypto-backend-crashes-even-harder",[228],{"type":29,"value":229},"Cause #2: the TLS crypto backend crashes even harder",{"type":24,"tag":25,"props":231,"children":232},{},[233,235,241,243,249,251,256,258,264,266,272,274,280],{"type":29,"value":234},"Getting the linker set up for a target nobody normally uses took its own detour. Homebrew's ",{"type":24,"tag":32,"props":236,"children":238},{"className":237},[],[239],{"type":29,"value":240},"musl-cross",{"type":29,"value":242}," formula can build an ",{"type":24,"tag":32,"props":244,"children":246},{"className":245},[],[247],{"type":29,"value":248},"i486",{"type":29,"value":250},"\u002F",{"type":24,"tag":32,"props":252,"children":254},{"className":253},[],[255],{"type":29,"value":188},{"type":29,"value":257}," cross-compiler, but it compiles from source, and it turns out my Mac is on a macOS version new enough that Homebrew won't even attempt a from-source build on it. So instead of fighting that, I used the ",{"type":24,"tag":32,"props":259,"children":261},{"className":260},[],[262],{"type":29,"value":263},"messense\u002Frust-musl-cross",{"type":29,"value":265}," Docker image, which ships a working ",{"type":24,"tag":32,"props":267,"children":269},{"className":268},[],[270],{"type":29,"value":271},"i686-unknown-linux-musl-gcc",{"type":29,"value":273}," I could point the ",{"type":24,"tag":32,"props":275,"children":277},{"className":276},[],[278],{"type":29,"value":279},"i586",{"type":29,"value":281}," target at:",{"type":24,"tag":95,"props":283,"children":285},{"code":284},"docker run --rm -v \"$PWD\":\u002Fhome\u002Frust\u002Fsrc messense\u002Frust-musl-cross:i686-musl \\\n  bash -c \"rustup target add i586-unknown-linux-musl && \\\n    cargo build --release --target i586-unknown-linux-musl -p textube-cli\"\n",[286],{"type":24,"tag":32,"props":287,"children":288},{"__ignoreMap":7},[289],{"type":29,"value":284},{"type":24,"tag":25,"props":291,"children":292},{},[293,295,300],{"type":29,"value":294},"Rebuilt, copied it over, ran the same search. Same crash. Exact same ",{"type":24,"tag":32,"props":296,"children":298},{"className":297},[],[299],{"type":29,"value":45},{"type":29,"value":301},", no better.",{"type":24,"tag":25,"props":303,"children":304},{},[305,307,313,315,321,323,329,331,336],{"type":29,"value":306},"So the SSE2 baseline wasn't the only problem. The actual TLS library I was using — ",{"type":24,"tag":32,"props":308,"children":310},{"className":309},[],[311],{"type":29,"value":312},"reqwest",{"type":29,"value":314}," with the default ",{"type":24,"tag":32,"props":316,"children":318},{"className":317},[],[319],{"type":29,"value":320},"rustls",{"type":29,"value":322}," crypto backend, which is ",{"type":24,"tag":32,"props":324,"children":326},{"className":325},[],[327],{"type":29,"value":328},"aws-lc-rs",{"type":29,"value":330}," — ships its own hand-written assembly for things like AES and does its own CPU feature checks at ",{"type":24,"tag":163,"props":332,"children":333},{},[334],{"type":29,"value":335},"runtime",{"type":29,"value":337},", completely independent of whatever target the Rust compiler thinks it's building for. iSH's CPU emulation doesn't handle whatever that runtime check was doing, and it just faulted.",{"type":24,"tag":25,"props":339,"children":340},{},[341,343,349],{"type":29,"value":342},"Swapped the crypto backend to ",{"type":24,"tag":32,"props":344,"children":346},{"className":345},[],[347],{"type":29,"value":348},"ring",{"type":29,"value":350}," instead, same idea (fast asm-based crypto), same problem class. This one didn't crash outright, but it failed differently — every single TLS connection died with:",{"type":24,"tag":95,"props":352,"children":354},{"code":353},"Search failed: Network error contacting YouTube: error sending request for url (...) -> client error (Connect) -> cannot decrypt peer's message\n",[355],{"type":24,"tag":32,"props":356,"children":357},{"__ignoreMap":7},[358],{"type":29,"value":353},{"type":24,"tag":25,"props":360,"children":361},{},[362],{"type":29,"value":363},"I turned on rustls's own logging to see exactly where it was dying:",{"type":24,"tag":95,"props":365,"children":367},{"code":366},"RUST_LOG=rustls=debug .\u002Ftextube-cli\n",[368],{"type":24,"tag":32,"props":369,"children":370},{"__ignoreMap":7},[371],{"type":29,"value":366},{"type":24,"tag":25,"props":373,"children":374},{},[375],{"type":29,"value":376},"and the log showed the handshake completing all the way through — ClientHello sent, ServerHello parsed, cipher suite picked — and then just stopping, right where it should decrypt the server's first encrypted message. Every time. Deterministically, not flaky.",{"type":24,"tag":25,"props":378,"children":379},{},[380,382,395],{"type":29,"value":381},"The actual fix was switching away from asm-optimized crypto entirely and using ",{"type":24,"tag":383,"props":384,"children":388},"a",{"href":385,"rel":386},"https:\u002F\u002Fgithub.com\u002FRustCrypto\u002Frustls-rustcrypto",[387],"nofollow",[389],{"type":24,"tag":32,"props":390,"children":392},{"className":391},[],[393],{"type":29,"value":394},"rustls-rustcrypto",{"type":29,"value":396},", a crypto provider written in plain Rust with no hand-tuned assembly:",{"type":24,"tag":95,"props":398,"children":403},{"code":399,"language":400,"meta":7,"className":401},"rustls = { version = \"0.23\", default-features = false, features = [\"std\", \"tls12\", \"logging\"] }\nrustls-rustcrypto = \"0.0.2-alpha\"\n","toml",[402],"language-toml",[404],{"type":24,"tag":32,"props":405,"children":406},{"__ignoreMap":7},[407],{"type":29,"value":399},{"type":24,"tag":95,"props":409,"children":414},{"code":410,"language":411,"meta":7,"className":412},"rustls_rustcrypto::provider()\n    .install_default()\n    .expect(\"failed to install rustls crypto provider\");\n","rust",[413],"language-rust",[415],{"type":24,"tag":32,"props":416,"children":417},{"__ignoreMap":7},[418],{"type":29,"value":410},{"type":24,"tag":25,"props":420,"children":421},{},[422],{"type":29,"value":423},"Rebuilt, ran it again, and the handshake actually completed this time — \"TLS1.3 encrypted extensions\" showed up in the log, which is the exact line that never printed before. Real progress. And then it crashed again, a little further down the road, right after:",{"type":24,"tag":95,"props":425,"children":427},{"code":426},"DEBUG rustls_platform_verifier::verification::others] Loaded 141 CA root certificates from the system\nIllegal instruction\n",[428],{"type":24,"tag":32,"props":429,"children":430},{"__ignoreMap":7},[431],{"type":29,"value":426},{"type":24,"tag":54,"props":433,"children":435},{"id":434},"cause-3-its-not-just-the-tls-crypto-its-everything-doing-runtime-cpu-dispatch",[436],{"type":29,"value":437},"Cause #3: it's not just the TLS crypto, it's everything doing runtime CPU dispatch",{"type":24,"tag":25,"props":439,"children":440},{},[441,443,448,450,455,457,463],{"type":29,"value":442},"At this point the pattern was obvious: it's not any single library, it's that a bunch of Rust crypto crates each independently check the CPU at runtime and jump into hand-written SIMD code paths if they think the hardware supports it — completely ignoring what target features the compiler was actually told to use. Compiling for ",{"type":24,"tag":32,"props":444,"children":446},{"className":445},[],[447],{"type":29,"value":279},{"type":29,"value":449}," stops the ",{"type":24,"tag":163,"props":451,"children":452},{},[453],{"type":29,"value":454},"compiler",{"type":29,"value":456}," from emitting SSE2, but it does nothing to stop a crate from checking ",{"type":24,"tag":32,"props":458,"children":460},{"className":459},[],[461],{"type":29,"value":462},"is_x86_feature_detected!(\"sse2\")",{"type":29,"value":464}," at runtime and using it anyway if the check comes back true (which, on iSH's imperfect CPU emulation, it apparently does).",{"type":24,"tag":25,"props":466,"children":467},{},[468,470,476],{"type":29,"value":469},"I confirmed this with ",{"type":24,"tag":32,"props":471,"children":473},{"className":472},[],[474],{"type":29,"value":475},"objdump",{"type":29,"value":477},", checking the actual compiled binary for SSE\u002FAVX register usage:",{"type":24,"tag":95,"props":479,"children":481},{"code":480},"objdump -d target\u002Fi586-unknown-linux-musl\u002Frelease\u002Ftextube-cli | grep -icE '%xmm|%ymm'\n",[482],{"type":24,"tag":32,"props":483,"children":484},{"__ignoreMap":7},[485],{"type":29,"value":480},{"type":24,"tag":25,"props":487,"children":488},{},[489],{"type":29,"value":490},"First run: 1609 hits. Way more than zero, despite the \"no SSE\" target. So I went hunting, crate by crate, using the binary's own symbol table to find out who was responsible each time:",{"type":24,"tag":95,"props":492,"children":494},{"code":493},"objdump -d textube-cli | awk '\u002F^[0-9a-f]+ \u003C\u002F{sym=$0} \u002Fxmm|ymm\u002F{print sym}' | sort -u | c++filt\n",[495],{"type":24,"tag":32,"props":496,"children":497},{"__ignoreMap":7},[498],{"type":29,"value":493},{"type":24,"tag":25,"props":500,"children":501},{},[502,504,510],{"type":29,"value":503},"Each hit pointed at a different RustCrypto crate, and each one turned out to have its own escape hatch — a ",{"type":24,"tag":32,"props":505,"children":507},{"className":506},[],[508],{"type":29,"value":509},"--cfg",{"type":29,"value":511}," flag, or a Cargo feature — to force the plain, portable implementation instead of the hardware-dispatched one. None of them use the same name for it, which made this slower than it should've been:",{"type":24,"tag":513,"props":514,"children":515},"table",{},[516,535],{"type":24,"tag":517,"props":518,"children":519},"thead",{},[520],{"type":24,"tag":521,"props":522,"children":523},"tr",{},[524,530],{"type":24,"tag":525,"props":526,"children":527},"th",{},[528],{"type":29,"value":529},"Crate",{"type":24,"tag":525,"props":531,"children":532},{},[533],{"type":29,"value":534},"How to force software-only",{"type":24,"tag":536,"props":537,"children":538},"tbody",{},[539,561,582,603,626,648,671,693],{"type":24,"tag":521,"props":540,"children":541},{},[542,552],{"type":24,"tag":543,"props":544,"children":545},"td",{},[546],{"type":24,"tag":32,"props":547,"children":549},{"className":548},[],[550],{"type":29,"value":551},"aes",{"type":24,"tag":543,"props":553,"children":554},{},[555],{"type":24,"tag":32,"props":556,"children":558},{"className":557},[],[559],{"type":29,"value":560},"--cfg aes_force_soft",{"type":24,"tag":521,"props":562,"children":563},{},[564,573],{"type":24,"tag":543,"props":565,"children":566},{},[567],{"type":24,"tag":32,"props":568,"children":570},{"className":569},[],[571],{"type":29,"value":572},"polyval",{"type":24,"tag":543,"props":574,"children":575},{},[576],{"type":24,"tag":32,"props":577,"children":579},{"className":578},[],[580],{"type":29,"value":581},"--cfg polyval_force_soft",{"type":24,"tag":521,"props":583,"children":584},{},[585,594],{"type":24,"tag":543,"props":586,"children":587},{},[588],{"type":24,"tag":32,"props":589,"children":591},{"className":590},[],[592],{"type":29,"value":593},"poly1305",{"type":24,"tag":543,"props":595,"children":596},{},[597],{"type":24,"tag":32,"props":598,"children":600},{"className":599},[],[601],{"type":29,"value":602},"--cfg poly1305_force_soft",{"type":24,"tag":521,"props":604,"children":605},{},[606,617],{"type":24,"tag":543,"props":607,"children":608},{},[609,615],{"type":24,"tag":32,"props":610,"children":612},{"className":611},[],[613],{"type":29,"value":614},"chacha20",{"type":29,"value":616}," v0.9",{"type":24,"tag":543,"props":618,"children":619},{},[620],{"type":24,"tag":32,"props":621,"children":623},{"className":622},[],[624],{"type":29,"value":625},"--cfg chacha20_force_soft",{"type":24,"tag":521,"props":627,"children":628},{},[629,639],{"type":24,"tag":543,"props":630,"children":631},{},[632,637],{"type":24,"tag":32,"props":633,"children":635},{"className":634},[],[636],{"type":29,"value":614},{"type":29,"value":638}," v0.10",{"type":24,"tag":543,"props":640,"children":641},{},[642],{"type":24,"tag":32,"props":643,"children":645},{"className":644},[],[646],{"type":29,"value":647},"--cfg chacha20_backend=\"soft\"",{"type":24,"tag":521,"props":649,"children":650},{},[651,660],{"type":24,"tag":543,"props":652,"children":653},{},[654],{"type":24,"tag":32,"props":655,"children":657},{"className":656},[],[658],{"type":29,"value":659},"sha2",{"type":24,"tag":543,"props":661,"children":662},{},[663,665],{"type":29,"value":664},"Cargo feature ",{"type":24,"tag":32,"props":666,"children":668},{"className":667},[],[669],{"type":29,"value":670},"force-soft",{"type":24,"tag":521,"props":672,"children":673},{},[674,683],{"type":24,"tag":543,"props":675,"children":676},{},[677],{"type":24,"tag":32,"props":678,"children":680},{"className":679},[],[681],{"type":29,"value":682},"ppv-lite86",{"type":24,"tag":543,"props":684,"children":685},{},[686,687],{"type":29,"value":664},{"type":24,"tag":32,"props":688,"children":690},{"className":689},[],[691],{"type":29,"value":692},"no_simd",{"type":24,"tag":521,"props":694,"children":695},{},[696,705],{"type":24,"tag":543,"props":697,"children":698},{},[699],{"type":24,"tag":32,"props":700,"children":702},{"className":701},[],[703],{"type":29,"value":704},"httparse",{"type":24,"tag":543,"props":706,"children":707},{},[708,710],{"type":29,"value":709},"env var ",{"type":24,"tag":32,"props":711,"children":713},{"className":712},[],[714],{"type":29,"value":715},"CARGO_CFG_HTTPARSE_DISABLE_SIMD=1",{"type":24,"tag":25,"props":717,"children":718},{},[719,721,726,728,733,735,741],{"type":29,"value":720},"A couple of those are worth a special mention. ",{"type":24,"tag":32,"props":722,"children":724},{"className":723},[],[725],{"type":29,"value":614},{"type":29,"value":727}," shows up ",{"type":24,"tag":163,"props":729,"children":730},{},[731],{"type":29,"value":732},"twice",{"type":29,"value":734}," in the dependency tree at two different major versions — one pulled in by ",{"type":24,"tag":32,"props":736,"children":738},{"className":737},[],[739],{"type":29,"value":740},"chacha20poly1305",{"type":29,"value":742},", a newer one pulled in directly — and they use two completely different cfg names for the exact same \"please don't use SIMD\" request, so you need both at once or you'll fix half the crashes and not understand why the other half are still there.",{"type":24,"tag":25,"props":744,"children":745},{},[746,748,753,755,760,762,768],{"type":29,"value":747},"And ",{"type":24,"tag":32,"props":749,"children":751},{"className":750},[],[752],{"type":29,"value":704},{"type":29,"value":754},"'s flag isn't really a Cargo convention at all — its build script just checks for a literal environment variable that happens to be ",{"type":24,"tag":163,"props":756,"children":757},{},[758],{"type":29,"value":759},"named",{"type":29,"value":761}," like a Cargo-internal one (",{"type":24,"tag":32,"props":763,"children":765},{"className":764},[],[766],{"type":29,"value":767},"CARGO_CFG_...",{"type":29,"value":769},"), which had me convinced for a while that I'd already set it correctly when I hadn't.",{"type":24,"tag":25,"props":771,"children":772},{},[773,775,781],{"type":29,"value":774},"All of that went into ",{"type":24,"tag":32,"props":776,"children":778},{"className":777},[],[779],{"type":29,"value":780},".cargo\u002Fconfig.toml",{"type":29,"value":782},", scoped to just the one target so nothing else is affected:",{"type":24,"tag":95,"props":784,"children":787},{"code":785,"language":400,"meta":7,"className":786},"[env]\nCARGO_CFG_HTTPARSE_DISABLE_SIMD = \"1\"\n\n[target.i586-unknown-linux-musl]\nlinker = \"i686-unknown-linux-musl-gcc\"\nrustflags = [\n  \"--cfg\", \"aes_force_soft\",\n  \"--cfg\", \"polyval_force_soft\",\n  \"--cfg\", \"poly1305_force_soft\",\n  \"--cfg\", \"chacha20_force_soft\",\n  \"--cfg\", \"chacha20_backend=\\\"soft\\\"\",\n]\n",[402],[788],{"type":24,"tag":32,"props":789,"children":790},{"__ignoreMap":7},[791],{"type":29,"value":785},{"type":24,"tag":25,"props":793,"children":794},{},[795,797,802,804,809,811,817],{"type":29,"value":796},"plus the matching Cargo features for ",{"type":24,"tag":32,"props":798,"children":800},{"className":799},[],[801],{"type":29,"value":659},{"type":29,"value":803}," and ",{"type":24,"tag":32,"props":805,"children":807},{"className":806},[],[808],{"type":29,"value":682},{"type":29,"value":810}," added straight to ",{"type":24,"tag":32,"props":812,"children":814},{"className":813},[],[815],{"type":29,"value":816},"Cargo.toml",{"type":29,"value":818}," as direct dependencies (Cargo unifies features across the whole build, so pulling them in directly just to flip a feature on works fine even though the actual code path is used transitively).",{"type":24,"tag":25,"props":820,"children":821},{},[822],{"type":29,"value":823},"Rebuilt, checked the instruction count again — 984, then 561 after the next fix, then 76, then finally:",{"type":24,"tag":95,"props":825,"children":827},{"code":826},"$ objdump -d target\u002Fi586-unknown-linux-musl\u002Frelease\u002Ftextube-cli | grep -icE '%xmm|%ymm'\n0\n",[828],{"type":24,"tag":32,"props":829,"children":830},{"__ignoreMap":7},[831],{"type":29,"value":826},{"type":24,"tag":25,"props":833,"children":834},{},[835],{"type":29,"value":836},"Zero. Copied that binary over to iSH and the search actually worked — real results back from YouTube, no crash.",{"type":24,"tag":54,"props":838,"children":840},{"id":839},"what-id-check-first-next-time",[841],{"type":29,"value":842},"What I'd check first next time",{"type":24,"tag":25,"props":844,"children":845},{},[846,848,853],{"type":29,"value":847},"If you're cross-compiling something with a TLS stack for an old or emulated 32-bit x86 target and it dies with ",{"type":24,"tag":32,"props":849,"children":851},{"className":850},[],[852],{"type":29,"value":45},{"type":29,"value":854}," the moment it touches the network:",{"type":24,"tag":856,"props":857,"children":858},"ol",{},[859,880,885],{"type":24,"tag":860,"props":861,"children":862},"li",{},[863,865,871,873,878],{"type":29,"value":864},"Check whether your target's baseline CPU features actually match the hardware\u002Femulator you're running on (",{"type":24,"tag":32,"props":866,"children":868},{"className":867},[],[869],{"type":29,"value":870},"rustc --target \u003Ctriple> --print cfg",{"type":29,"value":872},") — don't assume ",{"type":24,"tag":32,"props":874,"children":876},{"className":875},[],[877],{"type":29,"value":188},{"type":29,"value":879}," is safe just because it \"sounds old.\"",{"type":24,"tag":860,"props":881,"children":882},{},[883],{"type":29,"value":884},"Swap out any asm-optimized crypto backend for a pure-Rust one first, since that's usually the biggest and earliest offender.",{"type":24,"tag":860,"props":886,"children":887},{},[888,890,895],{"type":29,"value":889},"Then check the actual compiled binary for SIMD instructions with ",{"type":24,"tag":32,"props":891,"children":893},{"className":892},[],[894],{"type":29,"value":475},{"type":29,"value":896},", because plenty of crates do their own runtime CPU dispatch that a \"no SIMD\" compile target alone won't stop.",{"type":24,"tag":25,"props":898,"children":899},{},[900,902,907,909,914],{"type":29,"value":901},"The error message never changes through any of this — it's ",{"type":24,"tag":32,"props":903,"children":905},{"className":904},[],[906],{"type":29,"value":45},{"type":29,"value":908}," the whole way down, for three completely different reasons in a row. ",{"type":24,"tag":32,"props":910,"children":912},{"className":911},[],[913],{"type":29,"value":475},{"type":29,"value":915}," and rustls's own debug logging were the only things that actually told me where in the process it was dying each time, rather than just that it was dying.",{"title":7,"searchDepth":917,"depth":917,"links":918},2,[919,920,921,922,923,924],{"id":56,"depth":917,"text":59},{"id":110,"depth":917,"text":113},{"id":141,"depth":917,"text":144},{"id":226,"depth":917,"text":229},{"id":434,"depth":917,"text":437},{"id":839,"depth":917,"text":842},"markdown","content:posts:getting-a-rust-cli-to-run-on-ish-ios.md","content","posts\u002Fgetting-a-rust-cli-to-run-on-ish-ios.md","posts\u002Fgetting-a-rust-cli-to-run-on-ish-ios","md",{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":932,"body":933,"_type":925,"_id":926,"_source":927,"_file":928,"_stem":929,"_extension":930},[12,13,14,15,16,17,18,19],{"type":21,"children":934,"toc":1648},[935,951,955,959,981,985,992,996,1000,1010,1017,1021,1025,1029,1044,1051,1061,1076,1083,1087,1091,1131,1138,1148,1175,1185,1192,1196,1203,1207,1221,1229,1237,1241,1248,1252,1273,1283,1290,1294,1301,1311,1488,1509,1530,1540,1548,1570,1574,1581,1585,1589,1599,1632],{"type":24,"tag":25,"props":936,"children":937},{},[938,939,944,945,950],{"type":29,"value":30},{"type":24,"tag":32,"props":940,"children":942},{"className":941},[],[943],{"type":29,"value":37},{"type":29,"value":39},{"type":24,"tag":32,"props":946,"children":948},{"className":947},[],[949],{"type":29,"value":45},{"type":29,"value":47},{"type":24,"tag":25,"props":952,"children":953},{},[954],{"type":29,"value":52},{"type":24,"tag":54,"props":956,"children":957},{"id":56},[958],{"type":29,"value":59},{"type":24,"tag":25,"props":960,"children":961},{},[962,963,968,969,974,975,980],{"type":29,"value":64},{"type":24,"tag":32,"props":964,"children":966},{"className":965},[],[967],{"type":29,"value":70},{"type":29,"value":72},{"type":24,"tag":32,"props":970,"children":972},{"className":971},[],[973],{"type":29,"value":78},{"type":29,"value":80},{"type":24,"tag":32,"props":976,"children":978},{"className":977},[],[979],{"type":29,"value":86},{"type":29,"value":88},{"type":24,"tag":25,"props":982,"children":983},{},[984],{"type":29,"value":93},{"type":24,"tag":95,"props":986,"children":987},{"code":97},[988],{"type":24,"tag":32,"props":989,"children":990},{"__ignoreMap":7},[991],{"type":29,"value":97},{"type":24,"tag":25,"props":993,"children":994},{},[995],{"type":29,"value":107},{"type":24,"tag":54,"props":997,"children":998},{"id":110},[999],{"type":29,"value":113},{"type":24,"tag":25,"props":1001,"children":1002},{},[1003,1004,1009],{"type":29,"value":118},{"type":24,"tag":32,"props":1005,"children":1007},{"className":1006},[],[1008],{"type":29,"value":86},{"type":29,"value":125},{"type":24,"tag":95,"props":1011,"children":1012},{"code":128},[1013],{"type":24,"tag":32,"props":1014,"children":1015},{"__ignoreMap":7},[1016],{"type":29,"value":128},{"type":24,"tag":25,"props":1018,"children":1019},{},[1020],{"type":29,"value":138},{"type":24,"tag":54,"props":1022,"children":1023},{"id":141},[1024],{"type":29,"value":144},{"type":24,"tag":25,"props":1026,"children":1027},{},[1028],{"type":29,"value":149},{"type":24,"tag":25,"props":1030,"children":1031},{},[1032,1033,1038,1039,1043],{"type":29,"value":154},{"type":24,"tag":32,"props":1034,"children":1036},{"className":1035},[],[1037],{"type":29,"value":70},{"type":29,"value":161},{"type":24,"tag":163,"props":1040,"children":1041},{},[1042],{"type":29,"value":167},{"type":29,"value":169},{"type":24,"tag":95,"props":1045,"children":1046},{"code":172},[1047],{"type":24,"tag":32,"props":1048,"children":1049},{"__ignoreMap":7},[1050],{"type":29,"value":172},{"type":24,"tag":25,"props":1052,"children":1053},{},[1054,1055,1060],{"type":29,"value":182},{"type":24,"tag":32,"props":1056,"children":1058},{"className":1057},[],[1059],{"type":29,"value":188},{"type":29,"value":190},{"type":24,"tag":25,"props":1062,"children":1063},{},[1064,1065,1069,1070,1075],{"type":29,"value":195},{"type":24,"tag":163,"props":1066,"children":1067},{},[1068],{"type":29,"value":200},{"type":29,"value":202},{"type":24,"tag":32,"props":1071,"children":1073},{"className":1072},[],[1074],{"type":29,"value":208},{"type":29,"value":210},{"type":24,"tag":95,"props":1077,"children":1078},{"code":213},[1079],{"type":24,"tag":32,"props":1080,"children":1081},{"__ignoreMap":7},[1082],{"type":29,"value":213},{"type":24,"tag":25,"props":1084,"children":1085},{},[1086],{"type":29,"value":223},{"type":24,"tag":54,"props":1088,"children":1089},{"id":226},[1090],{"type":29,"value":229},{"type":24,"tag":25,"props":1092,"children":1093},{},[1094,1095,1100,1101,1106,1107,1112,1113,1118,1119,1124,1125,1130],{"type":29,"value":234},{"type":24,"tag":32,"props":1096,"children":1098},{"className":1097},[],[1099],{"type":29,"value":240},{"type":29,"value":242},{"type":24,"tag":32,"props":1102,"children":1104},{"className":1103},[],[1105],{"type":29,"value":248},{"type":29,"value":250},{"type":24,"tag":32,"props":1108,"children":1110},{"className":1109},[],[1111],{"type":29,"value":188},{"type":29,"value":257},{"type":24,"tag":32,"props":1114,"children":1116},{"className":1115},[],[1117],{"type":29,"value":263},{"type":29,"value":265},{"type":24,"tag":32,"props":1120,"children":1122},{"className":1121},[],[1123],{"type":29,"value":271},{"type":29,"value":273},{"type":24,"tag":32,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":29,"value":279},{"type":29,"value":281},{"type":24,"tag":95,"props":1132,"children":1133},{"code":284},[1134],{"type":24,"tag":32,"props":1135,"children":1136},{"__ignoreMap":7},[1137],{"type":29,"value":284},{"type":24,"tag":25,"props":1139,"children":1140},{},[1141,1142,1147],{"type":29,"value":294},{"type":24,"tag":32,"props":1143,"children":1145},{"className":1144},[],[1146],{"type":29,"value":45},{"type":29,"value":301},{"type":24,"tag":25,"props":1149,"children":1150},{},[1151,1152,1157,1158,1163,1164,1169,1170,1174],{"type":29,"value":306},{"type":24,"tag":32,"props":1153,"children":1155},{"className":1154},[],[1156],{"type":29,"value":312},{"type":29,"value":314},{"type":24,"tag":32,"props":1159,"children":1161},{"className":1160},[],[1162],{"type":29,"value":320},{"type":29,"value":322},{"type":24,"tag":32,"props":1165,"children":1167},{"className":1166},[],[1168],{"type":29,"value":328},{"type":29,"value":330},{"type":24,"tag":163,"props":1171,"children":1172},{},[1173],{"type":29,"value":335},{"type":29,"value":337},{"type":24,"tag":25,"props":1176,"children":1177},{},[1178,1179,1184],{"type":29,"value":342},{"type":24,"tag":32,"props":1180,"children":1182},{"className":1181},[],[1183],{"type":29,"value":348},{"type":29,"value":350},{"type":24,"tag":95,"props":1186,"children":1187},{"code":353},[1188],{"type":24,"tag":32,"props":1189,"children":1190},{"__ignoreMap":7},[1191],{"type":29,"value":353},{"type":24,"tag":25,"props":1193,"children":1194},{},[1195],{"type":29,"value":363},{"type":24,"tag":95,"props":1197,"children":1198},{"code":366},[1199],{"type":24,"tag":32,"props":1200,"children":1201},{"__ignoreMap":7},[1202],{"type":29,"value":366},{"type":24,"tag":25,"props":1204,"children":1205},{},[1206],{"type":29,"value":376},{"type":24,"tag":25,"props":1208,"children":1209},{},[1210,1211,1220],{"type":29,"value":381},{"type":24,"tag":383,"props":1212,"children":1214},{"href":385,"rel":1213},[387],[1215],{"type":24,"tag":32,"props":1216,"children":1218},{"className":1217},[],[1219],{"type":29,"value":394},{"type":29,"value":396},{"type":24,"tag":95,"props":1222,"children":1224},{"code":399,"language":400,"meta":7,"className":1223},[402],[1225],{"type":24,"tag":32,"props":1226,"children":1227},{"__ignoreMap":7},[1228],{"type":29,"value":399},{"type":24,"tag":95,"props":1230,"children":1232},{"code":410,"language":411,"meta":7,"className":1231},[413],[1233],{"type":24,"tag":32,"props":1234,"children":1235},{"__ignoreMap":7},[1236],{"type":29,"value":410},{"type":24,"tag":25,"props":1238,"children":1239},{},[1240],{"type":29,"value":423},{"type":24,"tag":95,"props":1242,"children":1243},{"code":426},[1244],{"type":24,"tag":32,"props":1245,"children":1246},{"__ignoreMap":7},[1247],{"type":29,"value":426},{"type":24,"tag":54,"props":1249,"children":1250},{"id":434},[1251],{"type":29,"value":437},{"type":24,"tag":25,"props":1253,"children":1254},{},[1255,1256,1261,1262,1266,1267,1272],{"type":29,"value":442},{"type":24,"tag":32,"props":1257,"children":1259},{"className":1258},[],[1260],{"type":29,"value":279},{"type":29,"value":449},{"type":24,"tag":163,"props":1263,"children":1264},{},[1265],{"type":29,"value":454},{"type":29,"value":456},{"type":24,"tag":32,"props":1268,"children":1270},{"className":1269},[],[1271],{"type":29,"value":462},{"type":29,"value":464},{"type":24,"tag":25,"props":1274,"children":1275},{},[1276,1277,1282],{"type":29,"value":469},{"type":24,"tag":32,"props":1278,"children":1280},{"className":1279},[],[1281],{"type":29,"value":475},{"type":29,"value":477},{"type":24,"tag":95,"props":1284,"children":1285},{"code":480},[1286],{"type":24,"tag":32,"props":1287,"children":1288},{"__ignoreMap":7},[1289],{"type":29,"value":480},{"type":24,"tag":25,"props":1291,"children":1292},{},[1293],{"type":29,"value":490},{"type":24,"tag":95,"props":1295,"children":1296},{"code":493},[1297],{"type":24,"tag":32,"props":1298,"children":1299},{"__ignoreMap":7},[1300],{"type":29,"value":493},{"type":24,"tag":25,"props":1302,"children":1303},{},[1304,1305,1310],{"type":29,"value":503},{"type":24,"tag":32,"props":1306,"children":1308},{"className":1307},[],[1309],{"type":29,"value":509},{"type":29,"value":511},{"type":24,"tag":513,"props":1312,"children":1313},{},[1314,1328],{"type":24,"tag":517,"props":1315,"children":1316},{},[1317],{"type":24,"tag":521,"props":1318,"children":1319},{},[1320,1324],{"type":24,"tag":525,"props":1321,"children":1322},{},[1323],{"type":29,"value":529},{"type":24,"tag":525,"props":1325,"children":1326},{},[1327],{"type":29,"value":534},{"type":24,"tag":536,"props":1329,"children":1330},{},[1331,1350,1369,1388,1408,1428,1448,1468],{"type":24,"tag":521,"props":1332,"children":1333},{},[1334,1342],{"type":24,"tag":543,"props":1335,"children":1336},{},[1337],{"type":24,"tag":32,"props":1338,"children":1340},{"className":1339},[],[1341],{"type":29,"value":551},{"type":24,"tag":543,"props":1343,"children":1344},{},[1345],{"type":24,"tag":32,"props":1346,"children":1348},{"className":1347},[],[1349],{"type":29,"value":560},{"type":24,"tag":521,"props":1351,"children":1352},{},[1353,1361],{"type":24,"tag":543,"props":1354,"children":1355},{},[1356],{"type":24,"tag":32,"props":1357,"children":1359},{"className":1358},[],[1360],{"type":29,"value":572},{"type":24,"tag":543,"props":1362,"children":1363},{},[1364],{"type":24,"tag":32,"props":1365,"children":1367},{"className":1366},[],[1368],{"type":29,"value":581},{"type":24,"tag":521,"props":1370,"children":1371},{},[1372,1380],{"type":24,"tag":543,"props":1373,"children":1374},{},[1375],{"type":24,"tag":32,"props":1376,"children":1378},{"className":1377},[],[1379],{"type":29,"value":593},{"type":24,"tag":543,"props":1381,"children":1382},{},[1383],{"type":24,"tag":32,"props":1384,"children":1386},{"className":1385},[],[1387],{"type":29,"value":602},{"type":24,"tag":521,"props":1389,"children":1390},{},[1391,1400],{"type":24,"tag":543,"props":1392,"children":1393},{},[1394,1399],{"type":24,"tag":32,"props":1395,"children":1397},{"className":1396},[],[1398],{"type":29,"value":614},{"type":29,"value":616},{"type":24,"tag":543,"props":1401,"children":1402},{},[1403],{"type":24,"tag":32,"props":1404,"children":1406},{"className":1405},[],[1407],{"type":29,"value":625},{"type":24,"tag":521,"props":1409,"children":1410},{},[1411,1420],{"type":24,"tag":543,"props":1412,"children":1413},{},[1414,1419],{"type":24,"tag":32,"props":1415,"children":1417},{"className":1416},[],[1418],{"type":29,"value":614},{"type":29,"value":638},{"type":24,"tag":543,"props":1421,"children":1422},{},[1423],{"type":24,"tag":32,"props":1424,"children":1426},{"className":1425},[],[1427],{"type":29,"value":647},{"type":24,"tag":521,"props":1429,"children":1430},{},[1431,1439],{"type":24,"tag":543,"props":1432,"children":1433},{},[1434],{"type":24,"tag":32,"props":1435,"children":1437},{"className":1436},[],[1438],{"type":29,"value":659},{"type":24,"tag":543,"props":1440,"children":1441},{},[1442,1443],{"type":29,"value":664},{"type":24,"tag":32,"props":1444,"children":1446},{"className":1445},[],[1447],{"type":29,"value":670},{"type":24,"tag":521,"props":1449,"children":1450},{},[1451,1459],{"type":24,"tag":543,"props":1452,"children":1453},{},[1454],{"type":24,"tag":32,"props":1455,"children":1457},{"className":1456},[],[1458],{"type":29,"value":682},{"type":24,"tag":543,"props":1460,"children":1461},{},[1462,1463],{"type":29,"value":664},{"type":24,"tag":32,"props":1464,"children":1466},{"className":1465},[],[1467],{"type":29,"value":692},{"type":24,"tag":521,"props":1469,"children":1470},{},[1471,1479],{"type":24,"tag":543,"props":1472,"children":1473},{},[1474],{"type":24,"tag":32,"props":1475,"children":1477},{"className":1476},[],[1478],{"type":29,"value":704},{"type":24,"tag":543,"props":1480,"children":1481},{},[1482,1483],{"type":29,"value":709},{"type":24,"tag":32,"props":1484,"children":1486},{"className":1485},[],[1487],{"type":29,"value":715},{"type":24,"tag":25,"props":1489,"children":1490},{},[1491,1492,1497,1498,1502,1503,1508],{"type":29,"value":720},{"type":24,"tag":32,"props":1493,"children":1495},{"className":1494},[],[1496],{"type":29,"value":614},{"type":29,"value":727},{"type":24,"tag":163,"props":1499,"children":1500},{},[1501],{"type":29,"value":732},{"type":29,"value":734},{"type":24,"tag":32,"props":1504,"children":1506},{"className":1505},[],[1507],{"type":29,"value":740},{"type":29,"value":742},{"type":24,"tag":25,"props":1510,"children":1511},{},[1512,1513,1518,1519,1523,1524,1529],{"type":29,"value":747},{"type":24,"tag":32,"props":1514,"children":1516},{"className":1515},[],[1517],{"type":29,"value":704},{"type":29,"value":754},{"type":24,"tag":163,"props":1520,"children":1521},{},[1522],{"type":29,"value":759},{"type":29,"value":761},{"type":24,"tag":32,"props":1525,"children":1527},{"className":1526},[],[1528],{"type":29,"value":767},{"type":29,"value":769},{"type":24,"tag":25,"props":1531,"children":1532},{},[1533,1534,1539],{"type":29,"value":774},{"type":24,"tag":32,"props":1535,"children":1537},{"className":1536},[],[1538],{"type":29,"value":780},{"type":29,"value":782},{"type":24,"tag":95,"props":1541,"children":1543},{"code":785,"language":400,"meta":7,"className":1542},[402],[1544],{"type":24,"tag":32,"props":1545,"children":1546},{"__ignoreMap":7},[1547],{"type":29,"value":785},{"type":24,"tag":25,"props":1549,"children":1550},{},[1551,1552,1557,1558,1563,1564,1569],{"type":29,"value":796},{"type":24,"tag":32,"props":1553,"children":1555},{"className":1554},[],[1556],{"type":29,"value":659},{"type":29,"value":803},{"type":24,"tag":32,"props":1559,"children":1561},{"className":1560},[],[1562],{"type":29,"value":682},{"type":29,"value":810},{"type":24,"tag":32,"props":1565,"children":1567},{"className":1566},[],[1568],{"type":29,"value":816},{"type":29,"value":818},{"type":24,"tag":25,"props":1571,"children":1572},{},[1573],{"type":29,"value":823},{"type":24,"tag":95,"props":1575,"children":1576},{"code":826},[1577],{"type":24,"tag":32,"props":1578,"children":1579},{"__ignoreMap":7},[1580],{"type":29,"value":826},{"type":24,"tag":25,"props":1582,"children":1583},{},[1584],{"type":29,"value":836},{"type":24,"tag":54,"props":1586,"children":1587},{"id":839},[1588],{"type":29,"value":842},{"type":24,"tag":25,"props":1590,"children":1591},{},[1592,1593,1598],{"type":29,"value":847},{"type":24,"tag":32,"props":1594,"children":1596},{"className":1595},[],[1597],{"type":29,"value":45},{"type":29,"value":854},{"type":24,"tag":856,"props":1600,"children":1601},{},[1602,1618,1622],{"type":24,"tag":860,"props":1603,"children":1604},{},[1605,1606,1611,1612,1617],{"type":29,"value":864},{"type":24,"tag":32,"props":1607,"children":1609},{"className":1608},[],[1610],{"type":29,"value":870},{"type":29,"value":872},{"type":24,"tag":32,"props":1613,"children":1615},{"className":1614},[],[1616],{"type":29,"value":188},{"type":29,"value":879},{"type":24,"tag":860,"props":1619,"children":1620},{},[1621],{"type":29,"value":884},{"type":24,"tag":860,"props":1623,"children":1624},{},[1625,1626,1631],{"type":29,"value":889},{"type":24,"tag":32,"props":1627,"children":1629},{"className":1628},[],[1630],{"type":29,"value":475},{"type":29,"value":896},{"type":24,"tag":25,"props":1633,"children":1634},{},[1635,1636,1641,1642,1647],{"type":29,"value":901},{"type":24,"tag":32,"props":1637,"children":1639},{"className":1638},[],[1640],{"type":29,"value":45},{"type":29,"value":908},{"type":24,"tag":32,"props":1643,"children":1645},{"className":1644},[],[1646],{"type":29,"value":475},{"type":29,"value":915},{"title":7,"searchDepth":917,"depth":917,"links":1649},[1650,1651,1652,1653,1654,1655],{"id":56,"depth":917,"text":59},{"id":110,"depth":917,"text":113},{"id":141,"depth":917,"text":144},{"id":226,"depth":917,"text":229},{"id":434,"depth":917,"text":437},{"id":839,"depth":917,"text":842},1789712951770]