The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | require 'json' |
| 2 | |
| 3 | package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) |
| 4 | |
| 5 | Pod::Spec.new do |s| |
| 6 | s.name = 'T3HighlightsNative' |
| 7 | s.version = package['version'] |
| 8 | s.summary = 'Native @pierre/highlights syntax highlighter for T3 Code mobile.' |
| 9 | s.description = 'Runs the @pierre/highlights lexers, compiled from WebAssembly to C with wasm2c.' |
| 10 | s.homepage = 'https://t3tools.com' |
| 11 | s.license = { :type => 'UNLICENSED' } |
| 12 | s.author = { 'T3 Tools' => 'hello@t3tools.com' } |
| 13 | s.platforms = { :ios => min_ios_version_supported } |
| 14 | s.source = { :path => '.' } |
| 15 | s.source_files = 'cpp/**/*.{c,cpp,h,hpp,inc}', 'Vendor/**/*.{c,h,inc}' |
| 16 | s.public_header_files = [] |
| 17 | # Debug builds compile at -O0 by default, which makes the lexers several times |
| 18 | # slower. They are generated code, so optimize them in every configuration. |
| 19 | s.compiler_flags = '-O2' |
| 20 | s.pod_target_xcconfig = { |
| 21 | # Under C11, wasm2c makes its stack depth counter thread-local, so every lexer |
| 22 | # function entry calls _tlv_get_addr (2–9% of lexing time on an iPhone 12). |
| 23 | # Callers already serialize the lexer (t3_highlights.h), so a plain global is safe. |
| 24 | 'GCC_C_LANGUAGE_STANDARD' => 'gnu99', |
| 25 | # Plain malloc memory with explicit bounds checks: no guard-page signal |
| 26 | # handlers competing with the app's crash reporting. |
| 27 | 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) WASM_RT_USE_MMAP=0 WASM_RT_MEMCHECK_BOUNDS_CHECK=1 WASM_RT_SKIP_SIGNAL_RECOVERY=1', |
| 28 | 'HEADER_SEARCH_PATHS' => '$(inherited) "${PODS_TARGET_SRCROOT}/cpp" "${PODS_TARGET_SRCROOT}/Vendor" "${PODS_TARGET_SRCROOT}/Vendor/highlights" "${PODS_TARGET_SRCROOT}/Vendor/wasm2c"', |
| 29 | } |
| 30 | |
| 31 | load 'nitrogen/generated/ios/T3HighlightsNative+autolinking.rb' |
| 32 | add_nitrogen_files(s) |
| 33 | |
| 34 | s.dependency 'React-jsi' |
| 35 | s.dependency 'React-callinvoker' |
| 36 | install_modules_dependencies(s) |
| 37 | end |