Compiled Node.js 18 from source on jailbroken iPhone to run Claude Code
2 points
8 hours ago
| 0 comments
| HN
Built Node.js 18.20.4 natively on a jailbroken iPhone 12 Pro Max (iOS 16.5, Dopamine) to run Claude Code - no SSH to a server.

Key discoveries: - Apple's -fembed-bitcode flag added 11MB overhead per .o file vs 58KB actual code, bloating V8 libraries to 6.8GB+4.5GB - Removing the flag from common.gypi dropped the build from 29GB to under 8GB - Required fake xcrun/xcodebuild scripts since iOS has no Xcode - Every build tool (mksnapshot, torque, etc.) needs ldid signing mid-build - Final binary needed --no-wasm-code-gc flag due to iOS memory management quirks

Final result: 71MB node binary with full WebAssembly + ICU support, Claude Code running interactively.

Video: https://www.youtube.com/shorts/NXgqi1jgSq0

No one has commented on this post.