1 Pod::Spec.new do |s|
2 s.name = 'onde_inference'
3 s.version = '0.1.0'
4 s.summary = 'On-device LLM inference SDK for Flutter (macOS).'
5 s.description = 'Runs Qwen 2.5 models locally on macOS with Metal acceleration.'
6 s.homepage = 'https://ondeinference.com'
7 s.license = { :type => 'MIT', :file => '../LICENSE' }
8 s.author = { 'Onde Inference' => 'hello@ondeinference.com' }
9 s.source = { :path => '.' }
10 s.source_files = 'Classes/**/*'
11 s.dependency 'FlutterMacOS'
12 s.platform = :osx, '10.15'
13 s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
14 s.swift_version = '5.0'
15
16 s.script_phases = [
17 {
18 :name => 'Build Rust bridge (onde_inference_dart)',
19 :script => <<~SHELL,
20 set -e
21 RUST_DIR="${PODS_TARGET_SRCROOT}/../rust"
22 cd "$RUST_DIR"
23 ARCH=$(uname -m)
24 if [[ "$ARCH" == "arm64" ]]; then
25 TARGET="aarch64-apple-darwin"
26 else
27 TARGET="x86_64-apple-darwin"
28 fi
29 cargo build --release --target "$TARGET"
30 cp "target/$TARGET/release/libonde_inference_dart.a" \
31 "${PODS_TARGET_SRCROOT}/libonde_inference_dart.a"
32 SHELL
33 :execution_position => :before_compile,
34 :output_files => ["${PODS_TARGET_SRCROOT}/libonde_inference_dart.a"],
35 }
36 ]
37
38 s.frameworks = 'SystemConfiguration'
39
40 s.pod_target_xcconfig = {
41 'DEFINES_MODULE' => 'YES',
42 'OTHER_LDFLAGS' => '-force_load ${PODS_TARGET_SRCROOT}/libonde_inference_dart.a',
43 }
44 s.preserve_paths = '../rust/**/*'
45 end