Open History to see the last commit
1require 'json'
2
3package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
5Pod::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 => '16.1' }
14 s.source = { :path => '.' }
15 s.source_files = 'ios/**/*.swift', 'cpp/**/*.{c,h,inc}', 'Vendor/**/*.{c,h,inc}'
16 # Swift sees only the wrapper; the generated and runtime headers stay private.
17 s.public_header_files = 'cpp/t3_highlights.h'
18 # Debug builds compile at -O0 by default, which makes the lexers several times
19 # slower. They are generated code, so optimize them in every configuration.
20 s.compiler_flags = '-O2'
21 s.pod_target_xcconfig = {
22 'DEFINES_MODULE' => 'YES',
23 # Plain malloc memory with explicit bounds checks: no guard-page signal
24 # handlers competing with the app's crash reporting.
25 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) WASM_RT_USE_MMAP=0 WASM_RT_MEMCHECK_BOUNDS_CHECK=1 WASM_RT_SKIP_SIGNAL_RECOVERY=1',
26 'HEADER_SEARCH_PATHS' => '$(inherited) "${PODS_TARGET_SRCROOT}/Vendor" "${PODS_TARGET_SRCROOT}/Vendor/highlights" "${PODS_TARGET_SRCROOT}/Vendor/wasm2c"',
27 }
28 s.swift_version = '5.9'
29 s.dependency 'ExpoModulesCore'
30end