Add Onde Inference Dart SDK
keypair34 committed
Apr 5, 2026 at 12:29 UTC
4b1392b6fc51fdab8049928915140dc3231f1d80
112 files changed
+20203
-109
.agents/skills/sdk-dart/SKILL.md
new
+690
@@ -0,0 +1,690 @@
1
+# SKILL: Dart / Flutter SDK with flutter_rust_bridge v2
2
+
3
+> Captured from: building `onde_inference` pub.dev package wrapping the `onde` Rust crate.
4
+> Agent reference for future Dart SDK tasks in this repo.
5
+
6
+---
7
+
8
+## What This Skill Covers
9
+
10
+End-to-end creation of a pub.dev-ready Flutter FFI plugin package that bridges to a
11
+Rust library using `flutter_rust_bridge` v2. Covers the full lifecycle:
12
+design → Rust bridge crate → Dart library → platform build files → tests →
13
+pub.dev dry-run → codegen → `flutter run`.
14
+
15
+---
16
+
17
+## Hard-Won Lessons (Read First)
18
+
19
+These are non-obvious facts that caused real failures and are not in the FRB docs.
20
+
21
+### 1. `flutter_rust_bridge_codegen` is a Rust binary — NOT a Dart package
22
+
23
+```
24
+# Correct — install the Rust binary once:
25
+cargo install flutter_rust_bridge_codegen
26
+
27
+# WRONG — this package does not exist on pub.dev:
28
+# dev_dependencies:
29
+# flutter_rust_bridge_codegen: ^2.12.0 ← will fail `dart pub get`
30
+```
31
+
32
+Never add it to `pubspec.yaml` `dev_dependencies`.
33
+
34
+### 2. `flutter_rust_bridge.yaml` — use module path syntax, not file paths
35
+
36
+```yaml
37
+# FRB 2.x CORRECT syntax:
38
+rust_input: "crate::api"
39
+rust_root: "rust"
40
+
41
+# WRONG (causes parse error in FRB 2.x):
42
+# rust_input:
43
+# - "rust/src/api.rs"
44
+
45
+# WRONG (causes migration error in FRB 2.x):
46
+# rust_input: "rust/src/api.rs"
47
+```
48
+
49
+### 3. Delete `frb_generated.rs` before running codegen — never pre-create it
50
+
51
+FRB codegen uses an **exclusive create** for `rust/src/frb_generated.rs`.
52
+If the file exists (even as a stub), codegen aborts with `File exists (os error 17)`.
53
+
54
+```bash
55
+# Before first codegen run:
56
+rm -f rust/src/frb_generated.rs
57
+
58
+# frb_generated.dart (the Dart stub) CAN pre-exist — FRB overwrites it safely.
59
+```
60
+
61
+### 4. `cargo-expand` is required by FRB codegen — auto-installs but takes time
62
+
63
+FRB codegen runs `cargo expand` internally to parse macro-expanded Rust.
64
+If missing, it installs automatically but adds ~2 min to the first run.
65
+Pre-install it:
66
+
67
+```bash
68
+cargo install cargo-expand
69
+```
70
+
71
+### 5. Example apps need `flutter create .` — a `pubspec.yaml` alone is not enough
72
+
73
+A Flutter project requires platform scaffolding (`ios/`, `android/`, `macos/`,
74
+`Runner.xcodeproj`, etc.) that only `flutter create` generates.
75
+
76
+```bash
77
+cd sdk/dart/example
78
+flutter create . \
79
+ --project-name onde_inference_example \
80
+ --platforms=ios,macos,android,linux,windows \
81
+ --org com.ondeinference
82
+```
83
+
84
+Run this **before** `flutter pub get` or `flutter run`.
85
+
86
+### 6. Types with `#[uniffi]` cannot be re-used directly in FRB
87
+
88
+If the source Rust crate annotates types with `#[uniffi::Record]`, `#[uniffi::Enum]`,
89
+etc., those attributes conflict with FRB code generation. The fix is **type mirroring**:
90
+re-declare every bridged type as a plain struct/enum in the bridge crate (`rust/src/api.rs`)
91
+and implement bidirectional `From<>` conversions.
92
+
93
+```rust
94
+// In rust/src/api.rs — mirror type (no #[uniffi] here)
95
+#[derive(Debug, Clone)]
96
+pub struct ChatMessage { pub role: ChatRole, pub content: String }
97
+
98
+// Conversion to/from the onde crate's type
99
+impl From<OndeChatMessage> for ChatMessage { ... }
100
+impl From<ChatMessage> for OndeChatMessage { ... }
101
+```
102
+
103
+### 7. `StreamSink<T>` requires `T: SseEncode` — satisfied by codegen, not by hand
104
+
105
+The `StreamSink` type (used for streaming) demands `T: SseEncode`. The real impl
106
+is generated by codegen. The pre-codegen stub in `frb_generated.rs` must provide
107
+a no-op impl to let `cargo check` pass:
108
+
109
+```rust
110
+// rust/src/frb_generated.rs (pre-codegen stub)
111
+use flutter_rust_bridge::for_generated::SseCodec;
112
+flutter_rust_bridge::frb_generated_boilerplate!(
113
+ default_stream_sink_codec = SseCodec,
114
+ default_rust_opaque = RustOpaqueMoi,
115
+ default_rust_auto_opaque = RustAutoOpaqueMoi,
116
+);
117
+impl SseEncode for crate::api::StreamChunk {
118
+ fn sse_encode(self, _s: &mut flutter_rust_bridge::for_generated::SseSerializer) {
119
+ unimplemented!("codegen stub")
120
+ }
121
+}
122
+```
123
+
124
+### 8. Dart lint: no leading underscore for library import prefixes
125
+
126
+```dart
127
+// BAD — triggers `no_leading_underscores_for_library_prefixes` lint:
128
+import 'frb_generated.dart' as _frb;
129
+
130
+// GOOD:
131
+import 'frb_generated.dart' as frb;
132
+```
133
+
134
+### 9. Dart lint: remove `library <name>;` directive
135
+
136
+```dart
137
+// BAD — triggers `unnecessary_library_name` lint:
138
+library onde_inference;
139
+
140
+// GOOD:
141
+library;
142
+```
143
+
144
+### 10. Exclude FRB-generated files from Dart analysis
145
+
146
+```yaml
147
+# analysis_options.yaml
148
+analyzer:
149
+ exclude:
150
+ - lib/src/frb_generated.dart
151
+ - lib/src/frb_generated.io.dart
152
+ - lib/src/frb_generated.web.dart
153
+```
154
+
155
+---
156
+
157
+## Package Structure Reference
158
+
159
+```
160
+sdk/dart/
161
+├── pubspec.yaml # Flutter plugin, ffiPlugin:true per platform
162
+├── analysis_options.yaml # Exclude frb_generated files
163
+├── flutter_rust_bridge.yaml # Codegen config (rust_input: "crate::api")
164
+├── CHANGELOG.md
165
+├── LICENSE
166
+├── README.md # pub.dev landing page
167
+│
168
+├── rust/ # Rust bridge crate
169
+│ ├── Cargo.toml # crate-type=[cdylib,staticlib]; publish=false
170
+│ └── src/
171
+│ ├── lib.rs # mod frb_generated; pub mod api; + #[frb(init)]
172
+│ ├── api.rs # Mirror types + OndeChatEngine + free fns
173
+│ └── frb_generated.rs # DELETE before codegen; stub only pre-codegen
174
+│
175
+├── lib/
176
+│ ├── <package_name>.dart # Public barrel — exports types + engine + RustLib
177
+│ └── src/
178
+│ ├── types.dart # Standalone Dart types — NO native dependency
179
+│ ├── engine.dart # OndeChatEngine wrapper + static helpers
180
+│ ├── frb_generated.dart # CAN be stub pre-codegen; overwritten by codegen
181
+│ └── frb_generated_stub.dart # Hand-written stub: RustLib + OndeChatEngine
182
+│
183
+├── android/
184
+│ ├── build.gradle # ffiPlugin CMake integration
185
+│ └── CMakeLists.txt # cargo build per Android ABI
186
+├── ios/
187
+│ └── <package>.podspec # script_phase: cargo build aarch64-apple-ios[-sim]
188
+├── macos/
189
+│ └── <package>.podspec # script_phase: cargo build aarch64-apple-darwin
190
+├── linux/
191
+│ ├── CMakeLists.txt
192
+│ └── <package>_plugin.cc
193
+├── windows/
194
+│ ├── CMakeLists.txt
195
+│ └── <package>_plugin.cpp
196
+│
197
+├── test/
198
+│ └── dart_test.dart # 22+ unit tests — all pass WITHOUT native binary
199
+└── example/
200
+ ├── pubspec.yaml
201
+ └── lib/main.dart # Full Material 3 demo app
202
+```
203
+
204
+---
205
+
206
+## `pubspec.yaml` Template
207
+
208
+```yaml
209
+name: <package_name> # e.g. onde_inference (lowercase_snake)
210
+description: >-
211
+ One-liner for pub.dev search (80 chars max for score).
212
+version: 0.1.0
213
+repository: https://github.com/ondeinference/onde
214
+homepage: https://ondeinference.com
215
+issue_tracker: https://github.com/ondeinference/onde/issues
216
+
217
+environment:
218
+ sdk: '>=3.3.0 <4.0.0'
219
+ flutter: '>=3.10.0'
220
+
221
+dependencies:
222
+ flutter:
223
+ sdk: flutter
224
+ flutter_rust_bridge: ^2.12.0 # Must match Rust crate version exactly
225
+
226
+dev_dependencies:
227
+ flutter_test:
228
+ sdk: flutter
229
+ test: ^1.25.0 # For pure-Dart unit tests
230
+ flutter_lints: ^5.0.0
231
+ # NOTE: flutter_rust_bridge_codegen is a Rust binary, NOT a Dart package.
232
+ # Install: cargo install flutter_rust_bridge_codegen
233
+
234
+flutter:
235
+ plugin:
236
+ platforms:
237
+ android:
238
+ ffiPlugin: true
239
+ ios:
240
+ ffiPlugin: true
241
+ macos:
242
+ ffiPlugin: true
243
+ linux:
244
+ ffiPlugin: true
245
+ windows:
246
+ ffiPlugin: true
247
+```
248
+
249
+---
250
+
251
+## `flutter_rust_bridge.yaml` Template
252
+
253
+```yaml
254
+rust_root: "rust"
255
+rust_input: "crate::api" # Module path, not file path
256
+dart_output: "lib/src/frb_generated.dart"
257
+dart_entrypoint_class_name: RustLib
258
+dart_preamble: |
259
+ // ignore_for_file: type=lint, unused_import, unnecessary_import
260
+web: false # On-device inference requires native access
261
+```
262
+
263
+---
264
+
265
+## Rust Bridge Crate (`rust/Cargo.toml`) Template
266
+
267
+```toml
268
+[package]
269
+name = "<package>_dart" # e.g. onde_inference_dart
270
+version = "0.1.0"
271
+edition = "2021"
272
+publish = false # Bridge crate is not published to crates.io
273
+
274
+[lib]
275
+crate-type = ["cdylib", "staticlib"]
276
+# cdylib → .so / .dylib / .dll for Android / macOS / Linux / Windows
277
+# staticlib → .a for iOS (dynamic linking not allowed)
278
+
279
+[dependencies]
280
+flutter_rust_bridge = "=2.12.0" # Must match Dart package version exactly
281
+<source_crate> = { path = "../../.." } # Relative path to the wrapped crate
282
+tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
283
+thiserror = "2"
284
+log = "0.4"
285
+```
286
+
287
+---
288
+
289
+## Rust `src/lib.rs` Template
290
+
291
+```rust
292
+mod frb_generated; // Generated by flutter_rust_bridge_codegen
293
+pub mod api;
294
+
295
+/// Called once when the Dart RustLib.init() is invoked.
296
+#[flutter_rust_bridge::frb(init)]
297
+pub fn init_app() {
298
+ flutter_rust_bridge::setup_default_user_utils();
299
+}
300
+```
301
+
302
+---
303
+
304
+## Type Mirroring Pattern in `src/api.rs`
305
+
306
+Use this pattern for every Rust type that crosses the bridge.
307
+
308
+```rust
309
+use flutter_rust_bridge::frb;
310
+use <source_crate>::inference::{
311
+ ChatMessage as SrcChatMessage,
312
+ ChatRole as SrcChatRole,
313
+ // ...
314
+};
315
+
316
+// 1. Declare a mirror type with no framework annotations
317
+#[derive(Debug, Clone, PartialEq)]
318
+pub enum ChatRole { System, User, Assistant }
319
+
320
+// 2. Bidirectional conversions
321
+impl From<SrcChatRole> for ChatRole { ... }
322
+impl From<ChatRole> for SrcChatRole { ... }
323
+
324
+// 3. Opaque engine wrapper — FRB auto-wraps in Arc<RwLock<T>>
325
+pub struct OndeChatEngine { inner: <source_crate>::inference::ChatEngine }
326
+
327
+impl OndeChatEngine {
328
+ #[frb(sync)] // sync constructor → no Future on Dart side
329
+ pub fn new() -> OndeChatEngine { OndeChatEngine { inner: ChatEngine::new() } }
330
+
331
+ pub async fn send_message(&self, message: String) -> Result<InferenceResult, OndeError> {
332
+ self.inner.send_message(message).await
333
+ .map(InferenceResult::from)
334
+ .map_err(OndeError::from)
335
+ }
336
+
337
+ // Streaming: use StreamSink (maps to Dart Stream<T>)
338
+ pub async fn stream_message(
339
+ &self,
340
+ message: String,
341
+ sink: StreamSink<StreamChunk>,
342
+ ) -> Result<(), OndeError> {
343
+ let mut rx = self.inner.stream_message(message).await.map_err(OndeError::from)?;
344
+ while let Some(chunk) = rx.recv().await {
345
+ let done = chunk.done;
346
+ sink.add(StreamChunk::from(chunk));
347
+ if done { break; }
348
+ }
349
+ Ok(())
350
+ }
351
+}
352
+
353
+// Free functions with #[frb(sync)] → synchronous on Dart side
354
+#[frb(sync)]
355
+pub fn default_model_config() -> GgufModelConfig {
356
+ <source_crate>::inference::GgufModelConfig::platform_default().into()
357
+}
358
+```
359
+
360
+---
361
+
362
+## Dart Stub Pattern (`lib/src/frb_generated_stub.dart`)
363
+
364
+The stub lets the package compile and all pure-Dart unit tests pass **before**
365
+the native binary exists. Key rules:
366
+
367
+1. Import only `types.dart` — never `dart:ffi` or anything platform-native.
368
+2. `RustLib.init()` sets a bool flag; `new_()` and every inference method throw
369
+ `UnimplementedError`.
370
+3. Config/sampling free functions return **real hardcoded values** (matching the
371
+ Rust constants) so model-selection UIs can be built and tested immediately.
372
+4. Make every method signature match exactly what FRB will generate (same names,
373
+ same parameter types, same return types) — this makes the post-codegen
374
+ transition a drop-in replacement.
375
+
376
+```dart
377
+// frb_generated.dart (stub redirect)
378
+export 'frb_generated_stub.dart';
379
+
380
+// frb_generated_stub.dart
381
+import 'types.dart';
382
+
383
+class RustLib {
384
+ static bool _initialized = false;
385
+ static bool get isInitialized => _initialized;
386
+ static Future<void> init() async { _initialized = true; }
387
+}
388
+
389
+class OndeChatEngine {
390
+ static Future<OndeChatEngine> new_() async =>
391
+ throw UnimplementedError('Run flutter_rust_bridge_codegen generate');
392
+
393
+ Future<double> loadDefaultModel({ String? systemPrompt, SamplingConfig? sampling }) =>
394
+ throw UnimplementedError(_msg('loadDefaultModel'));
395
+
396
+ Stream<StreamChunk> streamMessage({ required String message }) =>
397
+ Stream.error(UnimplementedError(_msg('streamMessage')), StackTrace.current);
398
+
399
+ static String _msg(String m) => 'OndeChatEngine.$m: run codegen first';
400
+}
401
+
402
+// Free functions — return real data so UI can be built/tested without native
403
+GgufModelConfig qwen251_5bConfig() => const GgufModelConfig(
404
+ modelId: 'bartowski/Qwen2.5-1.5B-Instruct-GGUF',
405
+ files: ['Qwen2.5-1.5B-Instruct-Q4_K_M.gguf'],
406
+ displayName: 'Qwen 2.5 1.5B',
407
+ approxMemory: '~941 MB',
408
+);
409
+```
410
+
411
+---
412
+
413
+## Dart Public API Pattern (`lib/src/engine.dart`)
414
+
415
+```dart
416
+import 'frb_generated.dart' as frb; // NO leading underscore
417
+import 'types.dart';
418
+export 'frb_generated.dart' show RustLib;
419
+
420
+class OndeChatEngine {
421
+ final frb.OndeChatEngine _native;
422
+ OndeChatEngine._(this._native);
423
+
424
+ static Future<OndeChatEngine> create() async {
425
+ if (!frb.RustLib.isInitialized) await frb.RustLib.init();
426
+ return OndeChatEngine._(await frb.OndeChatEngine.new_());
427
+ }
428
+
429
+ Stream<StreamChunk> streamMessage(String message) =>
430
+ _native.streamMessage(message: message);
431
+}
432
+
433
+abstract final class OndeInference {
434
+ static Future<void> init() => frb.RustLib.init();
435
+ static GgufModelConfig defaultModelConfig() => frb.defaultModelConfig();
436
+ static SamplingConfig deterministicSamplingConfig() => frb.deterministicSamplingConfig();
437
+}
438
+```
439
+
440
+---
441
+
442
+## Platform Build Files
443
+
444
+### iOS podspec — key section
445
+
446
+```ruby
447
+s.script_phases = [{
448
+ :name => 'Build Rust bridge',
449
+ :script => <<~SHELL,
450
+ set -e
451
+ cd "${PODS_TARGET_SRCROOT}/../rust"
452
+ TARGET=$([[ "$PLATFORM_NAME" == "iphonesimulator" ]] && echo "aarch64-apple-ios-sim" || echo "aarch64-apple-ios")
453
+ cargo build --release --target "$TARGET" --lib --crate-type staticlib
454
+ cp "target/$TARGET/release/lib<crate>.a" "${BUILT_PRODUCTS_DIR}/lib<crate>.a"
455
+ SHELL
456
+ :execution_position => :before_compile,
457
+ :output_files => ["${BUILT_PRODUCTS_DIR}/lib<crate>.a"],
458
+}]
459
+s.xcconfig = { 'OTHER_LDFLAGS' => '-l<crate>' }
460
+s.libraries = '<crate>'
461
+```
462
+
463
+### macOS podspec — differs from iOS
464
+
465
+```ruby
466
+s.dependency 'FlutterMacOS' # NOT 'Flutter'
467
+s.platform = :osx, '10.15' # NOT :ios
468
+# Script: TARGET = "aarch64-apple-darwin"
469
+# No iphonesimulator check needed
470
+```
471
+
472
+### Android `CMakeLists.txt` — key section
473
+
474
+```cmake
475
+if(ANDROID_ABI STREQUAL "arm64-v8a")
476
+ set(CARGO_TARGET "aarch64-linux-android")
477
+elseif(ANDROID_ABI STREQUAL "armeabi-v7a")
478
+ set(CARGO_TARGET "armv7-linux-androideabi")
479
+elseif(ANDROID_ABI STREQUAL "x86_64")
480
+ set(CARGO_TARGET "x86_64-linux-android")
481
+endif()
482
+add_custom_command(OUTPUT "${LIB_OUTPUT}"
483
+ COMMAND cargo build --release --target ${CARGO_TARGET} --manifest-path ${RUST_DIR}/Cargo.toml)
484
+add_library(<crate> SHARED IMPORTED GLOBAL)
485
+set_target_properties(<crate> PROPERTIES IMPORTED_LOCATION ${LIB_OUTPUT})
486
+```
487
+
488
+---
489
+
490
+## Testing Strategy
491
+
492
+All pure-Dart unit tests run **without** building the native binary.
493
+
494
+```
495
+Tests that PASS pre-codegen (using the stub):
496
+ ✓ All type constructors, equality, hashCode, copyWith
497
+ ✓ Enum toString and isReady helpers
498
+ ✓ SamplingConfig presets (default, deterministic, mobile)
499
+ ✓ GgufModelConfig factory functions (real hardcoded values in stub)
500
+ ✓ RustLib.init() is idempotent
501
+ ✓ OndeInference.* static helpers
502
+ ✓ OndeChatEngine.create() throws UnimplementedError pre-codegen
503
+
504
+Tests that require codegen + native binary:
505
+ ✗ Any actual inference call
506
+ ✗ loadDefaultModel / sendMessage / streamMessage
507
+```
508
+
509
+Run tests:
510
+```bash
511
+cd sdk/dart && dart test test/dart_test.dart
512
+```
513
+
514
+---
515
+
516
+## Pub.dev Readiness Checklist
517
+
518
+Run this before declaring the SDK ready:
519
+
520
+```bash
521
+# 1. Dart analysis — must be zero issues
522
+dart analyze lib/
523
+
524
+# 2. All tests pass
525
+dart test test/dart_test.dart
526
+
527
+# 3. Dry-run publish — must show "Package has 0 warnings"
528
+dart pub publish --dry-run
529
+```
530
+
531
+Common pub.dev score deductions to avoid:
532
+- Missing `repository:` in pubspec → loses points
533
+- No `example/` directory → loses points
534
+- `description:` under 60 chars or over 180 chars → loses points
535
+- Library exports not documented → loses points
536
+- `library <name>;` directive → triggers lint
537
+
538
+---
539
+
540
+## Codegen Workflow (Full, Correct Order)
541
+
542
+```bash
543
+# ── Prerequisites (one-time) ──────────────────────────────────────────────
544
+
545
+rustup target add aarch64-apple-ios aarch64-apple-ios-sim # iOS
546
+rustup target add aarch64-apple-darwin x86_64-apple-darwin # macOS
547
+
548
+cargo install cargo-expand # Required by FRB codegen parser
549
+cargo install flutter_rust_bridge_codegen # The codegen tool itself
550
+
551
+# ── Per-package setup ─────────────────────────────────────────────────────
552
+
553
+cd sdk/dart
554
+
555
+# IMPORTANT: delete the pre-codegen Rust stub first
556
+rm -f rust/src/frb_generated.rs
557
+
558
+# Run codegen — generates:
559
+# rust/src/frb_generated.rs (Rust glue)
560
+# lib/src/frb_generated.dart (Dart FFI bindings, replaces stub)
561
+flutter_rust_bridge_codegen generate
562
+
563
+# Verify Rust still compiles cleanly
564
+cd rust && cargo check
565
+
566
+# Verify Dart analysis is still clean
567
+cd .. && dart analyze lib/
568
+```
569
+
570
+---
571
+
572
+## `flutter run` on iOS (Full Steps)
573
+
574
+```bash
575
+# 1. Scaffold the example Flutter project (one-time)
576
+cd sdk/dart/example
577
+flutter create . \
578
+ --project-name <example_name> \
579
+ --platforms=ios,macos \
580
+ --org com.<your_org>
581
+
582
+# 2. Get dependencies
583
+flutter pub get
584
+
585
+# 3. Run codegen (from the SDK package root, not example root)
586
+cd ..
587
+flutter_rust_bridge_codegen generate
588
+
589
+# 4. Run the app (from example dir)
590
+cd example
591
+flutter run # picks up connected device/simulator automatically
592
+flutter run -d iPhone # target a specific device
593
+```
594
+
595
+**What happens during the first `flutter run` on iOS:**
596
+1. Flutter invokes `pod install` → reads `ios/onde_inference.podspec`
597
+2. The podspec script phase runs `cargo build --release --target aarch64-apple-ios-sim`
598
+ (or `-device`) inside `sdk/dart/rust/` — this takes 5–15 min first time
599
+3. The resulting `libonde_inference_dart.a` is linked into the Runner app
600
+4. Flutter's Dart VM starts, calls `RustLib.init()`, loads the native library
601
+5. The model downloads from HuggingFace Hub on first inference (~941 MB or ~1.93 GB)
602
+
603
+**HuggingFace token for private/gated models:**
604
+```bash
605
+# Bake token at build time (required for iOS — no filesystem access):
606
+export HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
607
+flutter run
608
+```
609
+
610
+---
611
+
612
+## Version Pinning Rule
613
+
614
+The `flutter_rust_bridge` Dart package and `flutter_rust_bridge` Rust crate
615
+**must be the same version**. Use exact pins:
616
+
617
+```toml
618
+# rust/Cargo.toml
619
+flutter_rust_bridge = "=2.12.0"
620
+```
621
+```yaml
622
+# pubspec.yaml
623
+dependencies:
624
+ flutter_rust_bridge: ^2.12.0 # ^ is OK on Dart side; codegen auto-upgrades
625
+```
626
+
627
+If they drift, generated code won't compile. Always check both when upgrading.
628
+
629
+---
630
+
631
+## Common Errors and Fixes
632
+
633
+| Error | Cause | Fix |
634
+|-------|-------|-----|
635
+| `rust_input: invalid type: sequence` | YAML list syntax in FRB 2.x | Change to `rust_input: "crate::api"` |
636
+| `Please migrate configuration rust_input` | File path in FRB 2.x | Change to `rust_input: "crate::api"` |
637
+| `File exists (os error 17)` | `frb_generated.rs` pre-exists | `rm rust/src/frb_generated.rs` |
638
+| `could not find package flutter_rust_bridge_codegen` | Added codegen as Dart dep | Remove it; install via `cargo install` |
639
+| `no such command: expand` | `cargo-expand` not installed | `cargo install cargo-expand` |
640
+| `unexpected cfg condition name: frb_expand` | Rust check-cfg lint | Harmless FRB macro warning; suppress with `#[allow(unexpected_cfgs)]` or ignore |
641
+| `no_leading_underscores_for_library_prefixes` | Import alias `as _frb` | Rename to `as frb` |
642
+| `unnecessary_library_name` | `library <name>;` in barrel | Change to bare `library;` |
643
+| `OndeChatEngine.create() throws UnimplementedError` | Codegen not run yet | Run `flutter_rust_bridge_codegen generate` |
644
+| `flutter run` fails, missing Runner.xcodeproj | `flutter create` not run | Run `flutter create . --platforms=ios ...` in example dir |
645
+
646
+---
647
+
648
+## File Interdependency Map
649
+
650
+```
651
+pubspec.yaml
652
+ └── declares: flutter_rust_bridge ^2.12.0
653
+
654
+flutter_rust_bridge.yaml
655
+ ├── rust_root: "rust/" → rust/Cargo.toml
656
+ ├── rust_input: "crate::api" → rust/src/api.rs (source of truth)
657
+ └── dart_output: "lib/src/frb_generated.dart" (codegen writes here)
658
+
659
+rust/src/api.rs
660
+ ├── imports onde::{ChatEngine, ...} (path dep → ../../..)
661
+ ├── declares mirror types (ChatRole, ChatMessage, ...)
662
+ ├── declares OndeChatEngine (wraps ChatEngine)
663
+ └── declares free functions (default_model_config, ...)
664
+
665
+lib/src/frb_generated.dart ← GENERATED (overwritten by codegen)
666
+ ├── pre-codegen: re-exports frb_generated_stub.dart
667
+ └── post-codegen: full dart:ffi implementation
668
+
669
+lib/src/frb_generated_stub.dart
670
+ ├── class RustLib (init no-op)
671
+ ├── class OndeChatEngine (all methods throw UnimplementedError)
672
+ └── free functions (return real hardcoded config/sampling values)
673
+
674
+lib/src/types.dart ← hand-written, FRB-independent
675
+ └── ChatRole, ChatMessage, SamplingConfig, GgufModelConfig,
676
+ InferenceResult, StreamChunk, EngineStatus, EngineInfo, OndeException
677
+
678
+lib/src/engine.dart ← hand-written, imports frb_generated.dart + types.dart
679
+ ├── class OndeChatEngine (wraps frb.OndeChatEngine)
680
+ └── abstract class OndeInference (static helpers)
681
+
682
+lib/<package>.dart (barrel)
683
+ ├── export 'src/types.dart'
684
+ ├── export 'src/engine.dart'
685
+ └── export 'src/frb_generated.dart' show RustLib
686
+```
687
+
688
+---
689
+
690
+*Last updated: April 2025 — based on implementing `onde_inference 0.1.0`.*
\ No newline at end of file
Cargo.lock
+2
-109
@@ -1602,15 +1602,6 @@ version = "0.2.0"
1602
source = "registry+https://github.com/rust-lang/crates.io-index"
1603
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
1604
1605
-[[package]]
1606
-name = "foreign-types"
1607
-version = "0.3.2"
1608
-source = "registry+https://github.com/rust-lang/crates.io-index"
1609
-checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
1610
-dependencies = [
1611
- "foreign-types-shared 0.1.1",
1612
-]
1613
-
1605
[[package]]
1606
name = "foreign-types"
1607
version = "0.5.0"
@@ -1618,7 +1609,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1609
checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
1610
dependencies = [
1611
"foreign-types-macros",
1621
- "foreign-types-shared 0.3.1",
1612
+ "foreign-types-shared",
1613
]
1614
1615
[[package]]
@@ -1632,12 +1623,6 @@ dependencies = [
1623
"syn 2.0.117",
1624
]
1625
1635
-[[package]]
1636
-name = "foreign-types-shared"
1637
-version = "0.1.1"
1638
-source = "registry+https://github.com/rust-lang/crates.io-index"
1639
-checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
1640
-
1626
[[package]]
1627
name = "foreign-types-shared"
1628
version = "0.3.1"
@@ -2234,7 +2219,6 @@ dependencies = [
2219
"indicatif 0.17.11",
2220
"libc",
2221
"log",
2237
- "native-tls",
2222
"num_cpus",
2223
"rand 0.9.2",
2224
"reqwest 0.12.28",
@@ -2370,22 +2354,6 @@ dependencies = [
2354
"webpki-roots 1.0.6",
2355
]
2356
2373
-[[package]]
2374
-name = "hyper-tls"
2375
-version = "0.6.0"
2376
-source = "registry+https://github.com/rust-lang/crates.io-index"
2377
-checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
2378
-dependencies = [
2379
- "bytes",
2380
- "http-body-util",
2381
- "hyper",
2382
- "hyper-util",
2383
- "native-tls",
2384
- "tokio",
2385
- "tokio-native-tls",
2386
- "tower-service",
2387
-]
2388
-
2357
[[package]]
2358
name = "hyper-util"
2359
version = "0.1.20"
@@ -3024,7 +2992,7 @@ dependencies = [
2992
"bitflags 2.11.0",
2993
"block",
2994
"core-graphics-types",
3027
- "foreign-types 0.5.0",
2995
+ "foreign-types",
2996
"log",
2997
"objc",
2998
"paste",
@@ -3376,23 +3344,6 @@ dependencies = [
3344
"typenum",
3345
]
3346
3379
-[[package]]
3380
-name = "native-tls"
3381
-version = "0.2.18"
3382
-source = "registry+https://github.com/rust-lang/crates.io-index"
3383
-checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2"
3384
-dependencies = [
3385
- "libc",
3386
- "log",
3387
- "openssl",
3388
- "openssl-probe",
3389
- "openssl-sys",
3390
- "schannel",
3391
- "security-framework",
3392
- "security-framework-sys",
3393
- "tempfile",
3394
-]
3395
-
3347
[[package]]
3348
name = "new_debug_unreachable"
3349
version = "1.0.6"
@@ -3713,50 +3664,12 @@ dependencies = [
3664
"thiserror 2.0.18",
3665
]
3666
3716
-[[package]]
3717
-name = "openssl"
3718
-version = "0.10.76"
3719
-source = "registry+https://github.com/rust-lang/crates.io-index"
3720
-checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf"
3721
-dependencies = [
3722
- "bitflags 2.11.0",
3723
- "cfg-if",
3724
- "foreign-types 0.3.2",
3725
- "libc",
3726
- "once_cell",
3727
- "openssl-macros",
3728
- "openssl-sys",
3729
-]
3730
-
3731
-[[package]]
3732
-name = "openssl-macros"
3733
-version = "0.1.1"
3734
-source = "registry+https://github.com/rust-lang/crates.io-index"
3735
-checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
3736
-dependencies = [
3737
- "proc-macro2",
3738
- "quote",
3739
- "syn 2.0.117",
3740
-]
3741
-
3667
[[package]]
3668
name = "openssl-probe"
3669
version = "0.2.1"
3670
source = "registry+https://github.com/rust-lang/crates.io-index"
3671
checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
3672
3748
-[[package]]
3749
-name = "openssl-sys"
3750
-version = "0.9.112"
3751
-source = "registry+https://github.com/rust-lang/crates.io-index"
3752
-checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb"
3753
-dependencies = [
3754
- "cc",
3755
- "libc",
3756
- "pkg-config",
3757
- "vcpkg",
3758
-]
3759
-
3673
[[package]]
3674
name = "option-ext"
3675
version = "0.2.0"
@@ -4450,13 +4363,11 @@ dependencies = [
4363
"http-body-util",
4364
"hyper",
4365
"hyper-rustls",
4453
- "hyper-tls",
4366
"hyper-util",
4367
"js-sys",
4368
"log",
4369
"mime",
4370
"mime_guess",
4459
- "native-tls",
4371
"percent-encoding",
4372
"pin-project-lite",
4373
"quinn",
@@ -4467,7 +4378,6 @@ dependencies = [
4378
"serde_urlencoded",
4379
"sync_wrapper",
4380
"tokio",
4470
- "tokio-native-tls",
4381
"tokio-rustls",
4382
"tokio-util",
4383
"tower",
@@ -5881,16 +5791,6 @@ dependencies = [
5791
"syn 2.0.117",
5792
]
5793
5884
-[[package]]
5885
-name = "tokio-native-tls"
5886
-version = "0.3.1"
5887
-source = "registry+https://github.com/rust-lang/crates.io-index"
5888
-checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
5889
-dependencies = [
5890
- "native-tls",
5891
- "tokio",
5892
-]
5893
-
5794
[[package]]
5795
name = "tokio-rayon"
5796
version = "2.1.0"
@@ -6431,7 +6331,6 @@ dependencies = [
6331
"base64 0.22.1",
6332
"flate2",
6333
"log",
6434
- "native-tls",
6334
"once_cell",
6335
"rustls",
6336
"rustls-pki-types",
@@ -6553,12 +6452,6 @@ dependencies = [
6452
"uuid 0.8.2",
6453
]
6454
6556
-[[package]]
6557
-name = "vcpkg"
6558
-version = "0.2.15"
6559
-source = "registry+https://github.com/rust-lang/crates.io-index"
6560
-checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
6561
-
6455
[[package]]
6456
name = "vec_map"
6457
version = "0.8.2"
sdk/dart/.gitignore
new
+37
@@ -0,0 +1,37 @@
1
+# https://dart.dev/guides/libraries/private-files
2
+# Created by `dart pub`
3
+.dart_tool/
4
+
5
+# Avoid committing pubspec.lock for library packages; see
6
+# https://dart.dev/guides/libraries/private-files#pubspeclock.
7
+pubspec.lock
8
+
9
+# Rust build artifacts (multi-GB)
10
+rust/target/
11
+
12
+# Precompiled static libraries — built from source via podspec / CMake / Gradle
13
+ios/*.a
14
+macos/*.a
15
+**/*.so
16
+**/*.dylib
17
+**/*.dll
18
+**/*.lib
19
+
20
+# Flutter example app build outputs
21
+example/build/
22
+example/.dart_tool/
23
+
24
+# Dev logs
25
+logs/
26
+
27
+# IDE / editor files
28
+.idea/
29
+.vscode/
30
+*.iml
31
+*.swp
32
+*.swo
33
+*~
34
+
35
+# macOS metadata
36
+.DS_Store
37
+**/.DS_Store
sdk/dart/.pubignore
new
+61
@@ -0,0 +1,61 @@
1
+# ──────────────────────────────────────────────────────────
2
+# .pubignore — files excluded from `dart pub publish`
3
+#
4
+# pub.dev enforces a 100 MB upload limit.
5
+# The Rust source (rust/src/, rust/Cargo.toml, rust/Cargo.lock)
6
+# MUST be included — the podspecs and CMake/Gradle build scripts
7
+# compile from source on the consumer's machine.
8
+# ──────────────────────────────────────────────────────────
9
+
10
+# Rust build artifacts (often multi-GB)
11
+rust/target/
12
+
13
+# Precompiled static libraries (built from source via podspec/cmake)
14
+**/*.a
15
+**/*.so
16
+**/*.dylib
17
+**/*.dll
18
+**/*.lib
19
+
20
+# Flutter / Dart tooling caches
21
+.dart_tool/
22
+.packages
23
+pubspec.lock
24
+
25
+# Example app build outputs
26
+example/build/
27
+example/.dart_tool/
28
+example/android/.gradle/
29
+example/android/build/
30
+example/android/app/build/
31
+example/ios/Pods/
32
+example/ios/.symlinks/
33
+example/ios/Flutter/Flutter.framework
34
+example/ios/Flutter/Flutter.podspec
35
+example/macos/Pods/
36
+example/macos/.symlinks/
37
+example/macos/Flutter/
38
+example/linux/flutter/
39
+example/windows/flutter/
40
+
41
+# Platform build directories that may accumulate artifacts
42
+android/build/
43
+ios/build/
44
+macos/build/
45
+linux/build/
46
+windows/build/
47
+
48
+# Dev logs
49
+logs/
50
+
51
+# IDE / editor files
52
+.idea/
53
+.vscode/
54
+*.iml
55
+*.swp
56
+*.swo
57
+*~
58
+
59
+# macOS metadata
60
+.DS_Store
61
+**/.DS_Store
sdk/dart/CHANGELOG.md
new
+16
@@ -0,0 +1,16 @@
1
+## 0.1.0
2
+
3
+* Initial MVP release.
4
+* Multi-turn chat inference with Qwen 2.5 1.5B and 3B GGUF Q4_K_M models.
5
+* Streaming token delivery via Dart `Stream<StreamChunk>` — display tokens as they are generated.
6
+* Metal acceleration on iOS and macOS (Apple silicon and Intel).
7
+* CPU inference on Android, Linux, and Windows.
8
+* Platform-aware default model selection (1.5B on iOS / Android, 3B on macOS / Linux / Windows).
9
+* Conversation history management: `history()`, `clearHistory()`, `pushHistory()`.
10
+* One-shot `generate()` API that does not affect the conversation history.
11
+* Configurable sampling: temperature, top-p, top-k, min-p, max tokens, frequency and presence penalties.
12
+* Built-in sampling presets: `SamplingConfig.defaultConfig()`, `SamplingConfig.deterministic()`, `SamplingConfig.mobile()`.
13
+* `EngineInfo` snapshot: status, loaded model name, approximate memory, and history length.
14
+* `OndeInference` static helper namespace for library initialisation and model / sampling config factories.
15
+* Compilation stub (`frb_generated_stub.dart`) so the package compiles before the native Rust bridge is built.
16
+* Powered by [flutter_rust_bridge v2](https://pub.dev/packages/flutter_rust_bridge) and the [Onde](https://ondeinference.com) Rust engine.
\ No newline at end of file
sdk/dart/LICENSE
new
+21
@@ -0,0 +1,21 @@
1
+MIT License
2
+
3
+Copyright (c) 2025 Splitfire AB
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.
sdk/dart/README.md
new
+308
@@ -0,0 +1,308 @@
1
+# onde_inference
2
+
3
+[](https://pub.dev/packages/onde_inference)
4
+[](https://github.com/ondeinference/onde/blob/main/sdk/dart/LICENSE)
5
+[](https://pub.dev/packages/onde_inference)
6
+
7
+**On-device LLM inference for Flutter & Dart.**
8
+
9
+Run [Qwen 2.5](https://huggingface.co/bartowski/Qwen2.5-3B-Instruct-GGUF) language models locally — no cloud, no API keys, no data leaving the device. Powered by the [Onde](https://ondeinference.com) Rust engine and [mistral.rs](https://github.com/EricLBuehler/mistral.rs), bridged to Flutter via [flutter_rust_bridge v2](https://pub.dev/packages/flutter_rust_bridge).
10
+
11
+---
12
+
13
+## Features
14
+
15
+- 🚀 **On-device inference** — models run entirely on the local CPU or GPU; no network request is ever made during inference
16
+- ⚡ **Metal acceleration** on iOS and macOS (Apple silicon) for fast token generation
17
+- 💬 **Multi-turn chat** with automatic conversation history management
18
+- 🌊 **Streaming token delivery** via Dart `Stream<StreamChunk>` — display tokens as they are generated
19
+- 🤖 **Qwen 2.5 1.5B and 3B** GGUF Q4\_K\_M models, downloaded from HuggingFace Hub on first use and cached locally
20
+- 🎛️ **Configurable sampling** — temperature, top-p, top-k, min-p, max tokens, frequency/presence penalties
21
+- 📱 **Platform-aware defaults** — automatically selects the 1.5B model on mobile and the 3B model on desktop
22
+- 🦀 **Rust core** — the inference engine is written in Rust for safety, performance, and zero-overhead FFI
23
+
24
+---
25
+
26
+## Platform support
27
+
28
+| Platform | GPU backend | Default model | Notes |
29
+|----------|-------------|---------------|-------|
30
+| iOS 13+ | Metal | Qwen 2.5 1.5B (~941 MB) | Simulator uses `aarch64-apple-ios-sim` |
31
+| macOS 10.15+ | Metal | Qwen 2.5 3B (~1.93 GB) | Apple silicon & Intel supported |
32
+| Android (API 21+) | CPU | Qwen 2.5 1.5B (~941 MB) | arm64-v8a, armeabi-v7a, x86\_64, x86 |
33
+| Linux (x86\_64) | CPU | Qwen 2.5 3B (~1.93 GB) | CUDA builds possible — see docs |
34
+| Windows (x86\_64) | CPU | Qwen 2.5 3B (~1.93 GB) | CUDA builds possible — see docs |
35
+
36
+> **Web is not supported.** On-device LLM inference requires native system access that is not available in a browser sandbox.
37
+
38
+---
39
+
40
+## Getting started
41
+
42
+### 1. Add the dependency
43
+
44
+```yaml
45
+dependencies:
46
+ onde_inference: ^0.1.0
47
+```
48
+
49
+### 2. Install Rust (required to build the native bridge)
50
+
51
+```sh
52
+curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
53
+```
54
+
55
+Add the targets for your platform(s):
56
+
57
+```sh
58
+# iOS
59
+rustup target add aarch64-apple-ios aarch64-apple-ios-sim
60
+
61
+# macOS
62
+rustup target add aarch64-apple-darwin x86_64-apple-darwin
63
+
64
+# Android (requires NDK r25+)
65
+rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android
66
+
67
+# Linux / Windows — already covered by the host toolchain
68
+```
69
+
70
+### 3. Run the code generator
71
+
72
+From your **Flutter project root** (not the package root):
73
+
74
+```sh
75
+dart pub get
76
+dart run flutter_rust_bridge_codegen generate
77
+```
78
+
79
+This reads `onde_inference`'s `rust/src/api.rs` and writes the FFI glue into
80
+`lib/src/rust/frb_generated.dart` inside the package. You only need to re-run
81
+this when the package is updated.
82
+
83
+### 4. Build the native library
84
+
85
+The native Rust library is compiled automatically as part of the normal Flutter
86
+build. On iOS and macOS it is driven by the CocoaPods script phase in the
87
+podspec; on Android by the CMake step in `android/build.gradle`; on Linux and
88
+Windows by the `add_custom_command` in the platform `CMakeLists.txt`.
89
+
90
+For the very first build, allow extra time for Cargo to compile the dependency
91
+tree (~5–10 minutes cold, <1 minute incremental).
92
+
93
+---
94
+
95
+## Usage
96
+
97
+### Initialize the library
98
+
99
+Call `OndeInference.init()` **once** at application startup, before creating
100
+any `OndeChatEngine`:
101
+
102
+```dart
103
+import 'package:onde_inference/onde_inference.dart';
104
+
105
+void main() async {
106
+ WidgetsFlutterBinding.ensureInitialized();
107
+ await OndeInference.init();
108
+ runApp(const MyApp());
109
+}
110
+```
111
+
112
+### Create an engine and load the default model
113
+
114
+```dart
115
+// Create the engine (synchronous — no model is loaded yet).
116
+final engine = await OndeChatEngine.create();
117
+
118
+// Load the platform-appropriate default model.
119
+// On iOS / Android → Qwen 2.5 1.5B (~941 MB)
120
+// On macOS / Linux / Windows → Qwen 2.5 3B (~1.93 GB)
121
+final elapsed = await engine.loadDefaultModel(
122
+ systemPrompt: 'You are a helpful assistant.',
123
+);
124
+print('Model loaded in ${elapsed.toStringAsFixed(1)} s');
125
+```
126
+
127
+### Send a message (non-streaming)
128
+
129
+```dart
130
+final result = await engine.sendMessage('What is Rust's ownership model?');
131
+print(result.text);
132
+print('Generated in ${result.durationDisplay}');
133
+```
134
+
135
+### Stream a response
136
+
137
+```dart
138
+final buffer = StringBuffer();
139
+
140
+await for (final chunk in engine.streamMessage('Tell me a short story.')) {
141
+ buffer.write(chunk.delta);
142
+
143
+ // Update your UI with the partial text on each chunk.
144
+ setState(() => _displayText = buffer.toString());
145
+
146
+ if (chunk.done) break;
147
+}
148
+```
149
+
150
+### Check engine status
151
+
152
+```dart
153
+final info = await engine.info();
154
+
155
+print(info.status); // EngineStatus.ready
156
+print(info.modelName); // "Qwen 2.5 3B"
157
+print(info.approxMemory); // "~1.93 GB"
158
+print(info.historyLength); // number of turns in the conversation
159
+```
160
+
161
+### Manage conversation history
162
+
163
+```dart
164
+// Retrieve the full history.
165
+final history = await engine.history();
166
+for (final msg in history) {
167
+ print('${msg.role}: ${msg.content}');
168
+}
169
+
170
+// Clear history (keeps the model loaded).
171
+final removed = await engine.clearHistory();
172
+print('Cleared $removed messages.');
173
+
174
+// Seed history from a saved session without running inference.
175
+await engine.pushHistory(ChatMessage.user('Hello from last session!'));
176
+await engine.pushHistory(ChatMessage.assistant('Hi! How can I help today?'));
177
+```
178
+
179
+### One-shot generation (does not affect history)
180
+
181
+```dart
182
+// Useful for prompt enhancement, classification, summarisation, etc.
183
+final result = await engine.generate(
184
+ [
185
+ ChatMessage.system('You are a JSON formatter. Output only valid JSON.'),
186
+ ChatMessage.user('Name: Alice, Age: 30, City: Stockholm'),
187
+ ],
188
+ sampling: SamplingConfig.deterministic(),
189
+);
190
+print(result.text);
191
+```
192
+
193
+### Unload the model
194
+
195
+```dart
196
+// Release GPU / CPU memory when inference is no longer needed.
197
+await engine.unloadModel();
198
+```
199
+
200
+---
201
+
202
+## Model selection
203
+
204
+Use `OndeInference` static helpers to pick a specific model:
205
+
206
+```dart
207
+// Platform-aware default (recommended).
208
+final config = OndeInference.defaultModelConfig();
209
+
210
+// Force a specific model regardless of platform.
211
+final small = OndeInference.qwen251_5bConfig(); // ~941 MB
212
+final medium = OndeInference.qwen253bConfig(); // ~1.93 GB
213
+final coder = OndeInference.qwen25Coder3bConfig(); // ~1.93 GB, code-tuned
214
+
215
+await engine.loadGgufModel(
216
+ medium,
217
+ systemPrompt: 'You are an expert software engineer.',
218
+);
219
+```
220
+
221
+### Supported models
222
+
223
+| Model | Size | Best for |
224
+|-------|------|----------|
225
+| Qwen 2.5 1.5B Instruct Q4\_K\_M | ~941 MB | iOS, tvOS, Android |
226
+| Qwen 2.5 3B Instruct Q4\_K\_M | ~1.93 GB | macOS, Linux, Windows |
227
+| Qwen 2.5 Coder 1.5B Instruct Q4\_K\_M | ~941 MB | Code generation on mobile |
228
+| Qwen 2.5 Coder 3B Instruct Q4\_K\_M | ~1.93 GB | Code generation on desktop |
229
+
230
+---
231
+
232
+## Sampling configuration
233
+
234
+```dart
235
+// All fields are optional — null means "use the engine default".
236
+final sampling = SamplingConfig(
237
+ temperature: 0.7, // Higher = more creative, lower = more focused
238
+ topP: 0.95, // Nucleus sampling cutoff
239
+ topK: 40, // Top-k token limit
240
+ maxTokens: 256, // Maximum reply length in tokens
241
+);
242
+
243
+await engine.setSampling(sampling);
244
+
245
+// Or use a preset:
246
+await engine.setSampling(SamplingConfig.deterministic()); // greedy, temp=0.0
247
+await engine.setSampling(SamplingConfig.mobile()); // temp=0.7, max 128 tokens
248
+await engine.setSampling(SamplingConfig.defaultConfig()); // temp=0.7, max 512 tokens
249
+```
250
+
251
+---
252
+
253
+## Error handling
254
+
255
+All `OndeChatEngine` methods throw `OndeException` on failure:
256
+
257
+```dart
258
+try {
259
+ await engine.loadDefaultModel();
260
+} on OndeException catch (e) {
261
+ debugPrint('Inference error: ${e.message}');
262
+}
263
+```
264
+
265
+Common causes:
266
+- **No model loaded** — calling `sendMessage` before `loadDefaultModel` / `loadGgufModel`
267
+- **Download failure** — check internet connectivity on first run (model files are fetched from HuggingFace Hub)
268
+- **Out of memory** — the 3B model requires ~2 GB of free RAM; use the 1.5B model on constrained devices
269
+
270
+---
271
+
272
+## Running codegen
273
+
274
+The Dart bindings are generated from the Rust source using
275
+`flutter_rust_bridge_codegen`. Run this command from the package root
276
+whenever `rust/src/api.rs` changes:
277
+
278
+```sh
279
+# From onde/sdk/dart/
280
+dart pub get
281
+dart run flutter_rust_bridge_codegen generate
282
+```
283
+
284
+The generated output is committed to `lib/src/frb_generated.dart` (and
285
+platform-specific siblings). A hand-written stub at
286
+`lib/src/frb_generated_stub.dart` stands in for the generated code before
287
+the first codegen run, allowing the package to be compiled and the type
288
+system to be checked without a built Rust binary.
289
+
290
+---
291
+
292
+## Contributing
293
+
294
+Contributions are welcome! The project is hosted at
295
+[github.com/ondeinference/onde](https://github.com/ondeinference/onde).
296
+
297
+- Rust source: `onde/src/`
298
+- Dart bridge Rust crate: `onde/sdk/dart/rust/`
299
+- Dart library: `onde/sdk/dart/lib/`
300
+- Example app: `onde/sdk/dart/example/`
301
+
302
+Please open an issue before submitting a pull request for significant changes.
303
+
304
+---
305
+
306
+## License
307
+
308
+MIT © [Splitfire AB](https://splitfire.se) — see [LICENSE](LICENSE).
\ No newline at end of file
sdk/dart/analysis_options.yaml
new
+13
@@ -0,0 +1,13 @@
1
+include: package:flutter_lints/flutter.yaml
2
+
3
+linter:
4
+ rules:
5
+ - prefer_const_constructors
6
+ - prefer_final_fields
7
+ - use_super_parameters
8
+
9
+analyzer:
10
+ exclude:
11
+ - lib/src/frb_generated.dart
12
+ - lib/src/frb_generated.io.dart
13
+ - lib/src/frb_generated.web.dart
sdk/dart/android/CMakeLists.txt
new
+51
@@ -0,0 +1,51 @@
1
+cmake_minimum_required(VERSION 3.18)
2
+project(onde_inference_dart)
3
+
4
+# ── Rust source directory ─────────────────────────────────────────────────────
5
+# CMakeLists.txt lives in android/, so ../rust resolves to the sibling rust/ dir.
6
+set(RUST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../rust")
7
+
8
+# ── Map Android ABI → Cargo target triple ────────────────────────────────────
9
+if(ANDROID_ABI STREQUAL "arm64-v8a")
10
+ set(CARGO_TARGET "aarch64-linux-android")
11
+elseif(ANDROID_ABI STREQUAL "armeabi-v7a")
12
+ set(CARGO_TARGET "armv7-linux-androideabi")
13
+elseif(ANDROID_ABI STREQUAL "x86_64")
14
+ set(CARGO_TARGET "x86_64-linux-android")
15
+elseif(ANDROID_ABI STREQUAL "x86")
16
+ set(CARGO_TARGET "i686-linux-android")
17
+else()
18
+ message(FATAL_ERROR "Unsupported Android ABI: ${ANDROID_ABI}")
19
+endif()
20
+
21
+# ── Output path for the compiled Rust shared library ─────────────────────────
22
+set(LIB_OUTPUT
23
+ "${RUST_DIR}/target/${CARGO_TARGET}/release/libonde_inference_dart.so"
24
+)
25
+
26
+# ── Custom build step: invoke cargo ──────────────────────────────────────────
27
+# Requires the Android NDK cross-compilation toolchain to be on PATH, or
28
+# a .cargo/config.toml in the Rust crate with the correct linker overrides
29
+# for each Android target.
30
+add_custom_command(
31
+ OUTPUT ${LIB_OUTPUT}
32
+ COMMAND cargo build
33
+ --release
34
+ --target ${CARGO_TARGET}
35
+ --manifest-path "${RUST_DIR}/Cargo.toml"
36
+ WORKING_DIRECTORY ${RUST_DIR}
37
+ COMMENT "Building onde_inference_dart for ${CARGO_TARGET}…"
38
+ VERBATIM
39
+)
40
+
41
+# Dummy target that depends on the cargo output so CMake tracks it correctly.
42
+add_custom_target(onde_inference_dart_cargo_build ALL
43
+ DEPENDS ${LIB_OUTPUT}
44
+)
45
+
46
+# ── Import the built .so as a pre-built shared library ───────────────────────
47
+add_library(onde_inference_dart SHARED IMPORTED GLOBAL)
48
+set_target_properties(onde_inference_dart PROPERTIES
49
+ IMPORTED_LOCATION ${LIB_OUTPUT}
50
+)
51
+add_dependencies(onde_inference_dart onde_inference_dart_cargo_build)
sdk/dart/android/build.gradle
new
+45
@@ -0,0 +1,45 @@
1
+group 'com.ondeinference.onde_inference'
2
+version '1.0'
3
+
4
+buildscript {
5
+ repositories {
6
+ google()
7
+ mavenCentral()
8
+ }
9
+ dependencies {
10
+ classpath 'com.android.tools.build:gradle:7.3.0'
11
+ }
12
+}
13
+
14
+rootProject.allprojects {
15
+ repositories {
16
+ google()
17
+ mavenCentral()
18
+ }
19
+}
20
+
21
+apply plugin: 'com.android.library'
22
+
23
+android {
24
+ compileSdkVersion 33
25
+
26
+ defaultConfig {
27
+ minSdkVersion 21
28
+
29
+ externalNativeBuild {
30
+ cmake {
31
+ cppFlags '-std=c++17'
32
+ arguments '-DANDROID_STL=c++_shared'
33
+ }
34
+ }
35
+ }
36
+
37
+ externalNativeBuild {
38
+ cmake {
39
+ path 'CMakeLists.txt'
40
+ version '3.18.1'
41
+ }
42
+ }
43
+
44
+ namespace 'com.ondeinference.onde_inference'
45
+}
sdk/dart/example/.gitignore
new
+45
@@ -0,0 +1,45 @@
1
+# Miscellaneous
2
+*.class
3
+*.log
4
+*.pyc
5
+*.swp
6
+.DS_Store
7
+.atom/
8
+.build/
9
+.buildlog/
10
+.history
11
+.svn/
12
+.swiftpm/
13
+migrate_working_dir/
14
+
15
+# IntelliJ related
16
+*.iml
17
+*.ipr
18
+*.iws
19
+.idea/
20
+
21
+# The .vscode folder contains launch configuration and tasks you configure in
22
+# VS Code which you may wish to be included in version control, so this line
23
+# is commented out by default.
24
+#.vscode/
25
+
26
+# Flutter/Dart/Pub related
27
+**/doc/api/
28
+**/ios/Flutter/.last_build_id
29
+.dart_tool/
30
+.flutter-plugins-dependencies
31
+.pub-cache/
32
+.pub/
33
+/build/
34
+/coverage/
35
+
36
+# Symbolication related
37
+app.*.symbols
38
+
39
+# Obfuscation related
40
+app.*.map.json
41
+
42
+# Android Studio will place build artifacts here
43
+/android/app/debug
44
+/android/app/profile
45
+/android/app/release
sdk/dart/example/.metadata
new
+33
@@ -0,0 +1,33 @@
1
+# This file tracks properties of this Flutter project.
2
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
3
+#
4
+# This file should be version controlled and should not be manually edited.
5
+
6
+version:
7
+ revision: "db50e20168db8fee486b9abf32fc912de3bc5b6a"
8
+ channel: "stable"
9
+
10
+project_type: app
11
+
12
+# Tracks metadata for the flutter migrate command
13
+migration:
14
+ platforms:
15
+ - platform: root
16
+ create_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
17
+ base_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
18
+ - platform: ios
19
+ create_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
20
+ base_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
21
+ - platform: macos
22
+ create_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
23
+ base_revision: db50e20168db8fee486b9abf32fc912de3bc5b6a
24
+
25
+ # User provided section
26
+
27
+ # List of Local paths (relative to this file) that should be
28
+ # ignored by the migrate tool.
29
+ #
30
+ # Files that are not part of the templates will be ignored by default.
31
+ unmanaged_files:
32
+ - 'lib/main.dart'
33
+ - 'ios/Runner.xcodeproj/project.pbxproj'
sdk/dart/example/README.md
new
+17
@@ -0,0 +1,17 @@
1
+# onde_inference_example
2
+
3
+A new Flutter project.
4
+
5
+## Getting Started
6
+
7
+This project is a starting point for a Flutter application.
8
+
9
+A few resources to get you started if this is your first Flutter project:
10
+
11
+- [Learn Flutter](https://docs.flutter.dev/get-started/learn-flutter)
12
+- [Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
13
+- [Flutter learning resources](https://docs.flutter.dev/reference/learning-resources)
14
+
15
+For help getting started with Flutter development, view the
16
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
17
+samples, guidance on mobile development, and a full API reference.
sdk/dart/example/analysis_options.yaml
new
+28
@@ -0,0 +1,28 @@
1
+# This file configures the analyzer, which statically analyzes Dart code to
2
+# check for errors, warnings, and lints.
3
+#
4
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6
+# invoked from the command line by running `flutter analyze`.
7
+
8
+# The following line activates a set of recommended lints for Flutter apps,
9
+# packages, and plugins designed to encourage good coding practices.
10
+include: package:flutter_lints/flutter.yaml
11
+
12
+linter:
13
+ # The lint rules applied to this project can be customized in the
14
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15
+ # included above or to enable additional rules. A list of all available lints
16
+ # and their documentation is published at https://dart.dev/lints.
17
+ #
18
+ # Instead of disabling a lint rule for the entire project in the
19
+ # section below, it can also be suppressed for a single line of code
20
+ # or a specific dart file by using the `// ignore: name_of_lint` and
21
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22
+ # producing the lint.
23
+ rules:
24
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
25
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26
+
27
+# Additional information about this file can be found at
28
+# https://dart.dev/guides/language/analysis-options
sdk/dart/example/ios/.gitignore
new
+34
@@ -0,0 +1,34 @@
1
+**/dgph
2
+*.mode1v3
3
+*.mode2v3
4
+*.moved-aside
5
+*.pbxuser
6
+*.perspectivev3
7
+**/*sync/
8
+.sconsign.dblite
9
+.tags*
10
+**/.vagrant/
11
+**/DerivedData/
12
+Icon?
13
+**/Pods/
14
+**/.symlinks/
15
+profile
16
+xcuserdata
17
+**/.generated/
18
+Flutter/App.framework
19
+Flutter/Flutter.framework
20
+Flutter/Flutter.podspec
21
+Flutter/Generated.xcconfig
22
+Flutter/ephemeral/
23
+Flutter/app.flx
24
+Flutter/app.zip
25
+Flutter/flutter_assets/
26
+Flutter/flutter_export_environment.sh
27
+ServiceDefinitions.json
28
+Runner/GeneratedPluginRegistrant.*
29
+
30
+# Exceptions to above rules.
31
+!default.mode1v3
32
+!default.mode2v3
33
+!default.pbxuser
34
+!default.perspectivev3
sdk/dart/example/ios/Flutter/AppFrameworkInfo.plist
new
+24
@@ -0,0 +1,24 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>en</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>App</string>
9
+ <key>CFBundleIdentifier</key>
10
+ <string>io.flutter.flutter.app</string>
11
+ <key>CFBundleInfoDictionaryVersion</key>
12
+ <string>6.0</string>
13
+ <key>CFBundleName</key>
14
+ <string>App</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>FMWK</string>
17
+ <key>CFBundleShortVersionString</key>
18
+ <string>1.0</string>
19
+ <key>CFBundleSignature</key>
20
+ <string>????</string>
21
+ <key>CFBundleVersion</key>
22
+ <string>1.0</string>
23
+</dict>
24
+</plist>
sdk/dart/example/ios/Flutter/Debug.xcconfig
new
+2
@@ -0,0 +1,2 @@
1
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2
+#include "Generated.xcconfig"
sdk/dart/example/ios/Flutter/Release.xcconfig
new
+2
@@ -0,0 +1,2 @@
1
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2
+#include "Generated.xcconfig"
sdk/dart/example/ios/Podfile
new
+66
@@ -0,0 +1,66 @@
1
+# Uncomment this line to define a global platform for your project
2
+# platform :ios, '13.0'
3
+
4
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6
+
7
+project 'Runner', {
8
+ 'Debug' => :debug,
9
+ 'Profile' => :release,
10
+ 'Release' => :release,
11
+}
12
+
13
+def flutter_root
14
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15
+ unless File.exist?(generated_xcode_build_settings_path)
16
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17
+ end
18
+
19
+ File.foreach(generated_xcode_build_settings_path) do |line|
20
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
21
+ return matches[1].strip if matches
22
+ end
23
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24
+end
25
+
26
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27
+
28
+flutter_ios_podfile_setup
29
+
30
+target 'Runner' do
31
+ use_frameworks!
32
+
33
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
34
+ target 'RunnerTests' do
35
+ inherit! :search_paths
36
+ end
37
+end
38
+
39
+post_install do |installer|
40
+ installer.pods_project.targets.each do |target|
41
+ flutter_additional_ios_build_settings(target)
42
+ # Xcode 26 (Xcode 17) ships a new linker (ld-prime) that dropped legacy
43
+ # flags used by Flutter's build scripts (-Xlinker, -target, -dynamiclib,
44
+ # -isysroot, -reproducible). Force every pod target to use the classic
45
+ # ld64 linker until Flutter officially supports the new linker.
46
+ target.build_configurations.each do |config|
47
+ config.build_settings['OTHER_LDFLAGS'] ||= ['$(inherited)']
48
+ unless config.build_settings['OTHER_LDFLAGS'].include?('-ld_classic')
49
+ config.build_settings['OTHER_LDFLAGS'] << '-ld_classic'
50
+ end
51
+ end
52
+ end
53
+
54
+ # Also patch the main Runner project targets (not just pods).
55
+ installer.aggregate_targets.each do |aggregate_target|
56
+ aggregate_target.user_project.targets.each do |target|
57
+ target.build_configurations.each do |config|
58
+ config.build_settings['OTHER_LDFLAGS'] ||= ['$(inherited)']
59
+ unless config.build_settings['OTHER_LDFLAGS'].include?('-ld_classic')
60
+ config.build_settings['OTHER_LDFLAGS'] << '-ld_classic'
61
+ end
62
+ end
63
+ end
64
+ aggregate_target.user_project.save
65
+ end
66
+end
sdk/dart/example/ios/Podfile.lock
new
+22
@@ -0,0 +1,22 @@
1
+PODS:
2
+ - Flutter (1.0.0)
3
+ - onde_inference (0.1.0):
4
+ - Flutter
5
+
6
+DEPENDENCIES:
7
+ - Flutter (from `Flutter`)
8
+ - onde_inference (from `.symlinks/plugins/onde_inference/ios`)
9
+
10
+EXTERNAL SOURCES:
11
+ Flutter:
12
+ :path: Flutter
13
+ onde_inference:
14
+ :path: ".symlinks/plugins/onde_inference/ios"
15
+
16
+SPEC CHECKSUMS:
17
+ Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
18
+ onde_inference: ae09386bb943bed458d530d3af9cf1442634e5d1
19
+
20
+PODFILE CHECKSUM: b02416e1885eb65c170e8950e827f65afad13d48
21
+
22
+COCOAPODS: 1.16.2
sdk/dart/example/ios/Runner.xcodeproj/project.pbxproj
new
+741
@@ -0,0 +1,741 @@
1
+// !$*UTF8*$!
2
+{
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 54;
7
+ objects = {
8
+
9
+/* Begin PBXBuildFile section */
10
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
12
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13
+ 590C11E7D00282878CAD5392 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 455C01C5084423BAE3E2A9CA /* Pods_Runner.framework */; };
14
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15
+ 7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */; };
16
+ 845544CF17C06E6FB4F66E17 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F3515E482AA5DCF98138798 /* Pods_RunnerTests.framework */; };
17
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
18
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
19
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
20
+/* End PBXBuildFile section */
21
+
22
+/* Begin PBXContainerItemProxy section */
23
+ 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
24
+ isa = PBXContainerItemProxy;
25
+ containerPortal = 97C146E61CF9000F007C117D /* Project object */;
26
+ proxyType = 1;
27
+ remoteGlobalIDString = 97C146ED1CF9000F007C117D;
28
+ remoteInfo = Runner;
29
+ };
30
+/* End PBXContainerItemProxy section */
31
+
32
+/* Begin PBXCopyFilesBuildPhase section */
33
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
34
+ isa = PBXCopyFilesBuildPhase;
35
+ buildActionMask = 2147483647;
36
+ dstPath = "";
37
+ dstSubfolderSpec = 10;
38
+ files = (
39
+ );
40
+ name = "Embed Frameworks";
41
+ runOnlyForDeploymentPostprocessing = 0;
42
+ };
43
+/* End PBXCopyFilesBuildPhase section */
44
+
45
+/* Begin PBXFileReference section */
46
+ 05F0451B02B92B541DAEB8BE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
47
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
48
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
49
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
50
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
51
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
52
+ 455C01C5084423BAE3E2A9CA /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
53
+ 46253D9B1C966CAFBB827E8B /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
54
+ 50154C8065F35606393E81A6 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
55
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
56
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
57
+ 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
58
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
59
+ 7F3515E482AA5DCF98138798 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
60
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
61
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
62
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
63
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
64
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
65
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
66
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
67
+ D437F0563B7E593939BCA504 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
68
+ DEC4F5703BE207129688C101 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
69
+ F3DB42B22DAB94E7F453E6BD /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
70
+/* End PBXFileReference section */
71
+
72
+/* Begin PBXFrameworksBuildPhase section */
73
+ 2497B413E713B26EB593E311 /* Frameworks */ = {
74
+ isa = PBXFrameworksBuildPhase;
75
+ buildActionMask = 2147483647;
76
+ files = (
77
+ 845544CF17C06E6FB4F66E17 /* Pods_RunnerTests.framework in Frameworks */,
78
+ );
79
+ runOnlyForDeploymentPostprocessing = 0;
80
+ };
81
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
82
+ isa = PBXFrameworksBuildPhase;
83
+ buildActionMask = 2147483647;
84
+ files = (
85
+ 590C11E7D00282878CAD5392 /* Pods_Runner.framework in Frameworks */,
86
+ );
87
+ runOnlyForDeploymentPostprocessing = 0;
88
+ };
89
+/* End PBXFrameworksBuildPhase section */
90
+
91
+/* Begin PBXGroup section */
92
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
93
+ isa = PBXGroup;
94
+ children = (
95
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
96
+ );
97
+ path = RunnerTests;
98
+ sourceTree = "<group>";
99
+ };
100
+ 738D731CE6C7991D810FCB51 /* Pods */ = {
101
+ isa = PBXGroup;
102
+ children = (
103
+ 50154C8065F35606393E81A6 /* Pods-Runner.debug.xcconfig */,
104
+ 05F0451B02B92B541DAEB8BE /* Pods-Runner.release.xcconfig */,
105
+ D437F0563B7E593939BCA504 /* Pods-Runner.profile.xcconfig */,
106
+ F3DB42B22DAB94E7F453E6BD /* Pods-RunnerTests.debug.xcconfig */,
107
+ 46253D9B1C966CAFBB827E8B /* Pods-RunnerTests.release.xcconfig */,
108
+ DEC4F5703BE207129688C101 /* Pods-RunnerTests.profile.xcconfig */,
109
+ );
110
+ name = Pods;
111
+ path = Pods;
112
+ sourceTree = "<group>";
113
+ };
114
+ 9740EEB11CF90186004384FC /* Flutter */ = {
115
+ isa = PBXGroup;
116
+ children = (
117
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
118
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
119
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
120
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
121
+ );
122
+ name = Flutter;
123
+ sourceTree = "<group>";
124
+ };
125
+ 97C146E51CF9000F007C117D = {
126
+ isa = PBXGroup;
127
+ children = (
128
+ 9740EEB11CF90186004384FC /* Flutter */,
129
+ 97C146F01CF9000F007C117D /* Runner */,
130
+ 97C146EF1CF9000F007C117D /* Products */,
131
+ 331C8082294A63A400263BE5 /* RunnerTests */,
132
+ 738D731CE6C7991D810FCB51 /* Pods */,
133
+ 97FE5AB3AC282B4B5358534F /* Frameworks */,
134
+ );
135
+ sourceTree = "<group>";
136
+ };
137
+ 97C146EF1CF9000F007C117D /* Products */ = {
138
+ isa = PBXGroup;
139
+ children = (
140
+ 97C146EE1CF9000F007C117D /* Runner.app */,
141
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
142
+ );
143
+ name = Products;
144
+ sourceTree = "<group>";
145
+ };
146
+ 97C146F01CF9000F007C117D /* Runner */ = {
147
+ isa = PBXGroup;
148
+ children = (
149
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
150
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
151
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
152
+ 97C147021CF9000F007C117D /* Info.plist */,
153
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
154
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
155
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
156
+ 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */,
157
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
158
+ );
159
+ path = Runner;
160
+ sourceTree = "<group>";
161
+ };
162
+ 97FE5AB3AC282B4B5358534F /* Frameworks */ = {
163
+ isa = PBXGroup;
164
+ children = (
165
+ 455C01C5084423BAE3E2A9CA /* Pods_Runner.framework */,
166
+ 7F3515E482AA5DCF98138798 /* Pods_RunnerTests.framework */,
167
+ );
168
+ name = Frameworks;
169
+ sourceTree = "<group>";
170
+ };
171
+/* End PBXGroup section */
172
+
173
+/* Begin PBXNativeTarget section */
174
+ 331C8080294A63A400263BE5 /* RunnerTests */ = {
175
+ isa = PBXNativeTarget;
176
+ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
177
+ buildPhases = (
178
+ E946D061797B66127AE20F9A /* [CP] Check Pods Manifest.lock */,
179
+ 331C807D294A63A400263BE5 /* Sources */,
180
+ 331C807F294A63A400263BE5 /* Resources */,
181
+ 2497B413E713B26EB593E311 /* Frameworks */,
182
+ );
183
+ buildRules = (
184
+ );
185
+ dependencies = (
186
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */,
187
+ );
188
+ name = RunnerTests;
189
+ productName = RunnerTests;
190
+ productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
191
+ productType = "com.apple.product-type.bundle.unit-test";
192
+ };
193
+ 97C146ED1CF9000F007C117D /* Runner */ = {
194
+ isa = PBXNativeTarget;
195
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
196
+ buildPhases = (
197
+ 39D2E72324A5C7C74BE606A7 /* [CP] Check Pods Manifest.lock */,
198
+ 9740EEB61CF901F6004384FC /* Run Script */,
199
+ 97C146EA1CF9000F007C117D /* Sources */,
200
+ 97C146EB1CF9000F007C117D /* Frameworks */,
201
+ 97C146EC1CF9000F007C117D /* Resources */,
202
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
203
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
204
+ );
205
+ buildRules = (
206
+ );
207
+ dependencies = (
208
+ );
209
+ name = Runner;
210
+ productName = Runner;
211
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
212
+ productType = "com.apple.product-type.application";
213
+ };
214
+/* End PBXNativeTarget section */
215
+
216
+/* Begin PBXProject section */
217
+ 97C146E61CF9000F007C117D /* Project object */ = {
218
+ isa = PBXProject;
219
+ attributes = {
220
+ BuildIndependentTargetsInParallel = YES;
221
+ LastUpgradeCheck = 1510;
222
+ ORGANIZATIONNAME = "";
223
+ TargetAttributes = {
224
+ 331C8080294A63A400263BE5 = {
225
+ CreatedOnToolsVersion = 14.0;
226
+ TestTargetID = 97C146ED1CF9000F007C117D;
227
+ };
228
+ 97C146ED1CF9000F007C117D = {
229
+ CreatedOnToolsVersion = 7.3.1;
230
+ LastSwiftMigration = 1100;
231
+ };
232
+ };
233
+ };
234
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
235
+ compatibilityVersion = "Xcode 9.3";
236
+ developmentRegion = en;
237
+ hasScannedForEncodings = 0;
238
+ knownRegions = (
239
+ en,
240
+ Base,
241
+ );
242
+ mainGroup = 97C146E51CF9000F007C117D;
243
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
244
+ projectDirPath = "";
245
+ projectRoot = "";
246
+ targets = (
247
+ 97C146ED1CF9000F007C117D /* Runner */,
248
+ 331C8080294A63A400263BE5 /* RunnerTests */,
249
+ );
250
+ };
251
+/* End PBXProject section */
252
+
253
+/* Begin PBXResourcesBuildPhase section */
254
+ 331C807F294A63A400263BE5 /* Resources */ = {
255
+ isa = PBXResourcesBuildPhase;
256
+ buildActionMask = 2147483647;
257
+ files = (
258
+ );
259
+ runOnlyForDeploymentPostprocessing = 0;
260
+ };
261
+ 97C146EC1CF9000F007C117D /* Resources */ = {
262
+ isa = PBXResourcesBuildPhase;
263
+ buildActionMask = 2147483647;
264
+ files = (
265
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
266
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
267
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
268
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
269
+ );
270
+ runOnlyForDeploymentPostprocessing = 0;
271
+ };
272
+/* End PBXResourcesBuildPhase section */
273
+
274
+/* Begin PBXShellScriptBuildPhase section */
275
+ 39D2E72324A5C7C74BE606A7 /* [CP] Check Pods Manifest.lock */ = {
276
+ isa = PBXShellScriptBuildPhase;
277
+ buildActionMask = 2147483647;
278
+ files = (
279
+ );
280
+ inputFileListPaths = (
281
+ );
282
+ inputPaths = (
283
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
284
+ "${PODS_ROOT}/Manifest.lock",
285
+ );
286
+ name = "[CP] Check Pods Manifest.lock";
287
+ outputFileListPaths = (
288
+ );
289
+ outputPaths = (
290
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
291
+ );
292
+ runOnlyForDeploymentPostprocessing = 0;
293
+ shellPath = /bin/sh;
294
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
295
+ showEnvVarsInLog = 0;
296
+ };
297
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
298
+ isa = PBXShellScriptBuildPhase;
299
+ alwaysOutOfDate = 1;
300
+ buildActionMask = 2147483647;
301
+ files = (
302
+ );
303
+ inputPaths = (
304
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
305
+ );
306
+ name = "Thin Binary";
307
+ outputPaths = (
308
+ );
309
+ runOnlyForDeploymentPostprocessing = 0;
310
+ shellPath = /bin/sh;
311
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
312
+ };
313
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
314
+ isa = PBXShellScriptBuildPhase;
315
+ alwaysOutOfDate = 1;
316
+ buildActionMask = 2147483647;
317
+ files = (
318
+ );
319
+ inputPaths = (
320
+ );
321
+ name = "Run Script";
322
+ outputPaths = (
323
+ );
324
+ runOnlyForDeploymentPostprocessing = 0;
325
+ shellPath = /bin/sh;
326
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
327
+ };
328
+ E946D061797B66127AE20F9A /* [CP] Check Pods Manifest.lock */ = {
329
+ isa = PBXShellScriptBuildPhase;
330
+ buildActionMask = 2147483647;
331
+ files = (
332
+ );
333
+ inputFileListPaths = (
334
+ );
335
+ inputPaths = (
336
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
337
+ "${PODS_ROOT}/Manifest.lock",
338
+ );
339
+ name = "[CP] Check Pods Manifest.lock";
340
+ outputFileListPaths = (
341
+ );
342
+ outputPaths = (
343
+ "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
344
+ );
345
+ runOnlyForDeploymentPostprocessing = 0;
346
+ shellPath = /bin/sh;
347
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
348
+ showEnvVarsInLog = 0;
349
+ };
350
+/* End PBXShellScriptBuildPhase section */
351
+
352
+/* Begin PBXSourcesBuildPhase section */
353
+ 331C807D294A63A400263BE5 /* Sources */ = {
354
+ isa = PBXSourcesBuildPhase;
355
+ buildActionMask = 2147483647;
356
+ files = (
357
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
358
+ );
359
+ runOnlyForDeploymentPostprocessing = 0;
360
+ };
361
+ 97C146EA1CF9000F007C117D /* Sources */ = {
362
+ isa = PBXSourcesBuildPhase;
363
+ buildActionMask = 2147483647;
364
+ files = (
365
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
366
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
367
+ 7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */,
368
+ );
369
+ runOnlyForDeploymentPostprocessing = 0;
370
+ };
371
+/* End PBXSourcesBuildPhase section */
372
+
373
+/* Begin PBXTargetDependency section */
374
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
375
+ isa = PBXTargetDependency;
376
+ target = 97C146ED1CF9000F007C117D /* Runner */;
377
+ targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
378
+ };
379
+/* End PBXTargetDependency section */
380
+
381
+/* Begin PBXVariantGroup section */
382
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
383
+ isa = PBXVariantGroup;
384
+ children = (
385
+ 97C146FB1CF9000F007C117D /* Base */,
386
+ );
387
+ name = Main.storyboard;
388
+ sourceTree = "<group>";
389
+ };
390
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
391
+ isa = PBXVariantGroup;
392
+ children = (
393
+ 97C147001CF9000F007C117D /* Base */,
394
+ );
395
+ name = LaunchScreen.storyboard;
396
+ sourceTree = "<group>";
397
+ };
398
+/* End PBXVariantGroup section */
399
+
400
+/* Begin XCBuildConfiguration section */
401
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
402
+ isa = XCBuildConfiguration;
403
+ buildSettings = {
404
+ ALWAYS_SEARCH_USER_PATHS = NO;
405
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
406
+ CLANG_ANALYZER_NONNULL = YES;
407
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
408
+ CLANG_CXX_LIBRARY = "libc++";
409
+ CLANG_ENABLE_MODULES = YES;
410
+ CLANG_ENABLE_OBJC_ARC = YES;
411
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
412
+ CLANG_WARN_BOOL_CONVERSION = YES;
413
+ CLANG_WARN_COMMA = YES;
414
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
415
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
416
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
417
+ CLANG_WARN_EMPTY_BODY = YES;
418
+ CLANG_WARN_ENUM_CONVERSION = YES;
419
+ CLANG_WARN_INFINITE_RECURSION = YES;
420
+ CLANG_WARN_INT_CONVERSION = YES;
421
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
422
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
423
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
424
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
425
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
426
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
427
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
428
+ CLANG_WARN_UNREACHABLE_CODE = YES;
429
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
430
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
431
+ COPY_PHASE_STRIP = NO;
432
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
433
+ ENABLE_NS_ASSERTIONS = NO;
434
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
435
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
436
+ GCC_C_LANGUAGE_STANDARD = gnu99;
437
+ GCC_NO_COMMON_BLOCKS = YES;
438
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
439
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
440
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
441
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
442
+ GCC_WARN_UNUSED_FUNCTION = YES;
443
+ GCC_WARN_UNUSED_VARIABLE = YES;
444
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
445
+ MTL_ENABLE_DEBUG_INFO = NO;
446
+ SDKROOT = iphoneos;
447
+ SUPPORTED_PLATFORMS = iphoneos;
448
+ TARGETED_DEVICE_FAMILY = "1,2";
449
+ VALIDATE_PRODUCT = YES;
450
+ };
451
+ name = Profile;
452
+ };
453
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
454
+ isa = XCBuildConfiguration;
455
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
456
+ buildSettings = {
457
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
458
+ CLANG_ENABLE_MODULES = YES;
459
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
460
+ DEVELOPMENT_TEAM = 2TQF86ZACD;
461
+ ENABLE_BITCODE = NO;
462
+ INFOPLIST_FILE = Runner/Info.plist;
463
+ LD_RUNPATH_SEARCH_PATHS = (
464
+ "$(inherited)",
465
+ "@executable_path/Frameworks",
466
+ );
467
+ OTHER_LDFLAGS = (
468
+ "$(inherited)",
469
+ "-ld_classic",
470
+ );
471
+ PRODUCT_BUNDLE_IDENTIFIER = com.ondeinference.ondeInferenceExample;
472
+ PRODUCT_NAME = "$(TARGET_NAME)";
473
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
474
+ SWIFT_VERSION = 5.0;
475
+ VERSIONING_SYSTEM = "apple-generic";
476
+ };
477
+ name = Profile;
478
+ };
479
+ 331C8088294A63A400263BE5 /* Debug */ = {
480
+ isa = XCBuildConfiguration;
481
+ baseConfigurationReference = F3DB42B22DAB94E7F453E6BD /* Pods-RunnerTests.debug.xcconfig */;
482
+ buildSettings = {
483
+ BUNDLE_LOADER = "$(TEST_HOST)";
484
+ CODE_SIGN_STYLE = Automatic;
485
+ CURRENT_PROJECT_VERSION = 1;
486
+ GENERATE_INFOPLIST_FILE = YES;
487
+ MARKETING_VERSION = 1.0;
488
+ OTHER_LDFLAGS = (
489
+ "$(inherited)",
490
+ "-ld_classic",
491
+ );
492
+ PRODUCT_BUNDLE_IDENTIFIER = com.ondeinference.ondeInferenceExample.RunnerTests;
493
+ PRODUCT_NAME = "$(TARGET_NAME)";
494
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
495
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
496
+ SWIFT_VERSION = 5.0;
497
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
498
+ };
499
+ name = Debug;
500
+ };
501
+ 331C8089294A63A400263BE5 /* Release */ = {
502
+ isa = XCBuildConfiguration;
503
+ baseConfigurationReference = 46253D9B1C966CAFBB827E8B /* Pods-RunnerTests.release.xcconfig */;
504
+ buildSettings = {
505
+ BUNDLE_LOADER = "$(TEST_HOST)";
506
+ CODE_SIGN_STYLE = Automatic;
507
+ CURRENT_PROJECT_VERSION = 1;
508
+ GENERATE_INFOPLIST_FILE = YES;
509
+ MARKETING_VERSION = 1.0;
510
+ OTHER_LDFLAGS = (
511
+ "$(inherited)",
512
+ "-ld_classic",
513
+ );
514
+ PRODUCT_BUNDLE_IDENTIFIER = com.ondeinference.ondeInferenceExample.RunnerTests;
515
+ PRODUCT_NAME = "$(TARGET_NAME)";
516
+ SWIFT_VERSION = 5.0;
517
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
518
+ };
519
+ name = Release;
520
+ };
521
+ 331C808A294A63A400263BE5 /* Profile */ = {
522
+ isa = XCBuildConfiguration;
523
+ baseConfigurationReference = DEC4F5703BE207129688C101 /* Pods-RunnerTests.profile.xcconfig */;
524
+ buildSettings = {
525
+ BUNDLE_LOADER = "$(TEST_HOST)";
526
+ CODE_SIGN_STYLE = Automatic;
527
+ CURRENT_PROJECT_VERSION = 1;
528
+ GENERATE_INFOPLIST_FILE = YES;
529
+ MARKETING_VERSION = 1.0;
530
+ OTHER_LDFLAGS = (
531
+ "$(inherited)",
532
+ "-ld_classic",
533
+ );
534
+ PRODUCT_BUNDLE_IDENTIFIER = com.ondeinference.ondeInferenceExample.RunnerTests;
535
+ PRODUCT_NAME = "$(TARGET_NAME)";
536
+ SWIFT_VERSION = 5.0;
537
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
538
+ };
539
+ name = Profile;
540
+ };
541
+ 97C147031CF9000F007C117D /* Debug */ = {
542
+ isa = XCBuildConfiguration;
543
+ buildSettings = {
544
+ ALWAYS_SEARCH_USER_PATHS = NO;
545
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
546
+ CLANG_ANALYZER_NONNULL = YES;
547
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
548
+ CLANG_CXX_LIBRARY = "libc++";
549
+ CLANG_ENABLE_MODULES = YES;
550
+ CLANG_ENABLE_OBJC_ARC = YES;
551
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
552
+ CLANG_WARN_BOOL_CONVERSION = YES;
553
+ CLANG_WARN_COMMA = YES;
554
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
555
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
556
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
557
+ CLANG_WARN_EMPTY_BODY = YES;
558
+ CLANG_WARN_ENUM_CONVERSION = YES;
559
+ CLANG_WARN_INFINITE_RECURSION = YES;
560
+ CLANG_WARN_INT_CONVERSION = YES;
561
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
562
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
563
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
564
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
565
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
566
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
567
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
568
+ CLANG_WARN_UNREACHABLE_CODE = YES;
569
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
570
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
571
+ COPY_PHASE_STRIP = NO;
572
+ DEBUG_INFORMATION_FORMAT = dwarf;
573
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
574
+ ENABLE_TESTABILITY = YES;
575
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
576
+ GCC_C_LANGUAGE_STANDARD = gnu99;
577
+ GCC_DYNAMIC_NO_PIC = NO;
578
+ GCC_NO_COMMON_BLOCKS = YES;
579
+ GCC_OPTIMIZATION_LEVEL = 0;
580
+ GCC_PREPROCESSOR_DEFINITIONS = (
581
+ "DEBUG=1",
582
+ "$(inherited)",
583
+ );
584
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
585
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
586
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
587
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
588
+ GCC_WARN_UNUSED_FUNCTION = YES;
589
+ GCC_WARN_UNUSED_VARIABLE = YES;
590
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
591
+ MTL_ENABLE_DEBUG_INFO = YES;
592
+ ONLY_ACTIVE_ARCH = YES;
593
+ SDKROOT = iphoneos;
594
+ TARGETED_DEVICE_FAMILY = "1,2";
595
+ };
596
+ name = Debug;
597
+ };
598
+ 97C147041CF9000F007C117D /* Release */ = {
599
+ isa = XCBuildConfiguration;
600
+ buildSettings = {
601
+ ALWAYS_SEARCH_USER_PATHS = NO;
602
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
603
+ CLANG_ANALYZER_NONNULL = YES;
604
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
605
+ CLANG_CXX_LIBRARY = "libc++";
606
+ CLANG_ENABLE_MODULES = YES;
607
+ CLANG_ENABLE_OBJC_ARC = YES;
608
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
609
+ CLANG_WARN_BOOL_CONVERSION = YES;
610
+ CLANG_WARN_COMMA = YES;
611
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
612
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
613
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
614
+ CLANG_WARN_EMPTY_BODY = YES;
615
+ CLANG_WARN_ENUM_CONVERSION = YES;
616
+ CLANG_WARN_INFINITE_RECURSION = YES;
617
+ CLANG_WARN_INT_CONVERSION = YES;
618
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
619
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
620
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
621
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
622
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
623
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
624
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
625
+ CLANG_WARN_UNREACHABLE_CODE = YES;
626
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
627
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
628
+ COPY_PHASE_STRIP = NO;
629
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
630
+ ENABLE_NS_ASSERTIONS = NO;
631
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
632
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
633
+ GCC_C_LANGUAGE_STANDARD = gnu99;
634
+ GCC_NO_COMMON_BLOCKS = YES;
635
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
636
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
637
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
638
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
639
+ GCC_WARN_UNUSED_FUNCTION = YES;
640
+ GCC_WARN_UNUSED_VARIABLE = YES;
641
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
642
+ MTL_ENABLE_DEBUG_INFO = NO;
643
+ SDKROOT = iphoneos;
644
+ SUPPORTED_PLATFORMS = iphoneos;
645
+ SWIFT_COMPILATION_MODE = wholemodule;
646
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
647
+ TARGETED_DEVICE_FAMILY = "1,2";
648
+ VALIDATE_PRODUCT = YES;
649
+ };
650
+ name = Release;
651
+ };
652
+ 97C147061CF9000F007C117D /* Debug */ = {
653
+ isa = XCBuildConfiguration;
654
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
655
+ buildSettings = {
656
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
657
+ CLANG_ENABLE_MODULES = YES;
658
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
659
+ DEVELOPMENT_TEAM = 2TQF86ZACD;
660
+ ENABLE_BITCODE = NO;
661
+ INFOPLIST_FILE = Runner/Info.plist;
662
+ LD_RUNPATH_SEARCH_PATHS = (
663
+ "$(inherited)",
664
+ "@executable_path/Frameworks",
665
+ );
666
+ OTHER_LDFLAGS = (
667
+ "$(inherited)",
668
+ "-ld_classic",
669
+ );
670
+ PRODUCT_BUNDLE_IDENTIFIER = com.ondeinference.ondeInferenceExample;
671
+ PRODUCT_NAME = "$(TARGET_NAME)";
672
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
673
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
674
+ SWIFT_VERSION = 5.0;
675
+ VERSIONING_SYSTEM = "apple-generic";
676
+ };
677
+ name = Debug;
678
+ };
679
+ 97C147071CF9000F007C117D /* Release */ = {
680
+ isa = XCBuildConfiguration;
681
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
682
+ buildSettings = {
683
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
684
+ CLANG_ENABLE_MODULES = YES;
685
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
686
+ DEVELOPMENT_TEAM = 2TQF86ZACD;
687
+ ENABLE_BITCODE = NO;
688
+ INFOPLIST_FILE = Runner/Info.plist;
689
+ LD_RUNPATH_SEARCH_PATHS = (
690
+ "$(inherited)",
691
+ "@executable_path/Frameworks",
692
+ );
693
+ OTHER_LDFLAGS = (
694
+ "$(inherited)",
695
+ "-ld_classic",
696
+ );
697
+ PRODUCT_BUNDLE_IDENTIFIER = com.ondeinference.ondeInferenceExample;
698
+ PRODUCT_NAME = "$(TARGET_NAME)";
699
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
700
+ SWIFT_VERSION = 5.0;
701
+ VERSIONING_SYSTEM = "apple-generic";
702
+ };
703
+ name = Release;
704
+ };
705
+/* End XCBuildConfiguration section */
706
+
707
+/* Begin XCConfigurationList section */
708
+ 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
709
+ isa = XCConfigurationList;
710
+ buildConfigurations = (
711
+ 331C8088294A63A400263BE5 /* Debug */,
712
+ 331C8089294A63A400263BE5 /* Release */,
713
+ 331C808A294A63A400263BE5 /* Profile */,
714
+ );
715
+ defaultConfigurationIsVisible = 0;
716
+ defaultConfigurationName = Release;
717
+ };
718
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
719
+ isa = XCConfigurationList;
720
+ buildConfigurations = (
721
+ 97C147031CF9000F007C117D /* Debug */,
722
+ 97C147041CF9000F007C117D /* Release */,
723
+ 249021D3217E4FDB00AE95B9 /* Profile */,
724
+ );
725
+ defaultConfigurationIsVisible = 0;
726
+ defaultConfigurationName = Release;
727
+ };
728
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
729
+ isa = XCConfigurationList;
730
+ buildConfigurations = (
731
+ 97C147061CF9000F007C117D /* Debug */,
732
+ 97C147071CF9000F007C117D /* Release */,
733
+ 249021D4217E4FDB00AE95B9 /* Profile */,
734
+ );
735
+ defaultConfigurationIsVisible = 0;
736
+ defaultConfigurationName = Release;
737
+ };
738
+/* End XCConfigurationList section */
739
+ };
740
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
741
+}
sdk/dart/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new
+7
@@ -0,0 +1,7 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:">
6
+ </FileRef>
7
+</Workspace>
sdk/dart/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new
+8
@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+ <key>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+</dict>
8
+</plist>
sdk/dart/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new
+8
@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+ <key>PreviewsEnabled</key>
6
+ <false/>
7
+</dict>
8
+</plist>
sdk/dart/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new
+101
@@ -0,0 +1,101 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Scheme
3
+ LastUpgradeVersion = "1510"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
18
+ BuildableName = "Runner.app"
19
+ BlueprintName = "Runner"
20
+ ReferencedContainer = "container:Runner.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ buildConfiguration = "Debug"
27
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
+ customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
30
+ shouldUseLaunchSchemeArgsEnv = "YES">
31
+ <MacroExpansion>
32
+ <BuildableReference
33
+ BuildableIdentifier = "primary"
34
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
35
+ BuildableName = "Runner.app"
36
+ BlueprintName = "Runner"
37
+ ReferencedContainer = "container:Runner.xcodeproj">
38
+ </BuildableReference>
39
+ </MacroExpansion>
40
+ <Testables>
41
+ <TestableReference
42
+ skipped = "NO"
43
+ parallelizable = "YES">
44
+ <BuildableReference
45
+ BuildableIdentifier = "primary"
46
+ BlueprintIdentifier = "331C8080294A63A400263BE5"
47
+ BuildableName = "RunnerTests.xctest"
48
+ BlueprintName = "RunnerTests"
49
+ ReferencedContainer = "container:Runner.xcodeproj">
50
+ </BuildableReference>
51
+ </TestableReference>
52
+ </Testables>
53
+ </TestAction>
54
+ <LaunchAction
55
+ buildConfiguration = "Debug"
56
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
57
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
58
+ customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
59
+ launchStyle = "0"
60
+ useCustomWorkingDirectory = "NO"
61
+ ignoresPersistentStateOnLaunch = "NO"
62
+ debugDocumentVersioning = "YES"
63
+ debugServiceExtension = "internal"
64
+ enableGPUValidationMode = "1"
65
+ allowLocationSimulation = "YES">
66
+ <BuildableProductRunnable
67
+ runnableDebuggingMode = "0">
68
+ <BuildableReference
69
+ BuildableIdentifier = "primary"
70
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
71
+ BuildableName = "Runner.app"
72
+ BlueprintName = "Runner"
73
+ ReferencedContainer = "container:Runner.xcodeproj">
74
+ </BuildableReference>
75
+ </BuildableProductRunnable>
76
+ </LaunchAction>
77
+ <ProfileAction
78
+ buildConfiguration = "Profile"
79
+ shouldUseLaunchSchemeArgsEnv = "YES"
80
+ savedToolIdentifier = ""
81
+ useCustomWorkingDirectory = "NO"
82
+ debugDocumentVersioning = "YES">
83
+ <BuildableProductRunnable
84
+ runnableDebuggingMode = "0">
85
+ <BuildableReference
86
+ BuildableIdentifier = "primary"
87
+ BlueprintIdentifier = "97C146ED1CF9000F007C117D"
88
+ BuildableName = "Runner.app"
89
+ BlueprintName = "Runner"
90
+ ReferencedContainer = "container:Runner.xcodeproj">
91
+ </BuildableReference>
92
+ </BuildableProductRunnable>
93
+ </ProfileAction>
94
+ <AnalyzeAction
95
+ buildConfiguration = "Debug">
96
+ </AnalyzeAction>
97
+ <ArchiveAction
98
+ buildConfiguration = "Release"
99
+ revealArchiveInOrganizer = "YES">
100
+ </ArchiveAction>
101
+</Scheme>
sdk/dart/example/ios/Runner.xcworkspace/contents.xcworkspacedata
new
+10
@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "group:Runner.xcodeproj">
6
+ </FileRef>
7
+ <FileRef
8
+ location = "group:Pods/Pods.xcodeproj">
9
+ </FileRef>
10
+</Workspace>
sdk/dart/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new
+8
@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+ <key>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+</dict>
8
+</plist>
sdk/dart/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new
+8
@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+ <key>PreviewsEnabled</key>
6
+ <false/>
7
+</dict>
8
+</plist>
sdk/dart/example/ios/Runner/AppDelegate.swift
new
+16
@@ -0,0 +1,16 @@
1
+import Flutter
2
+import UIKit
3
+
4
+@main
5
+@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
6
+ override func application(
7
+ _ application: UIApplication,
8
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9
+ ) -> Bool {
10
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
11
+ }
12
+
13
+ func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
14
+ GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
15
+ }
16
+}
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new
+122
@@ -0,0 +1,122 @@
1
+{
2
+ "images" : [
3
+ {
4
+ "size" : "20x20",
5
+ "idiom" : "iphone",
6
+ "filename" : "Icon-App-20x20@2x.png",
7
+ "scale" : "2x"
8
+ },
9
+ {
10
+ "size" : "20x20",
11
+ "idiom" : "iphone",
12
+ "filename" : "Icon-App-20x20@3x.png",
13
+ "scale" : "3x"
14
+ },
15
+ {
16
+ "size" : "29x29",
17
+ "idiom" : "iphone",
18
+ "filename" : "Icon-App-29x29@1x.png",
19
+ "scale" : "1x"
20
+ },
21
+ {
22
+ "size" : "29x29",
23
+ "idiom" : "iphone",
24
+ "filename" : "Icon-App-29x29@2x.png",
25
+ "scale" : "2x"
26
+ },
27
+ {
28
+ "size" : "29x29",
29
+ "idiom" : "iphone",
30
+ "filename" : "Icon-App-29x29@3x.png",
31
+ "scale" : "3x"
32
+ },
33
+ {
34
+ "size" : "40x40",
35
+ "idiom" : "iphone",
36
+ "filename" : "Icon-App-40x40@2x.png",
37
+ "scale" : "2x"
38
+ },
39
+ {
40
+ "size" : "40x40",
41
+ "idiom" : "iphone",
42
+ "filename" : "Icon-App-40x40@3x.png",
43
+ "scale" : "3x"
44
+ },
45
+ {
46
+ "size" : "60x60",
47
+ "idiom" : "iphone",
48
+ "filename" : "Icon-App-60x60@2x.png",
49
+ "scale" : "2x"
50
+ },
51
+ {
52
+ "size" : "60x60",
53
+ "idiom" : "iphone",
54
+ "filename" : "Icon-App-60x60@3x.png",
55
+ "scale" : "3x"
56
+ },
57
+ {
58
+ "size" : "20x20",
59
+ "idiom" : "ipad",
60
+ "filename" : "Icon-App-20x20@1x.png",
61
+ "scale" : "1x"
62
+ },
63
+ {
64
+ "size" : "20x20",
65
+ "idiom" : "ipad",
66
+ "filename" : "Icon-App-20x20@2x.png",
67
+ "scale" : "2x"
68
+ },
69
+ {
70
+ "size" : "29x29",
71
+ "idiom" : "ipad",
72
+ "filename" : "Icon-App-29x29@1x.png",
73
+ "scale" : "1x"
74
+ },
75
+ {
76
+ "size" : "29x29",
77
+ "idiom" : "ipad",
78
+ "filename" : "Icon-App-29x29@2x.png",
79
+ "scale" : "2x"
80
+ },
81
+ {
82
+ "size" : "40x40",
83
+ "idiom" : "ipad",
84
+ "filename" : "Icon-App-40x40@1x.png",
85
+ "scale" : "1x"
86
+ },
87
+ {
88
+ "size" : "40x40",
89
+ "idiom" : "ipad",
90
+ "filename" : "Icon-App-40x40@2x.png",
91
+ "scale" : "2x"
92
+ },
93
+ {
94
+ "size" : "76x76",
95
+ "idiom" : "ipad",
96
+ "filename" : "Icon-App-76x76@1x.png",
97
+ "scale" : "1x"
98
+ },
99
+ {
100
+ "size" : "76x76",
101
+ "idiom" : "ipad",
102
+ "filename" : "Icon-App-76x76@2x.png",
103
+ "scale" : "2x"
104
+ },
105
+ {
106
+ "size" : "83.5x83.5",
107
+ "idiom" : "ipad",
108
+ "filename" : "Icon-App-83.5x83.5@2x.png",
109
+ "scale" : "2x"
110
+ },
111
+ {
112
+ "size" : "1024x1024",
113
+ "idiom" : "ios-marketing",
114
+ "filename" : "Icon-App-1024x1024@1x.png",
115
+ "scale" : "1x"
116
+ }
117
+ ],
118
+ "info" : {
119
+ "version" : 1,
120
+ "author" : "xcode"
121
+ }
122
+}
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new
+23
@@ -0,0 +1,23 @@
1
+{
2
+ "images" : [
3
+ {
4
+ "idiom" : "universal",
5
+ "filename" : "LaunchImage.png",
6
+ "scale" : "1x"
7
+ },
8
+ {
9
+ "idiom" : "universal",
10
+ "filename" : "LaunchImage@2x.png",
11
+ "scale" : "2x"
12
+ },
13
+ {
14
+ "idiom" : "universal",
15
+ "filename" : "LaunchImage@3x.png",
16
+ "scale" : "3x"
17
+ }
18
+ ],
19
+ "info" : {
20
+ "version" : 1,
21
+ "author" : "xcode"
22
+ }
23
+}
sdk/dart/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
Binary files /dev/null and b/sdk/dart/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
sdk/dart/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new
+5
@@ -0,0 +1,5 @@
1
+# Launch Screen Assets
2
+
3
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4
+
5
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
sdk/dart/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
new
+37
@@ -0,0 +1,37 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3
+ <dependencies>
4
+ <deployment identifier="iOS"/>
5
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
6
+ </dependencies>
7
+ <scenes>
8
+ <!--View Controller-->
9
+ <scene sceneID="EHf-IW-A2E">
10
+ <objects>
11
+ <viewController id="01J-lp-oVM" sceneMemberID="viewController">
12
+ <layoutGuides>
13
+ <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
14
+ <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
15
+ </layoutGuides>
16
+ <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
17
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18
+ <subviews>
19
+ <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
20
+ </imageView>
21
+ </subviews>
22
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
23
+ <constraints>
24
+ <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
25
+ <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
26
+ </constraints>
27
+ </view>
28
+ </viewController>
29
+ <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
30
+ </objects>
31
+ <point key="canvasLocation" x="53" y="375"/>
32
+ </scene>
33
+ </scenes>
34
+ <resources>
35
+ <image name="LaunchImage" width="168" height="185"/>
36
+ </resources>
37
+</document>
sdk/dart/example/ios/Runner/Base.lproj/Main.storyboard
new
+26
@@ -0,0 +1,26 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
3
+ <dependencies>
4
+ <deployment identifier="iOS"/>
5
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
6
+ </dependencies>
7
+ <scenes>
8
+ <!--Flutter View Controller-->
9
+ <scene sceneID="tne-QT-ifu">
10
+ <objects>
11
+ <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
12
+ <layoutGuides>
13
+ <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
14
+ <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
15
+ </layoutGuides>
16
+ <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
17
+ <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
18
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
19
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
20
+ </view>
21
+ </viewController>
22
+ <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
23
+ </objects>
24
+ </scene>
25
+ </scenes>
26
+</document>
sdk/dart/example/ios/Runner/Info.plist
new
+93
@@ -0,0 +1,93 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
3
+ "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
4
+<plist version="1.0">
5
+<dict>
6
+ <key>CADisableMinimumFrameDurationOnPhone</key>
7
+ <true />
8
+ <key>CFBundleDevelopmentRegion</key>
9
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
10
+ <key>CFBundleDisplayName</key>
11
+ <string>Onde Inference Example</string>
12
+ <key>CFBundleExecutable</key>
13
+ <string>$(EXECUTABLE_NAME)</string>
14
+ <key>CFBundleIdentifier</key>
15
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
16
+ <key>CFBundleInfoDictionaryVersion</key>
17
+ <string>6.0</string>
18
+ <key>CFBundleName</key>
19
+ <string>onde_inference_example</string>
20
+ <key>CFBundlePackageType</key>
21
+ <string>APPL</string>
22
+ <key>CFBundleShortVersionString</key>
23
+ <string>$(FLUTTER_BUILD_NAME)</string>
24
+ <key>CFBundleSignature</key>
25
+ <string>????</string>
26
+ <key>CFBundleVersion</key>
27
+ <string>$(FLUTTER_BUILD_NUMBER)</string>
28
+ <key>LSRequiresIPhoneOS</key>
29
+ <true />
30
+ <key>UIApplicationSceneManifest</key>
31
+ <dict>
32
+ <key>UIApplicationSupportsMultipleScenes</key>
33
+ <false />
34
+ <key>UISceneConfigurations</key>
35
+ <dict>
36
+ <key>UIWindowSceneSessionRoleApplication</key>
37
+ <array>
38
+ <dict>
39
+ <key>UISceneClassName</key>
40
+ <string>UIWindowScene</string>
41
+ <key>UISceneConfigurationName</key>
42
+ <string>flutter</string>
43
+ <key>UISceneDelegateClassName</key>
44
+ <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
45
+ <key>UISceneStoryboardFile</key>
46
+ <string>Main</string>
47
+ </dict>
48
+ </array>
49
+ </dict>
50
+ </dict>
51
+ <key>UIApplicationSupportsIndirectInputEvents</key>
52
+ <true />
53
+ <key>UILaunchStoryboardName</key>
54
+ <string>LaunchScreen</string>
55
+ <key>UIMainStoryboardFile</key>
56
+ <string>Main</string>
57
+ <key>UISupportedInterfaceOrientations</key>
58
+ <array>
59
+ <string>UIInterfaceOrientationPortrait</string>
60
+ <string>UIInterfaceOrientationLandscapeLeft</string>
61
+ <string>UIInterfaceOrientationLandscapeRight</string>
62
+ </array>
63
+ <key>UISupportedInterfaceOrientations~ipad</key>
64
+ <array>
65
+ <string>UIInterfaceOrientationPortrait</string>
66
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
67
+ <string>UIInterfaceOrientationLandscapeLeft</string>
68
+ <string>UIInterfaceOrientationLandscapeRight</string>
69
+ </array>
70
+ <key>NSAppTransportSecurity</key>
71
+ <dict>
72
+ <key>NSAllowsArbitraryLoads</key>
73
+ <false />
74
+ <key>NSExceptionDomains</key>
75
+ <dict>
76
+ <key>huggingface.co</key>
77
+ <dict>
78
+ <key>NSExceptionAllowsInsecureHTTPLoads</key>
79
+ <false />
80
+ <key>NSIncludesSubdomains</key>
81
+ <true />
82
+ </dict>
83
+ <key>cdn-lfs.huggingface.co</key>
84
+ <dict>
85
+ <key>NSExceptionAllowsInsecureHTTPLoads</key>
86
+ <false />
87
+ <key>NSIncludesSubdomains</key>
88
+ <true />
89
+ </dict>
90
+ </dict>
91
+ </dict>
92
+</dict>
93
+</plist>
sdk/dart/example/ios/Runner/Runner-Bridging-Header.h
new
+1
@@ -0,0 +1 @@
1
+#import "GeneratedPluginRegistrant.h"
sdk/dart/example/ios/Runner/SceneDelegate.swift
new
+6
@@ -0,0 +1,6 @@
1
+import Flutter
2
+import UIKit
3
+
4
+class SceneDelegate: FlutterSceneDelegate {
5
+
6
+}
sdk/dart/example/ios/RunnerTests/RunnerTests.swift
new
+12
@@ -0,0 +1,12 @@
1
+import Flutter
2
+import UIKit
3
+import XCTest
4
+
5
+class RunnerTests: XCTestCase {
6
+
7
+ func testExample() {
8
+ // If you add code to the Runner application, consider adding tests here.
9
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10
+ }
11
+
12
+}
sdk/dart/example/lib/main.dart
new
+693
@@ -0,0 +1,693 @@
1
+// Copyright 2024 Onde Inference (Splitfire AB). All rights reserved.
2
+// Use of this source code is governed by the MIT license found in LICENSE.
3
+//
4
+// example/lib/main.dart
5
+//
6
+// Complete Material 3 Flutter chat app demonstrating the onde_inference SDK:
7
+// * Synchronous OndeChatEngine() factory constructor (no await, no null)
8
+// * Platform-aware default model loading via loadDefaultModel() extension
9
+// * Multi-turn streaming chat via streamMessage(message:)
10
+// * EngineInfo display using EngineInfoX.historyLengthInt extension
11
+// * OndeError sealed-class error handling (not OndeException)
12
+// * Sampling preset selector (creative / precise / fast)
13
+// * Unload / reload model flow with live status bar
14
+
15
+import 'dart:async';
16
+
17
+import 'package:flutter/material.dart';
18
+import 'package:onde_inference/onde_inference.dart';
19
+
20
+// ---------------------------------------------------------------------------
21
+// Entry point
22
+// ---------------------------------------------------------------------------
23
+
24
+void main() async {
25
+ WidgetsFlutterBinding.ensureInitialized();
26
+ await OndeInference.init();
27
+ runApp(const OndeInferenceApp());
28
+}
29
+
30
+// ---------------------------------------------------------------------------
31
+// Root app
32
+// ---------------------------------------------------------------------------
33
+
34
+class OndeInferenceApp extends StatelessWidget {
35
+ const OndeInferenceApp({super.key});
36
+
37
+ @override
38
+ Widget build(BuildContext context) {
39
+ return MaterialApp(
40
+ title: 'Onde Inference',
41
+ debugShowCheckedModeBanner: false,
42
+ theme: ThemeData(
43
+ colorScheme: ColorScheme.fromSeed(
44
+ seedColor: const Color(0xFF6750A4),
45
+ brightness: Brightness.light,
46
+ ),
47
+ useMaterial3: true,
48
+ ),
49
+ darkTheme: ThemeData(
50
+ colorScheme: ColorScheme.fromSeed(
51
+ seedColor: const Color(0xFF6750A4),
52
+ brightness: Brightness.dark,
53
+ ),
54
+ useMaterial3: true,
55
+ ),
56
+ home: const ChatScreen(),
57
+ );
58
+ }
59
+}
60
+
61
+// ---------------------------------------------------------------------------
62
+// Chat message model
63
+// ---------------------------------------------------------------------------
64
+
65
+enum _Role { user, assistant }
66
+
67
+class _Message {
68
+ final _Role role;
69
+ final String text;
70
+ final bool isStreaming;
71
+
72
+ const _Message({
73
+ required this.role,
74
+ required this.text,
75
+ this.isStreaming = false,
76
+ });
77
+
78
+ _Message copyWith({String? text, bool? isStreaming}) => _Message(
79
+ role: role,
80
+ text: text ?? this.text,
81
+ isStreaming: isStreaming ?? this.isStreaming,
82
+ );
83
+}
84
+
85
+// ---------------------------------------------------------------------------
86
+// Sampling preset enum
87
+// ---------------------------------------------------------------------------
88
+
89
+enum _SamplingPreset { creative, precise, fast }
90
+
91
+extension _SamplingPresetExt on _SamplingPreset {
92
+ String get label => switch (this) {
93
+ _SamplingPreset.creative => 'Creative',
94
+ _SamplingPreset.precise => 'Precise',
95
+ _SamplingPreset.fast => 'Fast',
96
+ };
97
+
98
+ SamplingConfig get config => switch (this) {
99
+ _SamplingPreset.creative => OndeInference.defaultSamplingConfig(),
100
+ _SamplingPreset.precise => OndeInference.deterministicSamplingConfig(),
101
+ _SamplingPreset.fast => OndeInference.mobileSamplingConfig(),
102
+ };
103
+}
104
+
105
+// ---------------------------------------------------------------------------
106
+// ChatScreen
107
+// ---------------------------------------------------------------------------
108
+
109
+class ChatScreen extends StatefulWidget {
110
+ const ChatScreen({super.key});
111
+
112
+ @override
113
+ State<ChatScreen> createState() => _ChatScreenState();
114
+}
115
+
116
+class _ChatScreenState extends State<ChatScreen> {
117
+ // OndeChatEngine() is a synchronous factory constructor -- no Future, no null.
118
+ final OndeChatEngine _engine = OndeChatEngine();
119
+
120
+ EngineInfo _engineInfo = EngineInfo(
121
+ status: EngineStatus.unloaded,
122
+ historyLength: BigInt.zero,
123
+ );
124
+
125
+ final List<_Message> _messages = [];
126
+ final TextEditingController _inputController = TextEditingController();
127
+ final ScrollController _scrollController = ScrollController();
128
+
129
+ bool _isModelLoading = false;
130
+ String _loadingStatus = 'Tap "Load model" to begin.';
131
+ String? _errorBanner;
132
+ bool _isGenerating = false;
133
+ _SamplingPreset _samplingPreset = _SamplingPreset.creative;
134
+
135
+ @override
136
+ void initState() {
137
+ super.initState();
138
+ _loadModel();
139
+ }
140
+
141
+ @override
142
+ void dispose() {
143
+ _inputController.dispose();
144
+ _scrollController.dispose();
145
+ super.dispose();
146
+ }
147
+
148
+ // --------------------------------------------------------------------------
149
+ // Scroll helper
150
+ // --------------------------------------------------------------------------
151
+
152
+ void _scrollToBottom() {
153
+ WidgetsBinding.instance.addPostFrameCallback((_) {
154
+ if (_scrollController.hasClients) {
155
+ _scrollController.animateTo(
156
+ _scrollController.position.maxScrollExtent,
157
+ duration: const Duration(milliseconds: 200),
158
+ curve: Curves.easeOut,
159
+ );
160
+ }
161
+ });
162
+ }
163
+
164
+ // --------------------------------------------------------------------------
165
+ // Engine management
166
+ // --------------------------------------------------------------------------
167
+
168
+ Future<void> _loadModel() async {
169
+ setState(() {
170
+ _isModelLoading = true;
171
+ _loadingStatus = 'Downloading / loading model…';
172
+ _errorBanner = null;
173
+ });
174
+ try {
175
+ final elapsed = await _engine.loadDefaultModel(
176
+ systemPrompt: 'You are a helpful, concise assistant.',
177
+ sampling: _samplingPreset.config,
178
+ );
179
+ final info = await _engine.info();
180
+ setState(() {
181
+ _isModelLoading = false;
182
+ _engineInfo = info;
183
+ _loadingStatus =
184
+ 'Loaded ${info.modelName ?? "model"} in ${elapsed.toStringAsFixed(1)}s';
185
+ });
186
+ } on OndeError catch (e) {
187
+ setState(() {
188
+ _isModelLoading = false;
189
+ _loadingStatus = 'Load failed.';
190
+ _errorBanner = e.toString();
191
+ });
192
+ }
193
+ }
194
+
195
+ Future<void> _unloadModel() async {
196
+ await _engine.unloadModel();
197
+ final info = await _engine.info();
198
+ setState(() {
199
+ _engineInfo = info;
200
+ _messages.clear();
201
+ _loadingStatus = 'Model unloaded.';
202
+ });
203
+ }
204
+
205
+ Future<void> _clearHistory() async {
206
+ final removed = await _engine.clearHistoryCount();
207
+ final info = await _engine.info();
208
+ setState(() {
209
+ _messages.clear();
210
+ _engineInfo = info;
211
+ });
212
+ if (mounted) {
213
+ ScaffoldMessenger.of(context).showSnackBar(
214
+ SnackBar(content: Text('Cleared $removed messages.')),
215
+ );
216
+ }
217
+ }
218
+
219
+ Future<void> _sendMessage() async {
220
+ final text = _inputController.text.trim();
221
+ if (text.isEmpty ||
222
+ _isGenerating ||
223
+ _engineInfo.status != EngineStatus.ready) {
224
+ return;
225
+ }
226
+ _inputController.clear();
227
+ setState(() {
228
+ _messages.add(_Message(role: _Role.user, text: text));
229
+ _messages.add(const _Message(
230
+ role: _Role.assistant,
231
+ text: '',
232
+ isStreaming: true,
233
+ ));
234
+ _isGenerating = true;
235
+ _errorBanner = null;
236
+ });
237
+ _scrollToBottom();
238
+
239
+ final buffer = StringBuffer();
240
+ try {
241
+ await for (final chunk in _engine.streamMessage(message: text)) {
242
+ if (!mounted) break;
243
+ buffer.write(chunk.delta);
244
+ setState(() {
245
+ _messages[_messages.length - 1] =
246
+ _messages.last.copyWith(text: buffer.toString());
247
+ });
248
+ _scrollToBottom();
249
+ if (chunk.done) break;
250
+ }
251
+ final info = await _engine.info();
252
+ setState(() {
253
+ _messages[_messages.length - 1] =
254
+ _messages.last.copyWith(isStreaming: false);
255
+ _isGenerating = false;
256
+ _engineInfo = info;
257
+ });
258
+ } on OndeError catch (e) {
259
+ setState(() {
260
+ _messages[_messages.length - 1] = _messages.last.copyWith(
261
+ text: '⚠ ${e.toString()}',
262
+ isStreaming: false,
263
+ );
264
+ _isGenerating = false;
265
+ _errorBanner = e.toString();
266
+ });
267
+ }
268
+ _scrollToBottom();
269
+ }
270
+
271
+ // --------------------------------------------------------------------------
272
+ // Build
273
+ // --------------------------------------------------------------------------
274
+
275
+ @override
276
+ Widget build(BuildContext context) {
277
+ final isReady = _engineInfo.status == EngineStatus.ready;
278
+ return Scaffold(
279
+ appBar: AppBar(
280
+ title: const Text('Onde Inference'),
281
+ centerTitle: false,
282
+ actions: [
283
+ if (isReady)
284
+ IconButton(
285
+ icon: const Icon(Icons.delete_sweep_outlined),
286
+ tooltip: 'Clear history',
287
+ onPressed: _clearHistory,
288
+ ),
289
+ PopupMenuButton<_SamplingPreset>(
290
+ tooltip: 'Sampling preset',
291
+ icon: const Icon(Icons.tune),
292
+ initialValue: _samplingPreset,
293
+ onSelected: (preset) => setState(() => _samplingPreset = preset),
294
+ itemBuilder: (context) => _SamplingPreset.values
295
+ .map(
296
+ (p) => PopupMenuItem(
297
+ value: p,
298
+ child: Text(p.label),
299
+ ),
300
+ )
301
+ .toList(),
302
+ ),
303
+ const SizedBox(width: 8),
304
+ ],
305
+ ),
306
+ body: Column(
307
+ children: [
308
+ _EngineStatusBar(
309
+ info: _engineInfo,
310
+ isLoading: _isModelLoading,
311
+ loadingStatus: _loadingStatus,
312
+ onLoad: (!_isModelLoading &&
313
+ _engineInfo.status == EngineStatus.unloaded)
314
+ ? _loadModel
315
+ : null,
316
+ onUnload: isReady ? _unloadModel : null,
317
+ ),
318
+ if (_errorBanner != null)
319
+ _ErrorBanner(
320
+ message: _errorBanner!,
321
+ onDismiss: () => setState(() => _errorBanner = null),
322
+ ),
323
+ Expanded(
324
+ child: _messages.isEmpty
325
+ ? const _EmptyState()
326
+ : ListView.builder(
327
+ controller: _scrollController,
328
+ padding: const EdgeInsets.symmetric(
329
+ horizontal: 12,
330
+ vertical: 8,
331
+ ),
332
+ itemCount: _messages.length,
333
+ itemBuilder: (context, index) =>
334
+ _MessageBubble(message: _messages[index]),
335
+ ),
336
+ ),
337
+ _InputBar(
338
+ controller: _inputController,
339
+ isEnabled: isReady && !_isGenerating,
340
+ onSend: _sendMessage,
341
+ ),
342
+ ],
343
+ ),
344
+ );
345
+ }
346
+}
347
+
348
+// ---------------------------------------------------------------------------
349
+// _EngineStatusBar
350
+// ---------------------------------------------------------------------------
351
+
352
+class _EngineStatusBar extends StatelessWidget {
353
+ final EngineInfo info;
354
+ final bool isLoading;
355
+ final String loadingStatus;
356
+ final VoidCallback? onLoad;
357
+ final VoidCallback? onUnload;
358
+
359
+ const _EngineStatusBar({
360
+ required this.info,
361
+ required this.isLoading,
362
+ required this.loadingStatus,
363
+ this.onLoad,
364
+ this.onUnload,
365
+ });
366
+
367
+ @override
368
+ Widget build(BuildContext context) {
369
+ final cs = Theme.of(context).colorScheme;
370
+ final tt = Theme.of(context).textTheme;
371
+ return Material(
372
+ color: cs.surfaceContainerHighest,
373
+ child: Padding(
374
+ padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
375
+ child: Row(
376
+ children: [
377
+ if (isLoading)
378
+ Padding(
379
+ padding: const EdgeInsets.only(right: 10),
380
+ child: SizedBox(
381
+ width: 16,
382
+ height: 16,
383
+ child: CircularProgressIndicator(
384
+ strokeWidth: 2,
385
+ color: cs.primary,
386
+ ),
387
+ ),
388
+ ),
389
+ Expanded(
390
+ child: Column(
391
+ crossAxisAlignment: CrossAxisAlignment.start,
392
+ mainAxisSize: MainAxisSize.min,
393
+ children: [
394
+ Text(
395
+ loadingStatus,
396
+ style: tt.bodySmall?.copyWith(color: cs.onSurfaceVariant),
397
+ maxLines: 1,
398
+ overflow: TextOverflow.ellipsis,
399
+ ),
400
+ if (info.status == EngineStatus.ready)
401
+ Text(
402
+ '${info.status.label}'
403
+ ' · ${info.historyLengthInt} msgs'
404
+ '${info.approxMemory != null ? " · ${info.approxMemory}" : ""}',
405
+ style: tt.labelSmall?.copyWith(color: cs.outline),
406
+ maxLines: 1,
407
+ overflow: TextOverflow.ellipsis,
408
+ ),
409
+ ],
410
+ ),
411
+ ),
412
+ const SizedBox(width: 8),
413
+ if (onLoad != null)
414
+ FilledButton.tonal(
415
+ onPressed: onLoad,
416
+ child: const Text('Load model'),
417
+ ),
418
+ if (onUnload != null)
419
+ TextButton(
420
+ onPressed: onUnload,
421
+ child: const Text('Unload'),
422
+ ),
423
+ ],
424
+ ),
425
+ ),
426
+ );
427
+ }
428
+}
429
+
430
+// ---------------------------------------------------------------------------
431
+// _ErrorBanner
432
+// ---------------------------------------------------------------------------
433
+
434
+class _ErrorBanner extends StatelessWidget {
435
+ final String message;
436
+ final VoidCallback onDismiss;
437
+
438
+ const _ErrorBanner({required this.message, required this.onDismiss});
439
+
440
+ @override
441
+ Widget build(BuildContext context) {
442
+ final cs = Theme.of(context).colorScheme;
443
+ return MaterialBanner(
444
+ backgroundColor: cs.errorContainer,
445
+ leading: Icon(Icons.error_outline, color: cs.onErrorContainer),
446
+ content: Text(
447
+ message,
448
+ style: TextStyle(color: cs.onErrorContainer),
449
+ maxLines: 3,
450
+ overflow: TextOverflow.ellipsis,
451
+ ),
452
+ actions: [
453
+ TextButton(
454
+ onPressed: onDismiss,
455
+ child: Text(
456
+ 'Dismiss',
457
+ style: TextStyle(color: cs.onErrorContainer),
458
+ ),
459
+ ),
460
+ ],
461
+ );
462
+ }
463
+}
464
+
465
+// ---------------------------------------------------------------------------
466
+// _MessageBubble
467
+// ---------------------------------------------------------------------------
468
+
469
+class _MessageBubble extends StatelessWidget {
470
+ final _Message message;
471
+
472
+ const _MessageBubble({required this.message});
473
+
474
+ @override
475
+ Widget build(BuildContext context) {
476
+ final cs = Theme.of(context).colorScheme;
477
+ final tt = Theme.of(context).textTheme;
478
+ final isUser = message.role == _Role.user;
479
+ return Padding(
480
+ padding: const EdgeInsets.symmetric(vertical: 4),
481
+ child: Row(
482
+ mainAxisAlignment:
483
+ isUser ? MainAxisAlignment.end : MainAxisAlignment.start,
484
+ crossAxisAlignment: CrossAxisAlignment.end,
485
+ children: [
486
+ if (!isUser)
487
+ CircleAvatar(
488
+ radius: 14,
489
+ backgroundColor: cs.primaryContainer,
490
+ child: Icon(
491
+ Icons.auto_awesome,
492
+ size: 14,
493
+ color: cs.onPrimaryContainer,
494
+ ),
495
+ ),
496
+ if (!isUser) const SizedBox(width: 6),
497
+ Flexible(
498
+ child: Container(
499
+ padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
500
+ decoration: BoxDecoration(
501
+ color: isUser ? cs.primary : cs.surfaceContainerHigh,
502
+ borderRadius: BorderRadius.only(
503
+ topLeft: const Radius.circular(18),
504
+ topRight: const Radius.circular(18),
505
+ bottomLeft: Radius.circular(isUser ? 18 : 4),
506
+ bottomRight: Radius.circular(isUser ? 4 : 18),
507
+ ),
508
+ ),
509
+ child: Row(
510
+ mainAxisSize: MainAxisSize.min,
511
+ crossAxisAlignment: CrossAxisAlignment.end,
512
+ children: [
513
+ Flexible(
514
+ child: Text(
515
+ message.text.isEmpty && message.isStreaming
516
+ ? ' '
517
+ : message.text,
518
+ style: tt.bodyMedium?.copyWith(
519
+ color: isUser ? cs.onPrimary : cs.onSurface,
520
+ ),
521
+ ),
522
+ ),
523
+ if (message.isStreaming) ...[
524
+ const SizedBox(width: 4),
525
+ _BlinkingCursor(
526
+ color: isUser ? cs.onPrimary : cs.primary,
527
+ ),
528
+ ],
529
+ ],
530
+ ),
531
+ ),
532
+ ),
533
+ if (isUser) const SizedBox(width: 6),
534
+ if (isUser)
535
+ CircleAvatar(
536
+ radius: 14,
537
+ backgroundColor: cs.secondaryContainer,
538
+ child: Icon(
539
+ Icons.person,
540
+ size: 14,
541
+ color: cs.onSecondaryContainer,
542
+ ),
543
+ ),
544
+ ],
545
+ ),
546
+ );
547
+ }
548
+}
549
+
550
+// ---------------------------------------------------------------------------
551
+// _EmptyState
552
+// ---------------------------------------------------------------------------
553
+
554
+class _EmptyState extends StatelessWidget {
555
+ const _EmptyState();
556
+
557
+ @override
558
+ Widget build(BuildContext context) {
559
+ final cs = Theme.of(context).colorScheme;
560
+ final tt = Theme.of(context).textTheme;
561
+ return Center(
562
+ child: Column(
563
+ mainAxisSize: MainAxisSize.min,
564
+ children: [
565
+ Icon(
566
+ Icons.chat_bubble_outline_rounded,
567
+ size: 64,
568
+ color: cs.outlineVariant,
569
+ ),
570
+ const SizedBox(height: 16),
571
+ Text(
572
+ 'No messages yet',
573
+ style: tt.titleMedium?.copyWith(color: cs.onSurfaceVariant),
574
+ ),
575
+ const SizedBox(height: 6),
576
+ Text(
577
+ 'Load the model, then say hello.',
578
+ style: tt.bodySmall?.copyWith(color: cs.outline),
579
+ ),
580
+ ],
581
+ ),
582
+ );
583
+ }
584
+}
585
+
586
+// ---------------------------------------------------------------------------
587
+// _InputBar
588
+// ---------------------------------------------------------------------------
589
+
590
+class _InputBar extends StatelessWidget {
591
+ final TextEditingController controller;
592
+ final bool isEnabled;
593
+ final VoidCallback onSend;
594
+
595
+ const _InputBar({
596
+ required this.controller,
597
+ required this.isEnabled,
598
+ required this.onSend,
599
+ });
600
+
601
+ @override
602
+ Widget build(BuildContext context) {
603
+ final cs = Theme.of(context).colorScheme;
604
+ return SafeArea(
605
+ top: false,
606
+ child: Padding(
607
+ padding: const EdgeInsets.fromLTRB(12, 8, 12, 12),
608
+ child: Row(
609
+ children: [
610
+ Expanded(
611
+ child: TextField(
612
+ controller: controller,
613
+ enabled: isEnabled,
614
+ minLines: 1,
615
+ maxLines: 5,
616
+ textInputAction: TextInputAction.send,
617
+ onSubmitted: isEnabled ? (_) => onSend() : null,
618
+ decoration: InputDecoration(
619
+ hintText: isEnabled ? 'Message…' : 'Load a model first…',
620
+ border: const OutlineInputBorder(
621
+ borderRadius: BorderRadius.all(Radius.circular(24)),
622
+ ),
623
+ contentPadding: const EdgeInsets.symmetric(
624
+ horizontal: 16,
625
+ vertical: 10,
626
+ ),
627
+ filled: true,
628
+ fillColor: cs.surfaceContainerHigh,
629
+ ),
630
+ ),
631
+ ),
632
+ const SizedBox(width: 8),
633
+ FilledButton(
634
+ onPressed: isEnabled ? onSend : null,
635
+ style: FilledButton.styleFrom(
636
+ padding: const EdgeInsets.all(14),
637
+ shape: const CircleBorder(),
638
+ ),
639
+ child: const Icon(Icons.send_rounded, size: 20),
640
+ ),
641
+ ],
642
+ ),
643
+ ),
644
+ );
645
+ }
646
+}
647
+
648
+// ---------------------------------------------------------------------------
649
+// _BlinkingCursor
650
+// ---------------------------------------------------------------------------
651
+
652
+class _BlinkingCursor extends StatefulWidget {
653
+ final Color color;
654
+
655
+ const _BlinkingCursor({required this.color});
656
+
657
+ @override
658
+ State<_BlinkingCursor> createState() => _BlinkingCursorState();
659
+}
660
+
661
+class _BlinkingCursorState extends State<_BlinkingCursor>
662
+ with SingleTickerProviderStateMixin {
663
+ late final AnimationController _controller = AnimationController(
664
+ vsync: this,
665
+ duration: const Duration(milliseconds: 530),
666
+ )..repeat(reverse: true);
667
+
668
+ late final Animation<double> _opacity = CurvedAnimation(
669
+ parent: _controller,
670
+ curve: Curves.easeInOut,
671
+ );
672
+
673
+ @override
674
+ void dispose() {
675
+ _controller.dispose();
676
+ super.dispose();
677
+ }
678
+
679
+ @override
680
+ Widget build(BuildContext context) {
681
+ return FadeTransition(
682
+ opacity: _opacity,
683
+ child: Container(
684
+ width: 2,
685
+ height: 14,
686
+ decoration: BoxDecoration(
687
+ color: widget.color,
688
+ borderRadius: BorderRadius.circular(1),
689
+ ),
690
+ ),
691
+ );
692
+ }
693
+}
sdk/dart/example/macos/.gitignore
new
+7
@@ -0,0 +1,7 @@
1
+# Flutter-related
2
+**/Flutter/ephemeral/
3
+**/Pods/
4
+
5
+# Xcode-related
6
+**/dgph
7
+**/xcuserdata/
sdk/dart/example/macos/Flutter/Flutter-Debug.xcconfig
new
+2
@@ -0,0 +1,2 @@
1
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2
+#include "ephemeral/Flutter-Generated.xcconfig"
sdk/dart/example/macos/Flutter/Flutter-Release.xcconfig
new
+2
@@ -0,0 +1,2 @@
1
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2
+#include "ephemeral/Flutter-Generated.xcconfig"
sdk/dart/example/macos/Flutter/GeneratedPluginRegistrant.swift
new
+10
@@ -0,0 +1,10 @@
1
+//
2
+// Generated file. Do not edit.
3
+//
4
+
5
+import FlutterMacOS
6
+import Foundation
7
+
8
+
9
+func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
10
+}
sdk/dart/example/macos/Podfile
new
+42
@@ -0,0 +1,42 @@
1
+platform :osx, '10.15'
2
+
3
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5
+
6
+project 'Runner', {
7
+ 'Debug' => :debug,
8
+ 'Profile' => :release,
9
+ 'Release' => :release,
10
+}
11
+
12
+def flutter_root
13
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14
+ unless File.exist?(generated_xcode_build_settings_path)
15
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16
+ end
17
+
18
+ File.foreach(generated_xcode_build_settings_path) do |line|
19
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
20
+ return matches[1].strip if matches
21
+ end
22
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23
+end
24
+
25
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26
+
27
+flutter_macos_podfile_setup
28
+
29
+target 'Runner' do
30
+ use_frameworks!
31
+
32
+ flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
33
+ target 'RunnerTests' do
34
+ inherit! :search_paths
35
+ end
36
+end
37
+
38
+post_install do |installer|
39
+ installer.pods_project.targets.each do |target|
40
+ flutter_additional_macos_build_settings(target)
41
+ end
42
+end
sdk/dart/example/macos/Podfile.lock
new
+22
@@ -0,0 +1,22 @@
1
+PODS:
2
+ - FlutterMacOS (1.0.0)
3
+ - onde_inference (0.1.0):
4
+ - FlutterMacOS
5
+
6
+DEPENDENCIES:
7
+ - FlutterMacOS (from `Flutter/ephemeral`)
8
+ - onde_inference (from `Flutter/ephemeral/.symlinks/plugins/onde_inference/macos`)
9
+
10
+EXTERNAL SOURCES:
11
+ FlutterMacOS:
12
+ :path: Flutter/ephemeral
13
+ onde_inference:
14
+ :path: Flutter/ephemeral/.symlinks/plugins/onde_inference/macos
15
+
16
+SPEC CHECKSUMS:
17
+ FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
18
+ onde_inference: 5973955f39e2df79843e047d9564a048950a6533
19
+
20
+PODFILE CHECKSUM: 54d867c82ac51cbd61b565781b9fada492027009
21
+
22
+COCOAPODS: 1.16.2
sdk/dart/example/macos/Runner.xcodeproj/project.pbxproj
new
+786
@@ -0,0 +1,786 @@
1
+// !$*UTF8*$!
2
+{
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 54;
7
+ objects = {
8
+
9
+/* Begin PBXAggregateTarget section */
10
+ 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
11
+ isa = PBXAggregateTarget;
12
+ buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
13
+ buildPhases = (
14
+ 33CC111E2044C6BF0003C045 /* ShellScript */,
15
+ );
16
+ dependencies = (
17
+ );
18
+ name = "Flutter Assemble";
19
+ productName = FLX;
20
+ };
21
+/* End PBXAggregateTarget section */
22
+
23
+/* Begin PBXBuildFile section */
24
+ 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
25
+ 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
26
+ 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
27
+ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
28
+ 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
29
+ 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
30
+ 4964FE3F090874F4A05596A2 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB2BA20B091B1AC049D70E08 /* Pods_RunnerTests.framework */; };
31
+ B588A29B592AE09D045464AC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FCB182C845FD52590BAF3D7A /* Pods_Runner.framework */; };
32
+/* End PBXBuildFile section */
33
+
34
+/* Begin PBXContainerItemProxy section */
35
+ 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = {
36
+ isa = PBXContainerItemProxy;
37
+ containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
38
+ proxyType = 1;
39
+ remoteGlobalIDString = 33CC10EC2044A3C60003C045;
40
+ remoteInfo = Runner;
41
+ };
42
+ 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
43
+ isa = PBXContainerItemProxy;
44
+ containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
45
+ proxyType = 1;
46
+ remoteGlobalIDString = 33CC111A2044C6BA0003C045;
47
+ remoteInfo = FLX;
48
+ };
49
+/* End PBXContainerItemProxy section */
50
+
51
+/* Begin PBXCopyFilesBuildPhase section */
52
+ 33CC110E2044A8840003C045 /* Bundle Framework */ = {
53
+ isa = PBXCopyFilesBuildPhase;
54
+ buildActionMask = 2147483647;
55
+ dstPath = "";
56
+ dstSubfolderSpec = 10;
57
+ files = (
58
+ );
59
+ name = "Bundle Framework";
60
+ runOnlyForDeploymentPostprocessing = 0;
61
+ };
62
+/* End PBXCopyFilesBuildPhase section */
63
+
64
+/* Begin PBXFileReference section */
65
+ 0D9800FDA54191AEEAAAE9BB /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
66
+ 16B2255BEDBBE3EA62D64186 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
67
+ 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
68
+ 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
69
+ 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
70
+ 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
71
+ 33CC10ED2044A3C60003C045 /* onde_inference_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = onde_inference_example.app; sourceTree = BUILT_PRODUCTS_DIR; };
72
+ 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
73
+ 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
74
+ 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
75
+ 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = "<group>"; };
76
+ 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = "<group>"; };
77
+ 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; };
78
+ 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; };
79
+ 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; };
80
+ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
81
+ 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
82
+ 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
83
+ 5A480103A99CB2BE033FE3F9 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
84
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
85
+ 815ED0080F2170CBE0D7E5F9 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
86
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
87
+ 9AFFCFF65CB7BCFA5A9720B8 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
88
+ AB2BA20B091B1AC049D70E08 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
89
+ B9CD6D05AD11517F74A92300 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
90
+ FCB182C845FD52590BAF3D7A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
91
+/* End PBXFileReference section */
92
+
93
+/* Begin PBXFrameworksBuildPhase section */
94
+ 331C80D2294CF70F00263BE5 /* Frameworks */ = {
95
+ isa = PBXFrameworksBuildPhase;
96
+ buildActionMask = 2147483647;
97
+ files = (
98
+ 4964FE3F090874F4A05596A2 /* Pods_RunnerTests.framework in Frameworks */,
99
+ );
100
+ runOnlyForDeploymentPostprocessing = 0;
101
+ };
102
+ 33CC10EA2044A3C60003C045 /* Frameworks */ = {
103
+ isa = PBXFrameworksBuildPhase;
104
+ buildActionMask = 2147483647;
105
+ files = (
106
+ B588A29B592AE09D045464AC /* Pods_Runner.framework in Frameworks */,
107
+ );
108
+ runOnlyForDeploymentPostprocessing = 0;
109
+ };
110
+/* End PBXFrameworksBuildPhase section */
111
+
112
+/* Begin PBXGroup section */
113
+ 331C80D6294CF71000263BE5 /* RunnerTests */ = {
114
+ isa = PBXGroup;
115
+ children = (
116
+ 331C80D7294CF71000263BE5 /* RunnerTests.swift */,
117
+ );
118
+ path = RunnerTests;
119
+ sourceTree = "<group>";
120
+ };
121
+ 33BA886A226E78AF003329D5 /* Configs */ = {
122
+ isa = PBXGroup;
123
+ children = (
124
+ 33E5194F232828860026EE4D /* AppInfo.xcconfig */,
125
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
126
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
127
+ 333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
128
+ );
129
+ path = Configs;
130
+ sourceTree = "<group>";
131
+ };
132
+ 33CC10E42044A3C60003C045 = {
133
+ isa = PBXGroup;
134
+ children = (
135
+ 33FAB671232836740065AC1E /* Runner */,
136
+ 33CEB47122A05771004F2AC0 /* Flutter */,
137
+ 331C80D6294CF71000263BE5 /* RunnerTests */,
138
+ 33CC10EE2044A3C60003C045 /* Products */,
139
+ D73912EC22F37F3D000D13A0 /* Frameworks */,
140
+ A756DEFB8C207977166EDEA2 /* Pods */,
141
+ );
142
+ sourceTree = "<group>";
143
+ };
144
+ 33CC10EE2044A3C60003C045 /* Products */ = {
145
+ isa = PBXGroup;
146
+ children = (
147
+ 33CC10ED2044A3C60003C045 /* onde_inference_example.app */,
148
+ 331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
149
+ );
150
+ name = Products;
151
+ sourceTree = "<group>";
152
+ };
153
+ 33CC11242044D66E0003C045 /* Resources */ = {
154
+ isa = PBXGroup;
155
+ children = (
156
+ 33CC10F22044A3C60003C045 /* Assets.xcassets */,
157
+ 33CC10F42044A3C60003C045 /* MainMenu.xib */,
158
+ 33CC10F72044A3C60003C045 /* Info.plist */,
159
+ );
160
+ name = Resources;
161
+ path = ..;
162
+ sourceTree = "<group>";
163
+ };
164
+ 33CEB47122A05771004F2AC0 /* Flutter */ = {
165
+ isa = PBXGroup;
166
+ children = (
167
+ 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
168
+ 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
169
+ 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
170
+ 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
171
+ );
172
+ path = Flutter;
173
+ sourceTree = "<group>";
174
+ };
175
+ 33FAB671232836740065AC1E /* Runner */ = {
176
+ isa = PBXGroup;
177
+ children = (
178
+ 33CC10F02044A3C60003C045 /* AppDelegate.swift */,
179
+ 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
180
+ 33E51913231747F40026EE4D /* DebugProfile.entitlements */,
181
+ 33E51914231749380026EE4D /* Release.entitlements */,
182
+ 33CC11242044D66E0003C045 /* Resources */,
183
+ 33BA886A226E78AF003329D5 /* Configs */,
184
+ );
185
+ path = Runner;
186
+ sourceTree = "<group>";
187
+ };
188
+ A756DEFB8C207977166EDEA2 /* Pods */ = {
189
+ isa = PBXGroup;
190
+ children = (
191
+ 16B2255BEDBBE3EA62D64186 /* Pods-Runner.debug.xcconfig */,
192
+ B9CD6D05AD11517F74A92300 /* Pods-Runner.release.xcconfig */,
193
+ 815ED0080F2170CBE0D7E5F9 /* Pods-Runner.profile.xcconfig */,
194
+ 5A480103A99CB2BE033FE3F9 /* Pods-RunnerTests.debug.xcconfig */,
195
+ 0D9800FDA54191AEEAAAE9BB /* Pods-RunnerTests.release.xcconfig */,
196
+ 9AFFCFF65CB7BCFA5A9720B8 /* Pods-RunnerTests.profile.xcconfig */,
197
+ );
198
+ name = Pods;
199
+ path = Pods;
200
+ sourceTree = "<group>";
201
+ };
202
+ D73912EC22F37F3D000D13A0 /* Frameworks */ = {
203
+ isa = PBXGroup;
204
+ children = (
205
+ FCB182C845FD52590BAF3D7A /* Pods_Runner.framework */,
206
+ AB2BA20B091B1AC049D70E08 /* Pods_RunnerTests.framework */,
207
+ );
208
+ name = Frameworks;
209
+ sourceTree = "<group>";
210
+ };
211
+/* End PBXGroup section */
212
+
213
+/* Begin PBXNativeTarget section */
214
+ 331C80D4294CF70F00263BE5 /* RunnerTests */ = {
215
+ isa = PBXNativeTarget;
216
+ buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
217
+ buildPhases = (
218
+ 66A84A3100E1C61DBC6FD920 /* [CP] Check Pods Manifest.lock */,
219
+ 331C80D1294CF70F00263BE5 /* Sources */,
220
+ 331C80D2294CF70F00263BE5 /* Frameworks */,
221
+ 331C80D3294CF70F00263BE5 /* Resources */,
222
+ );
223
+ buildRules = (
224
+ );
225
+ dependencies = (
226
+ 331C80DA294CF71000263BE5 /* PBXTargetDependency */,
227
+ );
228
+ name = RunnerTests;
229
+ productName = RunnerTests;
230
+ productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */;
231
+ productType = "com.apple.product-type.bundle.unit-test";
232
+ };
233
+ 33CC10EC2044A3C60003C045 /* Runner */ = {
234
+ isa = PBXNativeTarget;
235
+ buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
236
+ buildPhases = (
237
+ A0C24FC16955FA8CB4B2F299 /* [CP] Check Pods Manifest.lock */,
238
+ 33CC10E92044A3C60003C045 /* Sources */,
239
+ 33CC10EA2044A3C60003C045 /* Frameworks */,
240
+ 33CC10EB2044A3C60003C045 /* Resources */,
241
+ 33CC110E2044A8840003C045 /* Bundle Framework */,
242
+ 3399D490228B24CF009A79C7 /* ShellScript */,
243
+ );
244
+ buildRules = (
245
+ );
246
+ dependencies = (
247
+ 33CC11202044C79F0003C045 /* PBXTargetDependency */,
248
+ );
249
+ name = Runner;
250
+ productName = Runner;
251
+ productReference = 33CC10ED2044A3C60003C045 /* onde_inference_example.app */;
252
+ productType = "com.apple.product-type.application";
253
+ };
254
+/* End PBXNativeTarget section */
255
+
256
+/* Begin PBXProject section */
257
+ 33CC10E52044A3C60003C045 /* Project object */ = {
258
+ isa = PBXProject;
259
+ attributes = {
260
+ BuildIndependentTargetsInParallel = YES;
261
+ LastSwiftUpdateCheck = 0920;
262
+ LastUpgradeCheck = 1510;
263
+ ORGANIZATIONNAME = "";
264
+ TargetAttributes = {
265
+ 331C80D4294CF70F00263BE5 = {
266
+ CreatedOnToolsVersion = 14.0;
267
+ TestTargetID = 33CC10EC2044A3C60003C045;
268
+ };
269
+ 33CC10EC2044A3C60003C045 = {
270
+ CreatedOnToolsVersion = 9.2;
271
+ LastSwiftMigration = 1100;
272
+ ProvisioningStyle = Automatic;
273
+ SystemCapabilities = {
274
+ com.apple.Sandbox = {
275
+ enabled = 1;
276
+ };
277
+ };
278
+ };
279
+ 33CC111A2044C6BA0003C045 = {
280
+ CreatedOnToolsVersion = 9.2;
281
+ ProvisioningStyle = Manual;
282
+ };
283
+ };
284
+ };
285
+ buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
286
+ compatibilityVersion = "Xcode 9.3";
287
+ developmentRegion = en;
288
+ hasScannedForEncodings = 0;
289
+ knownRegions = (
290
+ en,
291
+ Base,
292
+ );
293
+ mainGroup = 33CC10E42044A3C60003C045;
294
+ productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
295
+ projectDirPath = "";
296
+ projectRoot = "";
297
+ targets = (
298
+ 33CC10EC2044A3C60003C045 /* Runner */,
299
+ 331C80D4294CF70F00263BE5 /* RunnerTests */,
300
+ 33CC111A2044C6BA0003C045 /* Flutter Assemble */,
301
+ );
302
+ };
303
+/* End PBXProject section */
304
+
305
+/* Begin PBXResourcesBuildPhase section */
306
+ 331C80D3294CF70F00263BE5 /* Resources */ = {
307
+ isa = PBXResourcesBuildPhase;
308
+ buildActionMask = 2147483647;
309
+ files = (
310
+ );
311
+ runOnlyForDeploymentPostprocessing = 0;
312
+ };
313
+ 33CC10EB2044A3C60003C045 /* Resources */ = {
314
+ isa = PBXResourcesBuildPhase;
315
+ buildActionMask = 2147483647;
316
+ files = (
317
+ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
318
+ 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
319
+ );
320
+ runOnlyForDeploymentPostprocessing = 0;
321
+ };
322
+/* End PBXResourcesBuildPhase section */
323
+
324
+/* Begin PBXShellScriptBuildPhase section */
325
+ 3399D490228B24CF009A79C7 /* ShellScript */ = {
326
+ isa = PBXShellScriptBuildPhase;
327
+ alwaysOutOfDate = 1;
328
+ buildActionMask = 2147483647;
329
+ files = (
330
+ );
331
+ inputFileListPaths = (
332
+ );
333
+ inputPaths = (
334
+ );
335
+ outputFileListPaths = (
336
+ );
337
+ outputPaths = (
338
+ );
339
+ runOnlyForDeploymentPostprocessing = 0;
340
+ shellPath = /bin/sh;
341
+ shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
342
+ };
343
+ 33CC111E2044C6BF0003C045 /* ShellScript */ = {
344
+ isa = PBXShellScriptBuildPhase;
345
+ buildActionMask = 2147483647;
346
+ files = (
347
+ );
348
+ inputFileListPaths = (
349
+ Flutter/ephemeral/FlutterInputs.xcfilelist,
350
+ );
351
+ inputPaths = (
352
+ Flutter/ephemeral/tripwire,
353
+ );
354
+ outputFileListPaths = (
355
+ Flutter/ephemeral/FlutterOutputs.xcfilelist,
356
+ );
357
+ outputPaths = (
358
+ );
359
+ runOnlyForDeploymentPostprocessing = 0;
360
+ shellPath = /bin/sh;
361
+ shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
362
+ };
363
+ 66A84A3100E1C61DBC6FD920 /* [CP] Check Pods Manifest.lock */ = {
364
+ isa = PBXShellScriptBuildPhase;
365
+ buildActionMask = 2147483647;
366
+ files = (
367
+ );
368
+ inputFileListPaths = (
369
+ );
370
+ inputPaths = (
371
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
372
+ "${PODS_ROOT}/Manifest.lock",
373
+ );
374
+ name = "[CP] Check Pods Manifest.lock";
375
+ outputFileListPaths = (
376
+ );
377
+ outputPaths = (
378
+ "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
379
+ );
380
+ runOnlyForDeploymentPostprocessing = 0;
381
+ shellPath = /bin/sh;
382
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
383
+ showEnvVarsInLog = 0;
384
+ };
385
+ A0C24FC16955FA8CB4B2F299 /* [CP] Check Pods Manifest.lock */ = {
386
+ isa = PBXShellScriptBuildPhase;
387
+ buildActionMask = 2147483647;
388
+ files = (
389
+ );
390
+ inputFileListPaths = (
391
+ );
392
+ inputPaths = (
393
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
394
+ "${PODS_ROOT}/Manifest.lock",
395
+ );
396
+ name = "[CP] Check Pods Manifest.lock";
397
+ outputFileListPaths = (
398
+ );
399
+ outputPaths = (
400
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
401
+ );
402
+ runOnlyForDeploymentPostprocessing = 0;
403
+ shellPath = /bin/sh;
404
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
405
+ showEnvVarsInLog = 0;
406
+ };
407
+/* End PBXShellScriptBuildPhase section */
408
+
409
+/* Begin PBXSourcesBuildPhase section */
410
+ 331C80D1294CF70F00263BE5 /* Sources */ = {
411
+ isa = PBXSourcesBuildPhase;
412
+ buildActionMask = 2147483647;
413
+ files = (
414
+ 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */,
415
+ );
416
+ runOnlyForDeploymentPostprocessing = 0;
417
+ };
418
+ 33CC10E92044A3C60003C045 /* Sources */ = {
419
+ isa = PBXSourcesBuildPhase;
420
+ buildActionMask = 2147483647;
421
+ files = (
422
+ 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
423
+ 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
424
+ 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
425
+ );
426
+ runOnlyForDeploymentPostprocessing = 0;
427
+ };
428
+/* End PBXSourcesBuildPhase section */
429
+
430
+/* Begin PBXTargetDependency section */
431
+ 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = {
432
+ isa = PBXTargetDependency;
433
+ target = 33CC10EC2044A3C60003C045 /* Runner */;
434
+ targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */;
435
+ };
436
+ 33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
437
+ isa = PBXTargetDependency;
438
+ target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
439
+ targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
440
+ };
441
+/* End PBXTargetDependency section */
442
+
443
+/* Begin PBXVariantGroup section */
444
+ 33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
445
+ isa = PBXVariantGroup;
446
+ children = (
447
+ 33CC10F52044A3C60003C045 /* Base */,
448
+ );
449
+ name = MainMenu.xib;
450
+ path = Runner;
451
+ sourceTree = "<group>";
452
+ };
453
+/* End PBXVariantGroup section */
454
+
455
+/* Begin XCBuildConfiguration section */
456
+ 331C80DB294CF71000263BE5 /* Debug */ = {
457
+ isa = XCBuildConfiguration;
458
+ baseConfigurationReference = 5A480103A99CB2BE033FE3F9 /* Pods-RunnerTests.debug.xcconfig */;
459
+ buildSettings = {
460
+ BUNDLE_LOADER = "$(TEST_HOST)";
461
+ CURRENT_PROJECT_VERSION = 1;
462
+ GENERATE_INFOPLIST_FILE = YES;
463
+ MARKETING_VERSION = 1.0;
464
+ PRODUCT_BUNDLE_IDENTIFIER = com.ondeinference.ondeInferenceExample.RunnerTests;
465
+ PRODUCT_NAME = "$(TARGET_NAME)";
466
+ SWIFT_VERSION = 5.0;
467
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/onde_inference_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/onde_inference_example";
468
+ };
469
+ name = Debug;
470
+ };
471
+ 331C80DC294CF71000263BE5 /* Release */ = {
472
+ isa = XCBuildConfiguration;
473
+ baseConfigurationReference = 0D9800FDA54191AEEAAAE9BB /* Pods-RunnerTests.release.xcconfig */;
474
+ buildSettings = {
475
+ BUNDLE_LOADER = "$(TEST_HOST)";
476
+ CURRENT_PROJECT_VERSION = 1;
477
+ GENERATE_INFOPLIST_FILE = YES;
478
+ MARKETING_VERSION = 1.0;
479
+ PRODUCT_BUNDLE_IDENTIFIER = com.ondeinference.ondeInferenceExample.RunnerTests;
480
+ PRODUCT_NAME = "$(TARGET_NAME)";
481
+ SWIFT_VERSION = 5.0;
482
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/onde_inference_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/onde_inference_example";
483
+ };
484
+ name = Release;
485
+ };
486
+ 331C80DD294CF71000263BE5 /* Profile */ = {
487
+ isa = XCBuildConfiguration;
488
+ baseConfigurationReference = 9AFFCFF65CB7BCFA5A9720B8 /* Pods-RunnerTests.profile.xcconfig */;
489
+ buildSettings = {
490
+ BUNDLE_LOADER = "$(TEST_HOST)";
491
+ CURRENT_PROJECT_VERSION = 1;
492
+ GENERATE_INFOPLIST_FILE = YES;
493
+ MARKETING_VERSION = 1.0;
494
+ PRODUCT_BUNDLE_IDENTIFIER = com.ondeinference.ondeInferenceExample.RunnerTests;
495
+ PRODUCT_NAME = "$(TARGET_NAME)";
496
+ SWIFT_VERSION = 5.0;
497
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/onde_inference_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/onde_inference_example";
498
+ };
499
+ name = Profile;
500
+ };
501
+ 338D0CE9231458BD00FA5F75 /* Profile */ = {
502
+ isa = XCBuildConfiguration;
503
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
504
+ buildSettings = {
505
+ ALWAYS_SEARCH_USER_PATHS = NO;
506
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
507
+ CLANG_ANALYZER_NONNULL = YES;
508
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
509
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
510
+ CLANG_CXX_LIBRARY = "libc++";
511
+ CLANG_ENABLE_MODULES = YES;
512
+ CLANG_ENABLE_OBJC_ARC = YES;
513
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
514
+ CLANG_WARN_BOOL_CONVERSION = YES;
515
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
516
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
517
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
518
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
519
+ CLANG_WARN_EMPTY_BODY = YES;
520
+ CLANG_WARN_ENUM_CONVERSION = YES;
521
+ CLANG_WARN_INFINITE_RECURSION = YES;
522
+ CLANG_WARN_INT_CONVERSION = YES;
523
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
524
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
525
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
526
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
527
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
528
+ CODE_SIGN_IDENTITY = "-";
529
+ COPY_PHASE_STRIP = NO;
530
+ DEAD_CODE_STRIPPING = YES;
531
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
532
+ ENABLE_NS_ASSERTIONS = NO;
533
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
534
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
535
+ GCC_C_LANGUAGE_STANDARD = gnu11;
536
+ GCC_NO_COMMON_BLOCKS = YES;
537
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
538
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
539
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
540
+ GCC_WARN_UNUSED_FUNCTION = YES;
541
+ GCC_WARN_UNUSED_VARIABLE = YES;
542
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
543
+ OTHER_LDFLAGS = "-ld_classic";
544
+ MTL_ENABLE_DEBUG_INFO = NO;
545
+ SDKROOT = macosx;
546
+ SWIFT_COMPILATION_MODE = wholemodule;
547
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
548
+ };
549
+ name = Profile;
550
+ };
551
+ 338D0CEA231458BD00FA5F75 /* Profile */ = {
552
+ isa = XCBuildConfiguration;
553
+ baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
554
+ buildSettings = {
555
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
556
+ CLANG_ENABLE_MODULES = YES;
557
+ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
558
+ CODE_SIGN_STYLE = Automatic;
559
+ COMBINE_HIDPI_IMAGES = YES;
560
+ INFOPLIST_FILE = Runner/Info.plist;
561
+ LD_RUNPATH_SEARCH_PATHS = (
562
+ "$(inherited)",
563
+ "@executable_path/../Frameworks",
564
+ );
565
+ PROVISIONING_PROFILE_SPECIFIER = "";
566
+ SWIFT_VERSION = 5.0;
567
+ };
568
+ name = Profile;
569
+ };
570
+ 338D0CEB231458BD00FA5F75 /* Profile */ = {
571
+ isa = XCBuildConfiguration;
572
+ buildSettings = {
573
+ CODE_SIGN_STYLE = Manual;
574
+ PRODUCT_NAME = "$(TARGET_NAME)";
575
+ };
576
+ name = Profile;
577
+ };
578
+ 33CC10F92044A3C60003C045 /* Debug */ = {
579
+ isa = XCBuildConfiguration;
580
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
581
+ buildSettings = {
582
+ ALWAYS_SEARCH_USER_PATHS = NO;
583
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
584
+ CLANG_ANALYZER_NONNULL = YES;
585
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
586
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
587
+ CLANG_CXX_LIBRARY = "libc++";
588
+ CLANG_ENABLE_MODULES = YES;
589
+ CLANG_ENABLE_OBJC_ARC = YES;
590
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
591
+ CLANG_WARN_BOOL_CONVERSION = YES;
592
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
593
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
594
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
595
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
596
+ CLANG_WARN_EMPTY_BODY = YES;
597
+ CLANG_WARN_ENUM_CONVERSION = YES;
598
+ CLANG_WARN_INFINITE_RECURSION = YES;
599
+ CLANG_WARN_INT_CONVERSION = YES;
600
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
601
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
602
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
603
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
604
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
605
+ CODE_SIGN_IDENTITY = "-";
606
+ COPY_PHASE_STRIP = NO;
607
+ DEAD_CODE_STRIPPING = YES;
608
+ DEBUG_INFORMATION_FORMAT = dwarf;
609
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
610
+ ENABLE_TESTABILITY = YES;
611
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
612
+ GCC_C_LANGUAGE_STANDARD = gnu11;
613
+ GCC_DYNAMIC_NO_PIC = NO;
614
+ GCC_NO_COMMON_BLOCKS = YES;
615
+ GCC_OPTIMIZATION_LEVEL = 0;
616
+ GCC_PREPROCESSOR_DEFINITIONS = (
617
+ "DEBUG=1",
618
+ "$(inherited)",
619
+ );
620
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
621
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
622
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
623
+ GCC_WARN_UNUSED_FUNCTION = YES;
624
+ GCC_WARN_UNUSED_VARIABLE = YES;
625
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
626
+ OTHER_LDFLAGS = "-ld_classic";
627
+ MTL_ENABLE_DEBUG_INFO = YES;
628
+ ONLY_ACTIVE_ARCH = YES;
629
+ SDKROOT = macosx;
630
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
631
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
632
+ };
633
+ name = Debug;
634
+ };
635
+ 33CC10FA2044A3C60003C045 /* Release */ = {
636
+ isa = XCBuildConfiguration;
637
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
638
+ buildSettings = {
639
+ ALWAYS_SEARCH_USER_PATHS = NO;
640
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
641
+ CLANG_ANALYZER_NONNULL = YES;
642
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
643
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
644
+ CLANG_CXX_LIBRARY = "libc++";
645
+ CLANG_ENABLE_MODULES = YES;
646
+ CLANG_ENABLE_OBJC_ARC = YES;
647
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
648
+ CLANG_WARN_BOOL_CONVERSION = YES;
649
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
650
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
651
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
652
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
653
+ CLANG_WARN_EMPTY_BODY = YES;
654
+ CLANG_WARN_ENUM_CONVERSION = YES;
655
+ CLANG_WARN_INFINITE_RECURSION = YES;
656
+ CLANG_WARN_INT_CONVERSION = YES;
657
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
658
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
659
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
660
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
661
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
662
+ CODE_SIGN_IDENTITY = "-";
663
+ COPY_PHASE_STRIP = NO;
664
+ DEAD_CODE_STRIPPING = YES;
665
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
666
+ ENABLE_NS_ASSERTIONS = NO;
667
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
668
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
669
+ GCC_C_LANGUAGE_STANDARD = gnu11;
670
+ GCC_NO_COMMON_BLOCKS = YES;
671
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
672
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
673
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
674
+ GCC_WARN_UNUSED_FUNCTION = YES;
675
+ GCC_WARN_UNUSED_VARIABLE = YES;
676
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
677
+ OTHER_LDFLAGS = "-ld_classic";
678
+ MTL_ENABLE_DEBUG_INFO = NO;
679
+ SDKROOT = macosx;
680
+ SWIFT_COMPILATION_MODE = wholemodule;
681
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
682
+ };
683
+ name = Release;
684
+ };
685
+ 33CC10FC2044A3C60003C045 /* Debug */ = {
686
+ isa = XCBuildConfiguration;
687
+ baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
688
+ buildSettings = {
689
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
690
+ CLANG_ENABLE_MODULES = YES;
691
+ CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
692
+ CODE_SIGN_STYLE = Automatic;
693
+ COMBINE_HIDPI_IMAGES = YES;
694
+ INFOPLIST_FILE = Runner/Info.plist;
695
+ LD_RUNPATH_SEARCH_PATHS = (
696
+ "$(inherited)",
697
+ "@executable_path/../Frameworks",
698
+ );
699
+ PROVISIONING_PROFILE_SPECIFIER = "";
700
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
701
+ SWIFT_VERSION = 5.0;
702
+ };
703
+ name = Debug;
704
+ };
705
+ 33CC10FD2044A3C60003C045 /* Release */ = {
706
+ isa = XCBuildConfiguration;
707
+ baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
708
+ buildSettings = {
709
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
710
+ CLANG_ENABLE_MODULES = YES;
711
+ CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
712
+ CODE_SIGN_STYLE = Automatic;
713
+ COMBINE_HIDPI_IMAGES = YES;
714
+ INFOPLIST_FILE = Runner/Info.plist;
715
+ LD_RUNPATH_SEARCH_PATHS = (
716
+ "$(inherited)",
717
+ "@executable_path/../Frameworks",
718
+ );
719
+ PROVISIONING_PROFILE_SPECIFIER = "";
720
+ SWIFT_VERSION = 5.0;
721
+ };
722
+ name = Release;
723
+ };
724
+ 33CC111C2044C6BA0003C045 /* Debug */ = {
725
+ isa = XCBuildConfiguration;
726
+ buildSettings = {
727
+ CODE_SIGN_STYLE = Manual;
728
+ PRODUCT_NAME = "$(TARGET_NAME)";
729
+ };
730
+ name = Debug;
731
+ };
732
+ 33CC111D2044C6BA0003C045 /* Release */ = {
733
+ isa = XCBuildConfiguration;
734
+ buildSettings = {
735
+ CODE_SIGN_STYLE = Automatic;
736
+ PRODUCT_NAME = "$(TARGET_NAME)";
737
+ };
738
+ name = Release;
739
+ };
740
+/* End XCBuildConfiguration section */
741
+
742
+/* Begin XCConfigurationList section */
743
+ 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
744
+ isa = XCConfigurationList;
745
+ buildConfigurations = (
746
+ 331C80DB294CF71000263BE5 /* Debug */,
747
+ 331C80DC294CF71000263BE5 /* Release */,
748
+ 331C80DD294CF71000263BE5 /* Profile */,
749
+ );
750
+ defaultConfigurationIsVisible = 0;
751
+ defaultConfigurationName = Release;
752
+ };
753
+ 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
754
+ isa = XCConfigurationList;
755
+ buildConfigurations = (
756
+ 33CC10F92044A3C60003C045 /* Debug */,
757
+ 33CC10FA2044A3C60003C045 /* Release */,
758
+ 338D0CE9231458BD00FA5F75 /* Profile */,
759
+ );
760
+ defaultConfigurationIsVisible = 0;
761
+ defaultConfigurationName = Release;
762
+ };
763
+ 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
764
+ isa = XCConfigurationList;
765
+ buildConfigurations = (
766
+ 33CC10FC2044A3C60003C045 /* Debug */,
767
+ 33CC10FD2044A3C60003C045 /* Release */,
768
+ 338D0CEA231458BD00FA5F75 /* Profile */,
769
+ );
770
+ defaultConfigurationIsVisible = 0;
771
+ defaultConfigurationName = Release;
772
+ };
773
+ 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
774
+ isa = XCConfigurationList;
775
+ buildConfigurations = (
776
+ 33CC111C2044C6BA0003C045 /* Debug */,
777
+ 33CC111D2044C6BA0003C045 /* Release */,
778
+ 338D0CEB231458BD00FA5F75 /* Profile */,
779
+ );
780
+ defaultConfigurationIsVisible = 0;
781
+ defaultConfigurationName = Release;
782
+ };
783
+/* End XCConfigurationList section */
784
+ };
785
+ rootObject = 33CC10E52044A3C60003C045 /* Project object */;
786
+}
sdk/dart/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new
+8
@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+ <key>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+</dict>
8
+</plist>
sdk/dart/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new
+99
@@ -0,0 +1,99 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Scheme
3
+ LastUpgradeVersion = "1510"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "33CC10EC2044A3C60003C045"
18
+ BuildableName = "onde_inference_example.app"
19
+ BlueprintName = "Runner"
20
+ ReferencedContainer = "container:Runner.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ buildConfiguration = "Debug"
27
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
+ shouldUseLaunchSchemeArgsEnv = "YES">
30
+ <MacroExpansion>
31
+ <BuildableReference
32
+ BuildableIdentifier = "primary"
33
+ BlueprintIdentifier = "33CC10EC2044A3C60003C045"
34
+ BuildableName = "onde_inference_example.app"
35
+ BlueprintName = "Runner"
36
+ ReferencedContainer = "container:Runner.xcodeproj">
37
+ </BuildableReference>
38
+ </MacroExpansion>
39
+ <Testables>
40
+ <TestableReference
41
+ skipped = "NO"
42
+ parallelizable = "YES">
43
+ <BuildableReference
44
+ BuildableIdentifier = "primary"
45
+ BlueprintIdentifier = "331C80D4294CF70F00263BE5"
46
+ BuildableName = "RunnerTests.xctest"
47
+ BlueprintName = "RunnerTests"
48
+ ReferencedContainer = "container:Runner.xcodeproj">
49
+ </BuildableReference>
50
+ </TestableReference>
51
+ </Testables>
52
+ </TestAction>
53
+ <LaunchAction
54
+ buildConfiguration = "Debug"
55
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
56
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57
+ launchStyle = "0"
58
+ useCustomWorkingDirectory = "NO"
59
+ ignoresPersistentStateOnLaunch = "NO"
60
+ debugDocumentVersioning = "YES"
61
+ debugServiceExtension = "internal"
62
+ enableGPUValidationMode = "1"
63
+ allowLocationSimulation = "YES">
64
+ <BuildableProductRunnable
65
+ runnableDebuggingMode = "0">
66
+ <BuildableReference
67
+ BuildableIdentifier = "primary"
68
+ BlueprintIdentifier = "33CC10EC2044A3C60003C045"
69
+ BuildableName = "onde_inference_example.app"
70
+ BlueprintName = "Runner"
71
+ ReferencedContainer = "container:Runner.xcodeproj">
72
+ </BuildableReference>
73
+ </BuildableProductRunnable>
74
+ </LaunchAction>
75
+ <ProfileAction
76
+ buildConfiguration = "Profile"
77
+ shouldUseLaunchSchemeArgsEnv = "YES"
78
+ savedToolIdentifier = ""
79
+ useCustomWorkingDirectory = "NO"
80
+ debugDocumentVersioning = "YES">
81
+ <BuildableProductRunnable
82
+ runnableDebuggingMode = "0">
83
+ <BuildableReference
84
+ BuildableIdentifier = "primary"
85
+ BlueprintIdentifier = "33CC10EC2044A3C60003C045"
86
+ BuildableName = "onde_inference_example.app"
87
+ BlueprintName = "Runner"
88
+ ReferencedContainer = "container:Runner.xcodeproj">
89
+ </BuildableReference>
90
+ </BuildableProductRunnable>
91
+ </ProfileAction>
92
+ <AnalyzeAction
93
+ buildConfiguration = "Debug">
94
+ </AnalyzeAction>
95
+ <ArchiveAction
96
+ buildConfiguration = "Release"
97
+ revealArchiveInOrganizer = "YES">
98
+ </ArchiveAction>
99
+</Scheme>
sdk/dart/example/macos/Runner.xcworkspace/contents.xcworkspacedata
new
+10
@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "group:Runner.xcodeproj">
6
+ </FileRef>
7
+ <FileRef
8
+ location = "group:Pods/Pods.xcodeproj">
9
+ </FileRef>
10
+</Workspace>
sdk/dart/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new
+8
@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+ <key>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+</dict>
8
+</plist>
sdk/dart/example/macos/Runner/AppDelegate.swift
new
+13
@@ -0,0 +1,13 @@
1
+import Cocoa
2
+import FlutterMacOS
3
+
4
+@main
5
+class AppDelegate: FlutterAppDelegate {
6
+ override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7
+ return true
8
+ }
9
+
10
+ override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
11
+ return true
12
+ }
13
+}
sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new
+68
@@ -0,0 +1,68 @@
1
+{
2
+ "images" : [
3
+ {
4
+ "size" : "16x16",
5
+ "idiom" : "mac",
6
+ "filename" : "app_icon_16.png",
7
+ "scale" : "1x"
8
+ },
9
+ {
10
+ "size" : "16x16",
11
+ "idiom" : "mac",
12
+ "filename" : "app_icon_32.png",
13
+ "scale" : "2x"
14
+ },
15
+ {
16
+ "size" : "32x32",
17
+ "idiom" : "mac",
18
+ "filename" : "app_icon_32.png",
19
+ "scale" : "1x"
20
+ },
21
+ {
22
+ "size" : "32x32",
23
+ "idiom" : "mac",
24
+ "filename" : "app_icon_64.png",
25
+ "scale" : "2x"
26
+ },
27
+ {
28
+ "size" : "128x128",
29
+ "idiom" : "mac",
30
+ "filename" : "app_icon_128.png",
31
+ "scale" : "1x"
32
+ },
33
+ {
34
+ "size" : "128x128",
35
+ "idiom" : "mac",
36
+ "filename" : "app_icon_256.png",
37
+ "scale" : "2x"
38
+ },
39
+ {
40
+ "size" : "256x256",
41
+ "idiom" : "mac",
42
+ "filename" : "app_icon_256.png",
43
+ "scale" : "1x"
44
+ },
45
+ {
46
+ "size" : "256x256",
47
+ "idiom" : "mac",
48
+ "filename" : "app_icon_512.png",
49
+ "scale" : "2x"
50
+ },
51
+ {
52
+ "size" : "512x512",
53
+ "idiom" : "mac",
54
+ "filename" : "app_icon_512.png",
55
+ "scale" : "1x"
56
+ },
57
+ {
58
+ "size" : "512x512",
59
+ "idiom" : "mac",
60
+ "filename" : "app_icon_1024.png",
61
+ "scale" : "2x"
62
+ }
63
+ ],
64
+ "info" : {
65
+ "version" : 1,
66
+ "author" : "xcode"
67
+ }
68
+}
sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
Binary files /dev/null and b/sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ
sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
Binary files /dev/null and b/sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ
sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
Binary files /dev/null and b/sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ
sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
Binary files /dev/null and b/sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ
sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
Binary files /dev/null and b/sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ
sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
Binary files /dev/null and b/sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ
sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
Binary files /dev/null and b/sdk/dart/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ
sdk/dart/example/macos/Runner/Base.lproj/MainMenu.xib
new
+343
@@ -0,0 +1,343 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
3
+ <dependencies>
4
+ <deployment identifier="macosx"/>
5
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
6
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
7
+ </dependencies>
8
+ <objects>
9
+ <customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
10
+ <connections>
11
+ <outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
12
+ </connections>
13
+ </customObject>
14
+ <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
15
+ <customObject id="-3" userLabel="Application" customClass="NSObject"/>
16
+ <customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Runner" customModuleProvider="target">
17
+ <connections>
18
+ <outlet property="applicationMenu" destination="uQy-DD-JDr" id="XBo-yE-nKs"/>
19
+ <outlet property="mainFlutterWindow" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
20
+ </connections>
21
+ </customObject>
22
+ <customObject id="YLy-65-1bz" customClass="NSFontManager"/>
23
+ <menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
24
+ <items>
25
+ <menuItem title="APP_NAME" id="1Xt-HY-uBw">
26
+ <modifierMask key="keyEquivalentModifierMask"/>
27
+ <menu key="submenu" title="APP_NAME" systemMenu="apple" id="uQy-DD-JDr">
28
+ <items>
29
+ <menuItem title="About APP_NAME" id="5kV-Vb-QxS">
30
+ <modifierMask key="keyEquivalentModifierMask"/>
31
+ <connections>
32
+ <action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
33
+ </connections>
34
+ </menuItem>
35
+ <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
36
+ <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
37
+ <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
38
+ <menuItem title="Services" id="NMo-om-nkz">
39
+ <modifierMask key="keyEquivalentModifierMask"/>
40
+ <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
41
+ </menuItem>
42
+ <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
43
+ <menuItem title="Hide APP_NAME" keyEquivalent="h" id="Olw-nP-bQN">
44
+ <connections>
45
+ <action selector="hide:" target="-1" id="PnN-Uc-m68"/>
46
+ </connections>
47
+ </menuItem>
48
+ <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
49
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
50
+ <connections>
51
+ <action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
52
+ </connections>
53
+ </menuItem>
54
+ <menuItem title="Show All" id="Kd2-mp-pUS">
55
+ <modifierMask key="keyEquivalentModifierMask"/>
56
+ <connections>
57
+ <action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
58
+ </connections>
59
+ </menuItem>
60
+ <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
61
+ <menuItem title="Quit APP_NAME" keyEquivalent="q" id="4sb-4s-VLi">
62
+ <connections>
63
+ <action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
64
+ </connections>
65
+ </menuItem>
66
+ </items>
67
+ </menu>
68
+ </menuItem>
69
+ <menuItem title="Edit" id="5QF-Oa-p0T">
70
+ <modifierMask key="keyEquivalentModifierMask"/>
71
+ <menu key="submenu" title="Edit" id="W48-6f-4Dl">
72
+ <items>
73
+ <menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
74
+ <connections>
75
+ <action selector="undo:" target="-1" id="M6e-cu-g7V"/>
76
+ </connections>
77
+ </menuItem>
78
+ <menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
79
+ <connections>
80
+ <action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
81
+ </connections>
82
+ </menuItem>
83
+ <menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
84
+ <menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
85
+ <connections>
86
+ <action selector="cut:" target="-1" id="YJe-68-I9s"/>
87
+ </connections>
88
+ </menuItem>
89
+ <menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
90
+ <connections>
91
+ <action selector="copy:" target="-1" id="G1f-GL-Joy"/>
92
+ </connections>
93
+ </menuItem>
94
+ <menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
95
+ <connections>
96
+ <action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
97
+ </connections>
98
+ </menuItem>
99
+ <menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
100
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
101
+ <connections>
102
+ <action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
103
+ </connections>
104
+ </menuItem>
105
+ <menuItem title="Delete" id="pa3-QI-u2k">
106
+ <modifierMask key="keyEquivalentModifierMask"/>
107
+ <connections>
108
+ <action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
109
+ </connections>
110
+ </menuItem>
111
+ <menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
112
+ <connections>
113
+ <action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
114
+ </connections>
115
+ </menuItem>
116
+ <menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
117
+ <menuItem title="Find" id="4EN-yA-p0u">
118
+ <modifierMask key="keyEquivalentModifierMask"/>
119
+ <menu key="submenu" title="Find" id="1b7-l0-nxx">
120
+ <items>
121
+ <menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
122
+ <connections>
123
+ <action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
124
+ </connections>
125
+ </menuItem>
126
+ <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
127
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
128
+ <connections>
129
+ <action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
130
+ </connections>
131
+ </menuItem>
132
+ <menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
133
+ <connections>
134
+ <action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
135
+ </connections>
136
+ </menuItem>
137
+ <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
138
+ <connections>
139
+ <action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
140
+ </connections>
141
+ </menuItem>
142
+ <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
143
+ <connections>
144
+ <action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
145
+ </connections>
146
+ </menuItem>
147
+ <menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
148
+ <connections>
149
+ <action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
150
+ </connections>
151
+ </menuItem>
152
+ </items>
153
+ </menu>
154
+ </menuItem>
155
+ <menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
156
+ <modifierMask key="keyEquivalentModifierMask"/>
157
+ <menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
158
+ <items>
159
+ <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
160
+ <connections>
161
+ <action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
162
+ </connections>
163
+ </menuItem>
164
+ <menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
165
+ <connections>
166
+ <action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
167
+ </connections>
168
+ </menuItem>
169
+ <menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
170
+ <menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
171
+ <modifierMask key="keyEquivalentModifierMask"/>
172
+ <connections>
173
+ <action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
174
+ </connections>
175
+ </menuItem>
176
+ <menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
177
+ <modifierMask key="keyEquivalentModifierMask"/>
178
+ <connections>
179
+ <action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
180
+ </connections>
181
+ </menuItem>
182
+ <menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
183
+ <modifierMask key="keyEquivalentModifierMask"/>
184
+ <connections>
185
+ <action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
186
+ </connections>
187
+ </menuItem>
188
+ </items>
189
+ </menu>
190
+ </menuItem>
191
+ <menuItem title="Substitutions" id="9ic-FL-obx">
192
+ <modifierMask key="keyEquivalentModifierMask"/>
193
+ <menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
194
+ <items>
195
+ <menuItem title="Show Substitutions" id="z6F-FW-3nz">
196
+ <modifierMask key="keyEquivalentModifierMask"/>
197
+ <connections>
198
+ <action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
199
+ </connections>
200
+ </menuItem>
201
+ <menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
202
+ <menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
203
+ <modifierMask key="keyEquivalentModifierMask"/>
204
+ <connections>
205
+ <action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
206
+ </connections>
207
+ </menuItem>
208
+ <menuItem title="Smart Quotes" id="hQb-2v-fYv">
209
+ <modifierMask key="keyEquivalentModifierMask"/>
210
+ <connections>
211
+ <action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
212
+ </connections>
213
+ </menuItem>
214
+ <menuItem title="Smart Dashes" id="rgM-f4-ycn">
215
+ <modifierMask key="keyEquivalentModifierMask"/>
216
+ <connections>
217
+ <action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
218
+ </connections>
219
+ </menuItem>
220
+ <menuItem title="Smart Links" id="cwL-P1-jid">
221
+ <modifierMask key="keyEquivalentModifierMask"/>
222
+ <connections>
223
+ <action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
224
+ </connections>
225
+ </menuItem>
226
+ <menuItem title="Data Detectors" id="tRr-pd-1PS">
227
+ <modifierMask key="keyEquivalentModifierMask"/>
228
+ <connections>
229
+ <action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
230
+ </connections>
231
+ </menuItem>
232
+ <menuItem title="Text Replacement" id="HFQ-gK-NFA">
233
+ <modifierMask key="keyEquivalentModifierMask"/>
234
+ <connections>
235
+ <action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
236
+ </connections>
237
+ </menuItem>
238
+ </items>
239
+ </menu>
240
+ </menuItem>
241
+ <menuItem title="Transformations" id="2oI-Rn-ZJC">
242
+ <modifierMask key="keyEquivalentModifierMask"/>
243
+ <menu key="submenu" title="Transformations" id="c8a-y6-VQd">
244
+ <items>
245
+ <menuItem title="Make Upper Case" id="vmV-6d-7jI">
246
+ <modifierMask key="keyEquivalentModifierMask"/>
247
+ <connections>
248
+ <action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
249
+ </connections>
250
+ </menuItem>
251
+ <menuItem title="Make Lower Case" id="d9M-CD-aMd">
252
+ <modifierMask key="keyEquivalentModifierMask"/>
253
+ <connections>
254
+ <action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
255
+ </connections>
256
+ </menuItem>
257
+ <menuItem title="Capitalize" id="UEZ-Bs-lqG">
258
+ <modifierMask key="keyEquivalentModifierMask"/>
259
+ <connections>
260
+ <action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
261
+ </connections>
262
+ </menuItem>
263
+ </items>
264
+ </menu>
265
+ </menuItem>
266
+ <menuItem title="Speech" id="xrE-MZ-jX0">
267
+ <modifierMask key="keyEquivalentModifierMask"/>
268
+ <menu key="submenu" title="Speech" id="3rS-ZA-NoH">
269
+ <items>
270
+ <menuItem title="Start Speaking" id="Ynk-f8-cLZ">
271
+ <modifierMask key="keyEquivalentModifierMask"/>
272
+ <connections>
273
+ <action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
274
+ </connections>
275
+ </menuItem>
276
+ <menuItem title="Stop Speaking" id="Oyz-dy-DGm">
277
+ <modifierMask key="keyEquivalentModifierMask"/>
278
+ <connections>
279
+ <action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
280
+ </connections>
281
+ </menuItem>
282
+ </items>
283
+ </menu>
284
+ </menuItem>
285
+ </items>
286
+ </menu>
287
+ </menuItem>
288
+ <menuItem title="View" id="H8h-7b-M4v">
289
+ <modifierMask key="keyEquivalentModifierMask"/>
290
+ <menu key="submenu" title="View" id="HyV-fh-RgO">
291
+ <items>
292
+ <menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
293
+ <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
294
+ <connections>
295
+ <action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/>
296
+ </connections>
297
+ </menuItem>
298
+ </items>
299
+ </menu>
300
+ </menuItem>
301
+ <menuItem title="Window" id="aUF-d1-5bR">
302
+ <modifierMask key="keyEquivalentModifierMask"/>
303
+ <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
304
+ <items>
305
+ <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
306
+ <connections>
307
+ <action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
308
+ </connections>
309
+ </menuItem>
310
+ <menuItem title="Zoom" id="R4o-n2-Eq4">
311
+ <modifierMask key="keyEquivalentModifierMask"/>
312
+ <connections>
313
+ <action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
314
+ </connections>
315
+ </menuItem>
316
+ <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
317
+ <menuItem title="Bring All to Front" id="LE2-aR-0XJ">
318
+ <modifierMask key="keyEquivalentModifierMask"/>
319
+ <connections>
320
+ <action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
321
+ </connections>
322
+ </menuItem>
323
+ </items>
324
+ </menu>
325
+ </menuItem>
326
+ <menuItem title="Help" id="EPT-qC-fAb">
327
+ <modifierMask key="keyEquivalentModifierMask"/>
328
+ <menu key="submenu" title="Help" systemMenu="help" id="rJ0-wn-3NY"/>
329
+ </menuItem>
330
+ </items>
331
+ <point key="canvasLocation" x="142" y="-258"/>
332
+ </menu>
333
+ <window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target">
334
+ <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
335
+ <rect key="contentRect" x="335" y="390" width="800" height="600"/>
336
+ <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/>
337
+ <view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
338
+ <rect key="frame" x="0.0" y="0.0" width="800" height="600"/>
339
+ <autoresizingMask key="autoresizingMask"/>
340
+ </view>
341
+ </window>
342
+ </objects>
343
+</document>
sdk/dart/example/macos/Runner/Configs/AppInfo.xcconfig
new
+14
@@ -0,0 +1,14 @@
1
+// Application-level settings for the Runner target.
2
+//
3
+// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4
+// future. If not, the values below would default to using the project name when this becomes a
5
+// 'flutter create' template.
6
+
7
+// The application's name. By default this is also the title of the Flutter window.
8
+PRODUCT_NAME = onde_inference_example
9
+
10
+// The application's bundle identifier
11
+PRODUCT_BUNDLE_IDENTIFIER = com.ondeinference.ondeInferenceExample
12
+
13
+// The copyright displayed in application information
14
+PRODUCT_COPYRIGHT = Copyright © 2026 com.ondeinference. All rights reserved.
sdk/dart/example/macos/Runner/Configs/Debug.xcconfig
new
+2
@@ -0,0 +1,2 @@
1
+#include "../../Flutter/Flutter-Debug.xcconfig"
2
+#include "Warnings.xcconfig"
sdk/dart/example/macos/Runner/Configs/Release.xcconfig
new
+2
@@ -0,0 +1,2 @@
1
+#include "../../Flutter/Flutter-Release.xcconfig"
2
+#include "Warnings.xcconfig"
sdk/dart/example/macos/Runner/Configs/Warnings.xcconfig
new
+13
@@ -0,0 +1,13 @@
1
+WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2
+GCC_WARN_UNDECLARED_SELECTOR = YES
3
+CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4
+CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5
+CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6
+CLANG_WARN_PRAGMA_PACK = YES
7
+CLANG_WARN_STRICT_PROTOTYPES = YES
8
+CLANG_WARN_COMMA = YES
9
+GCC_WARN_STRICT_SELECTOR_MATCH = YES
10
+CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12
+GCC_WARN_SHADOW = YES
13
+CLANG_WARN_UNREACHABLE_CODE = YES
sdk/dart/example/macos/Runner/DebugProfile.entitlements
new
+14
@@ -0,0 +1,14 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+ <key>com.apple.security.app-sandbox</key>
6
+ <true/>
7
+ <key>com.apple.security.cs.allow-jit</key>
8
+ <true/>
9
+ <key>com.apple.security.network.client</key>
10
+ <true/>
11
+ <key>com.apple.security.network.server</key>
12
+ <true/>
13
+</dict>
14
+</plist>
sdk/dart/example/macos/Runner/Info.plist
new
+32
@@ -0,0 +1,32 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>$(EXECUTABLE_NAME)</string>
9
+ <key>CFBundleIconFile</key>
10
+ <string></string>
11
+ <key>CFBundleIdentifier</key>
12
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13
+ <key>CFBundleInfoDictionaryVersion</key>
14
+ <string>6.0</string>
15
+ <key>CFBundleName</key>
16
+ <string>$(PRODUCT_NAME)</string>
17
+ <key>CFBundlePackageType</key>
18
+ <string>APPL</string>
19
+ <key>CFBundleShortVersionString</key>
20
+ <string>$(FLUTTER_BUILD_NAME)</string>
21
+ <key>CFBundleVersion</key>
22
+ <string>$(FLUTTER_BUILD_NUMBER)</string>
23
+ <key>LSMinimumSystemVersion</key>
24
+ <string>$(MACOSX_DEPLOYMENT_TARGET)</string>
25
+ <key>NSHumanReadableCopyright</key>
26
+ <string>$(PRODUCT_COPYRIGHT)</string>
27
+ <key>NSMainNibFile</key>
28
+ <string>MainMenu</string>
29
+ <key>NSPrincipalClass</key>
30
+ <string>NSApplication</string>
31
+</dict>
32
+</plist>
sdk/dart/example/macos/Runner/MainFlutterWindow.swift
new
+15
@@ -0,0 +1,15 @@
1
+import Cocoa
2
+import FlutterMacOS
3
+
4
+class MainFlutterWindow: NSWindow {
5
+ override func awakeFromNib() {
6
+ let flutterViewController = FlutterViewController()
7
+ let windowFrame = self.frame
8
+ self.contentViewController = flutterViewController
9
+ self.setFrame(windowFrame, display: true)
10
+
11
+ RegisterGeneratedPlugins(registry: flutterViewController)
12
+
13
+ super.awakeFromNib()
14
+ }
15
+}
sdk/dart/example/macos/Runner/Release.entitlements
new
+8
@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+ <key>com.apple.security.app-sandbox</key>
6
+ <true/>
7
+</dict>
8
+</plist>
sdk/dart/example/macos/RunnerTests/RunnerTests.swift
new
+12
@@ -0,0 +1,12 @@
1
+import Cocoa
2
+import FlutterMacOS
3
+import XCTest
4
+
5
+class RunnerTests: XCTestCase {
6
+
7
+ func testExample() {
8
+ // If you add code to the Runner application, consider adding tests here.
9
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10
+ }
11
+
12
+}
sdk/dart/example/pubspec.yaml
new
+22
@@ -0,0 +1,22 @@
1
+name: onde_inference_example
2
+description: Example Flutter app demonstrating the onde_inference SDK.
3
+publish_to: 'none'
4
+version: 1.0.0+1
5
+
6
+environment:
7
+ sdk: '>=3.3.0 <4.0.0'
8
+ flutter: '>=3.10.0'
9
+
10
+dependencies:
11
+ flutter:
12
+ sdk: flutter
13
+ onde_inference:
14
+ path: ../
15
+
16
+dev_dependencies:
17
+ flutter_test:
18
+ sdk: flutter
19
+ flutter_lints: ^5.0.0
20
+
21
+flutter:
22
+ uses-material-design: true
sdk/dart/example/test/widget_test.dart
new
+30
@@ -0,0 +1,30 @@
1
+// This is a basic Flutter widget test.
2
+//
3
+// To perform an interaction with a widget in your test, use the WidgetTester
4
+// utility in the flutter_test package. For example, you can send tap and scroll
5
+// gestures. You can also use WidgetTester to find child widgets in the widget
6
+// tree, read text, and verify that the values of widget properties are correct.
7
+
8
+import 'package:flutter/material.dart';
9
+import 'package:flutter_test/flutter_test.dart';
10
+
11
+import 'package:onde_inference_example/main.dart';
12
+
13
+void main() {
14
+ testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15
+ // Build our app and trigger a frame.
16
+ await tester.pumpWidget(const MyApp());
17
+
18
+ // Verify that our counter starts at 0.
19
+ expect(find.text('0'), findsOneWidget);
20
+ expect(find.text('1'), findsNothing);
21
+
22
+ // Tap the '+' icon and trigger a frame.
23
+ await tester.tap(find.byIcon(Icons.add));
24
+ await tester.pump();
25
+
26
+ // Verify that our counter has incremented.
27
+ expect(find.text('0'), findsNothing);
28
+ expect(find.text('1'), findsOneWidget);
29
+ });
30
+}
sdk/dart/flutter_rust_bridge.yaml
new
+22
@@ -0,0 +1,22 @@
1
+# flutter_rust_bridge codegen configuration
2
+# Run from the package root (onde/sdk/dart/):
3
+# flutter_rust_bridge_codegen generate
4
+
5
+# Rust crate root (relative to this config file)
6
+rust_root: "rust"
7
+
8
+# Module path syntax required by FRB 2.x
9
+rust_input: "crate::api"
10
+
11
+# Generated Dart output — replaces the pre-codegen stub
12
+dart_output: "lib/src/frb_generated.dart"
13
+
14
+# Dart entrypoint class name used by RustLib.init()
15
+dart_entrypoint_class_name: RustLib
16
+
17
+# Suppress lint warnings in generated Dart code
18
+dart_preamble: |
19
+ // ignore_for_file: type=lint, unused_import, unnecessary_import
20
+
21
+# Web is not supported — on-device LLM inference requires native system access
22
+web: false
sdk/dart/ios/onde_inference.podspec
new
+51
@@ -0,0 +1,51 @@
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 (iOS).'
5
+ s.description = 'Runs Qwen 2.5 models locally on iOS 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 'Flutter'
12
+ s.platform = :ios, '13.0'
13
+
14
+ s.pod_target_xcconfig = {
15
+ 'DEFINES_MODULE' => 'YES',
16
+ 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386',
17
+ }
18
+ s.swift_version = '5.0'
19
+
20
+ s.script_phases = [
21
+ {
22
+ :name => 'Build Rust bridge (onde_inference_dart)',
23
+ :script => <<~SHELL,
24
+ set -e
25
+ RUST_DIR="${PODS_TARGET_SRCROOT}/../rust"
26
+ cd "$RUST_DIR"
27
+
28
+ if [[ "$PLATFORM_NAME" == "iphonesimulator" ]]; then
29
+ TARGET="aarch64-apple-ios-sim"
30
+ else
31
+ TARGET="aarch64-apple-ios"
32
+ fi
33
+
34
+ cargo build --release --target "$TARGET"
35
+
36
+ cp "target/$TARGET/release/libonde_inference_dart.a" \
37
+ "${PODS_TARGET_SRCROOT}/libonde_inference_dart.a"
38
+ SHELL
39
+ :execution_position => :before_compile,
40
+ :output_files => ["${PODS_TARGET_SRCROOT}/libonde_inference_dart.a"],
41
+ }
42
+ ]
43
+
44
+ s.pod_target_xcconfig = {
45
+ 'DEFINES_MODULE' => 'YES',
46
+ 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386',
47
+ 'OTHER_LDFLAGS' =>
48
+ '-force_load ${PODS_TARGET_SRCROOT}/libonde_inference_dart.a',
49
+ }
50
+ s.preserve_paths = '../rust/**/*'
51
+end
sdk/dart/lib/onde_inference.dart
new
+99
@@ -0,0 +1,99 @@
1
+// Copyright 2024 Onde Inference. All rights reserved.
2
+// Use of this source code is governed by the MIT license that can be found in
3
+// the LICENSE file.
4
+
5
+/// On-device LLM inference SDK for Flutter & Dart.
6
+///
7
+/// Runs Qwen 2.5 models locally with Metal (Apple silicon) and CPU
8
+/// acceleration — no cloud, no data leaving the device.
9
+/// Powered by the Onde Rust engine and [mistral.rs](https://github.com/EricLBuehler/mistral.rs).
10
+///
11
+/// ## Quick start
12
+///
13
+/// ```dart
14
+/// import 'package:onde_inference/onde_inference.dart';
15
+///
16
+/// Future<void> main() async {
17
+/// // 1. Initialise the Rust library once at startup.
18
+/// await OndeInference.init();
19
+///
20
+/// // 2. Create an engine and load the platform-appropriate default model.
21
+/// final engine = await OndeChatEngine.create();
22
+/// await engine.loadDefaultModel(
23
+/// systemPrompt: 'You are a helpful assistant.',
24
+/// );
25
+///
26
+/// // 3. Single-turn completion.
27
+/// final result = await engine.sendMessage('Hello!');
28
+/// print(result.text);
29
+///
30
+/// // 4. Streaming completion.
31
+/// final buffer = StringBuffer();
32
+/// await for (final chunk in engine.streamMessage('Tell me a short story.')) {
33
+/// buffer.write(chunk.delta);
34
+/// if (chunk.done) break;
35
+/// }
36
+/// print(buffer.toString());
37
+///
38
+/// // 5. Release device memory when done.
39
+/// await engine.unloadModel();
40
+/// }
41
+/// ```
42
+///
43
+/// ## Selecting a model
44
+///
45
+/// ```dart
46
+/// // Platform-aware default (1.5B on mobile, 3B on desktop).
47
+/// final config = OndeInference.defaultModelConfig();
48
+///
49
+/// // Or pick a specific model.
50
+/// final coderConfig = OndeInference.qwen25Coder3bConfig();
51
+///
52
+/// await engine.loadGgufModel(coderConfig);
53
+/// ```
54
+///
55
+/// ## Customising sampling
56
+///
57
+/// ```dart
58
+/// // Deterministic output for coding / fact-retrieval tasks.
59
+/// await engine.setSampling(OndeInference.deterministicSamplingConfig());
60
+///
61
+/// // Or pass sampling directly when loading a model.
62
+/// await engine.loadDefaultModel(
63
+/// sampling: SamplingConfig(temperature: 0.5, maxTokens: 256),
64
+/// );
65
+/// ```
66
+///
67
+/// ## Error handling
68
+///
69
+/// All methods throw [OndeException] on failure:
70
+///
71
+/// ```dart
72
+/// try {
73
+/// await engine.sendMessage('...');
74
+/// } on OndeException catch (e) {
75
+/// debugPrint('Inference error: ${e.message}');
76
+/// }
77
+/// ```
78
+///
79
+/// ## Code generation (native bridge)
80
+///
81
+/// The package ships with a compilation stub so it can be imported before the
82
+/// Rust binary is built. To generate the real FFI bridge, run from the package
83
+/// root:
84
+///
85
+/// ```sh
86
+/// dart run flutter_rust_bridge_codegen generate
87
+/// ```
88
+///
89
+/// See the [README](https://github.com/ondeinference/onde) for full build
90
+/// instructions.
91
+library;
92
+
93
+// All core data types (ChatMessage, SamplingConfig, GgufModelConfig, etc.)
94
+// re-exported from the FRB-generated api.dart via types.dart.
95
+export 'src/types.dart';
96
+
97
+// Engine API — OndeChatEngineX extension, OndeInference static helpers,
98
+// OndeChatEngine opaque type, OndeError sealed class, and RustLib.
99
+export 'src/engine.dart';
sdk/dart/lib/src/engine.dart
new
+184
@@ -0,0 +1,184 @@
1
+// ignore_for_file: prefer_const_constructors
2
+
3
+import 'dart:async';
4
+
5
+import 'frb_generated.dart/frb_generated.dart' as frb;
6
+import 'frb_generated.dart/api.dart' as api;
7
+import 'types.dart';
8
+
9
+export 'frb_generated.dart/frb_generated.dart' show RustLib;
10
+export 'frb_generated.dart/api.dart'
11
+ show
12
+ OndeChatEngine,
13
+ OndeError,
14
+ OndeError_NoModelLoaded,
15
+ OndeError_AlreadyLoaded,
16
+ OndeError_ModelBuild,
17
+ OndeError_Inference,
18
+ OndeError_Cancelled,
19
+ OndeError_Other;
20
+
21
+// ---------------------------------------------------------------------------
22
+// OndeChatEngine convenience wrapper
23
+// ---------------------------------------------------------------------------
24
+
25
+/// High-level wrapper around the FRB-generated [api.OndeChatEngine] opaque type.
26
+///
27
+/// Provides:
28
+/// - [OndeChatEngineX.loadDefaultModel] — convenience method not in generated code
29
+/// - [OndeChatEngineX.clearHistoryCount] — returns `int` instead of `BigInt`
30
+/// - [OndeInference] — static initialisation + config/sampling factory helpers
31
+///
32
+/// ## Lifecycle
33
+///
34
+/// ```dart
35
+/// // 1. Initialise once at app startup (idempotent).
36
+/// await OndeInference.init();
37
+///
38
+/// // 2. Create a native engine instance (sync — no Future).
39
+/// final engine = OndeChatEngine();
40
+///
41
+/// // 3. Load the platform-appropriate default model.
42
+/// await engine.loadDefaultModel(
43
+/// systemPrompt: 'You are a helpful assistant.',
44
+/// );
45
+///
46
+/// // 4. Chat.
47
+/// final result = await engine.sendMessage(message: 'Hello!');
48
+/// print(result.text);
49
+///
50
+/// // 5. Streaming.
51
+/// await for (final chunk in engine.streamMessage(message: 'Tell me a story.')) {
52
+/// stdout.write(chunk.delta);
53
+/// if (chunk.done) break;
54
+/// }
55
+///
56
+/// // 6. Clean up.
57
+/// await engine.unloadModel();
58
+/// ```
59
+///
60
+/// ## Thread safety
61
+///
62
+/// [OndeChatEngine] is backed by an `Arc`-wrapped Rust object and is safe to
63
+/// reference from multiple Dart isolates. Concurrent inference calls are
64
+/// serialised internally.
65
+extension OndeChatEngineX on api.OndeChatEngine {
66
+ // -------------------------------------------------------------------------
67
+ // loadDefaultModel — implemented in Dart (not in generated bridge)
68
+ // -------------------------------------------------------------------------
69
+
70
+ /// Loads the platform-appropriate default model.
71
+ ///
72
+ /// On iOS, tvOS, and Android the Qwen 2.5 1.5B (Q4_K_M, ~941 MB) model is
73
+ /// used. On macOS, Windows, and Linux the Qwen 2.5 3B (Q4_K_M, ~1.93 GB)
74
+ /// model is used.
75
+ ///
76
+ /// Delegates to [loadGgufModel] with [OndeInference.defaultModelConfig].
77
+ ///
78
+ /// [systemPrompt] replaces the engine's system prompt before loading.
79
+ /// [sampling] overrides the default sampling parameters.
80
+ ///
81
+ /// Returns the wall-clock seconds taken to load the model.
82
+ ///
83
+ /// Throws [OndeError] if the model cannot be downloaded or loaded.
84
+ Future<double> loadDefaultModel({
85
+ String? systemPrompt,
86
+ SamplingConfig? sampling,
87
+ }) =>
88
+ loadGgufModel(
89
+ config: api.defaultModelConfig(),
90
+ systemPrompt: systemPrompt,
91
+ sampling: sampling,
92
+ );
93
+
94
+ // -------------------------------------------------------------------------
95
+ // clearHistoryCount — int-typed convenience over clearHistory() → BigInt
96
+ // -------------------------------------------------------------------------
97
+
98
+ /// Clears the conversation history and returns the count as a plain [int].
99
+ ///
100
+ /// The generated [clearHistory] returns `Future<BigInt>`; this helper
101
+ /// downcasts it so callers never need to handle [BigInt] directly.
102
+ Future<int> clearHistoryCount() async => (await clearHistory()).toInt();
103
+}
104
+
105
+// ---------------------------------------------------------------------------
106
+// OndeInference — static SDK helpers
107
+// ---------------------------------------------------------------------------
108
+
109
+/// Static helper namespace for Onde SDK initialisation and configuration.
110
+///
111
+/// ```dart
112
+/// // Initialise before creating any OndeChatEngine.
113
+/// await OndeInference.init();
114
+///
115
+/// // Obtain a model config.
116
+/// final config = OndeInference.defaultModelConfig();
117
+///
118
+/// // Obtain sampling parameters.
119
+/// final sampling = OndeInference.deterministicSamplingConfig();
120
+/// ```
121
+abstract final class OndeInference {
122
+ // -------------------------------------------------------------------------
123
+ // Initialisation
124
+ // -------------------------------------------------------------------------
125
+
126
+ /// Initialises the Rust shared library.
127
+ ///
128
+ /// Must be called before creating any [OndeChatEngine]. Subsequent calls
129
+ /// are safe no-ops — the library is only initialised once per process.
130
+ ///
131
+ /// Call this in `main()` or in a Flutter `initState` override before any
132
+ /// user interaction that could trigger model loading.
133
+ static Future<void> init() => frb.RustLib.init();
134
+
135
+ // -------------------------------------------------------------------------
136
+ // Model config factories
137
+ // -------------------------------------------------------------------------
138
+
139
+ /// Platform-appropriate default model config.
140
+ ///
141
+ /// Selects Qwen 2.5 1.5B on iOS / tvOS / Android and Qwen 2.5 3B on
142
+ /// macOS / Windows / Linux. Delegates to the Rust `default_model_config`
143
+ /// free function so the platform check runs natively.
144
+ static GgufModelConfig defaultModelConfig() => api.defaultModelConfig();
145
+
146
+ /// Qwen 2.5 1.5B Instruct (GGUF Q4_K_M, ~941 MB).
147
+ ///
148
+ /// Suitable for iOS, tvOS, and Android where available memory is limited.
149
+ static GgufModelConfig qwen2515bConfig() => api.qwen2515BConfig();
150
+
151
+ /// Qwen 2.5 3B Instruct (GGUF Q4_K_M, ~1.93 GB).
152
+ ///
153
+ /// Suitable for macOS, Windows, and Linux desktop deployments.
154
+ static GgufModelConfig qwen253bConfig() => api.qwen253BConfig();
155
+
156
+ /// Qwen 2.5 Coder 1.5B Instruct (GGUF Q4_K_M, ~941 MB).
157
+ ///
158
+ /// Optimised for code-generation tasks on memory-constrained devices.
159
+ static GgufModelConfig qwen25Coder15bConfig() => api.qwen25Coder15BConfig();
160
+
161
+ /// Qwen 2.5 Coder 3B Instruct (GGUF Q4_K_M, ~1.93 GB).
162
+ ///
163
+ /// Optimised for code-generation tasks on macOS and Linux desktop.
164
+ static GgufModelConfig qwen25Coder3bConfig() => api.qwen25Coder3BConfig();
165
+
166
+ // -------------------------------------------------------------------------
167
+ // Sampling config factories
168
+ // -------------------------------------------------------------------------
169
+
170
+ /// Balanced defaults: `temperature=0.7`, `topP=0.95`, `maxTokens=512`.
171
+ ///
172
+ /// Good for general-purpose conversational chat.
173
+ static SamplingConfig defaultSamplingConfig() => api.defaultSamplingConfig();
174
+
175
+ /// Greedy / fully deterministic decoding: `temperature=0.0`, `maxTokens=512`.
176
+ ///
177
+ /// Use for coding, fact-retrieval, or reproducibility-sensitive tasks.
178
+ static SamplingConfig deterministicSamplingConfig() =>
179
+ api.deterministicSamplingConfig();
180
+
181
+ /// Low-latency preset for memory-constrained mobile:
182
+ /// `temperature=0.7`, `topP=0.95`, `maxTokens=128`.
183
+ static SamplingConfig mobileSamplingConfig() => api.mobileSamplingConfig();
184
+}
sdk/dart/lib/src/frb_generated.dart/api.dart
new
+375
@@ -0,0 +1,375 @@
1
+// This file is automatically generated, so please do not edit it.
2
+// @generated by `flutter_rust_bridge`@ 2.12.0.
3
+
4
+// ignore_for_file: type=lint, unused_import, unnecessary_import
5
+
6
+// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
7
+
8
+import 'frb_generated.dart';
9
+import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
10
+import 'package:freezed_annotation/freezed_annotation.dart' hide protected;
11
+part 'api.freezed.dart';
12
+
13
+// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `assert_receiver_is_total_eq`, `assert_receiver_is_total_eq`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `eq`, `eq`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`, `from`
14
+
15
+/// Return the platform-appropriate default `GgufModelConfig`.
16
+///
17
+/// Selects the 1.5B model on iOS / tvOS / Android and the 3B model on
18
+/// macOS / Windows / Linux.
19
+GgufModelConfig defaultModelConfig() =>
20
+ RustLib.instance.api.crateApiDefaultModelConfig();
21
+
22
+/// `GgufModelConfig` for Qwen 2.5 1.5B Instruct Q4_K_M (~941 MB).
23
+GgufModelConfig qwen2515BConfig() =>
24
+ RustLib.instance.api.crateApiQwen2515BConfig();
25
+
26
+/// `GgufModelConfig` for Qwen 2.5 3B Instruct Q4_K_M (~1.93 GB).
27
+GgufModelConfig qwen253BConfig() =>
28
+ RustLib.instance.api.crateApiQwen253BConfig();
29
+
30
+/// `GgufModelConfig` for Qwen 2.5 Coder 1.5B Instruct Q4_K_M (~941 MB).
31
+GgufModelConfig qwen25Coder15BConfig() =>
32
+ RustLib.instance.api.crateApiQwen25Coder15BConfig();
33
+
34
+/// `GgufModelConfig` for Qwen 2.5 Coder 3B Instruct Q4_K_M (~1.93 GB).
35
+GgufModelConfig qwen25Coder3BConfig() =>
36
+ RustLib.instance.api.crateApiQwen25Coder3BConfig();
37
+
38
+/// Default sampling config: `temperature=0.7`, `top_p=0.95`, `max_tokens=512`.
39
+SamplingConfig defaultSamplingConfig() =>
40
+ RustLib.instance.api.crateApiDefaultSamplingConfig();
41
+
42
+/// Deterministic sampling config: `temperature=0.0`, greedy, `max_tokens=512`.
43
+SamplingConfig deterministicSamplingConfig() =>
44
+ RustLib.instance.api.crateApiDeterministicSamplingConfig();
45
+
46
+/// Mobile sampling config: `temperature=0.7`, `top_p=0.95`, `max_tokens=128`.
47
+SamplingConfig mobileSamplingConfig() =>
48
+ RustLib.instance.api.crateApiMobileSamplingConfig();
49
+
50
+// Rust type: RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>>
51
+abstract class OndeChatEngine implements RustOpaqueInterface {
52
+ /// Clear the conversation history while keeping the model loaded.
53
+ ///
54
+ /// Returns the number of turns that were removed.
55
+ Future<BigInt> clearHistory();
56
+
57
+ /// Clear the current system prompt.
58
+ Future<void> clearSystemPrompt();
59
+
60
+ /// One-shot generation from an explicit message list.
61
+ ///
62
+ /// Does **not** modify the conversation history.
63
+ Future<InferenceResult> generate(
64
+ {required List<ChatMessage> messages, SamplingConfig? sampling});
65
+
66
+ /// Returns a clone of the full conversation history.
67
+ Future<List<ChatMessage>> history();
68
+
69
+ /// Returns a point-in-time snapshot of the engine's state.
70
+ Future<EngineInfo> info();
71
+
72
+ /// Returns `true` if a model is currently loaded and ready.
73
+ Future<bool> isLoaded();
74
+
75
+ /// Load a GGUF model into the engine.
76
+ ///
77
+ /// Returns the load duration in seconds on success.
78
+ Future<double> loadGgufModel(
79
+ {required GgufModelConfig config,
80
+ String? systemPrompt,
81
+ SamplingConfig? sampling});
82
+
83
+ /// Create a new engine with no model loaded.
84
+ factory OndeChatEngine() => RustLib.instance.api.crateApiOndeChatEngineNew();
85
+
86
+ /// Append a message to history without running inference.
87
+ ///
88
+ /// Useful for restoring a saved conversation or injecting context.
89
+ Future<void> pushHistory({required ChatMessage message});
90
+
91
+ /// Send a user message and receive a complete assistant reply.
92
+ ///
93
+ /// Both the user message and assistant reply are appended to the
94
+ /// conversation history on success.
95
+ Future<InferenceResult> sendMessage({required String message});
96
+
97
+ /// Replace the sampling configuration used for all subsequent inference.
98
+ Future<void> setSampling({required SamplingConfig sampling});
99
+
100
+ /// Set or replace the system prompt.
101
+ ///
102
+ /// The prompt is prepended to every inference request and is **not**
103
+ /// stored in the conversation history.
104
+ Future<void> setSystemPrompt({required String prompt});
105
+
106
+ /// Stream a reply token-by-token.
107
+ ///
108
+ /// Each [`StreamChunk`] carries a `delta` string. The final chunk has
109
+ /// `done == true`. The `sink` is closed automatically when the stream
110
+ /// ends or if the receiver is dropped.
111
+ Stream<StreamChunk> streamMessage({required String message});
112
+
113
+ /// Unload the current model and release its memory.
114
+ ///
115
+ /// Returns the display name of the model that was unloaded, or `None`
116
+ /// if no model was loaded.
117
+ Future<String?> unloadModel();
118
+}
119
+
120
+/// A single message in a conversation.
121
+class ChatMessage {
122
+ final ChatRole role;
123
+ final String content;
124
+
125
+ const ChatMessage({
126
+ required this.role,
127
+ required this.content,
128
+ });
129
+
130
+ @override
131
+ int get hashCode => role.hashCode ^ content.hashCode;
132
+
133
+ @override
134
+ bool operator ==(Object other) =>
135
+ identical(this, other) ||
136
+ other is ChatMessage &&
137
+ runtimeType == other.runtimeType &&
138
+ role == other.role &&
139
+ content == other.content;
140
+}
141
+
142
+/// Role of a participant in a chat conversation.
143
+enum ChatRole {
144
+ system,
145
+ user,
146
+ assistant,
147
+ ;
148
+}
149
+
150
+/// A point-in-time snapshot of the engine's state.
151
+class EngineInfo {
152
+ final EngineStatus status;
153
+
154
+ /// Display name of the currently loaded model, if any.
155
+ final String? modelName;
156
+
157
+ /// Approximate memory footprint of the loaded model, if any.
158
+ final String? approxMemory;
159
+
160
+ /// Number of conversation turns in the current history.
161
+ final BigInt historyLength;
162
+
163
+ const EngineInfo({
164
+ required this.status,
165
+ this.modelName,
166
+ this.approxMemory,
167
+ required this.historyLength,
168
+ });
169
+
170
+ @override
171
+ int get hashCode =>
172
+ status.hashCode ^
173
+ modelName.hashCode ^
174
+ approxMemory.hashCode ^
175
+ historyLength.hashCode;
176
+
177
+ @override
178
+ bool operator ==(Object other) =>
179
+ identical(this, other) ||
180
+ other is EngineInfo &&
181
+ runtimeType == other.runtimeType &&
182
+ status == other.status &&
183
+ modelName == other.modelName &&
184
+ approxMemory == other.approxMemory &&
185
+ historyLength == other.historyLength;
186
+}
187
+
188
+/// Lifecycle status of the inference engine.
189
+enum EngineStatus {
190
+ unloaded,
191
+ loading,
192
+ ready,
193
+ generating,
194
+ error,
195
+ ;
196
+}
197
+
198
+/// Configuration for loading a pre-quantised GGUF model.
199
+class GgufModelConfig {
200
+ /// HuggingFace repository ID, e.g. `"bartowski/Qwen2.5-1.5B-Instruct-GGUF"`.
201
+ final String modelId;
202
+
203
+ /// GGUF filename(s) within the repository.
204
+ final List<String> files;
205
+
206
+ /// Optional explicit tokenizer model ID (required on Android).
207
+ final String? tokModelId;
208
+
209
+ /// Human-friendly display name, e.g. `"Qwen 2.5 1.5B"`.
210
+ final String displayName;
211
+
212
+ /// Approximate memory footprint, e.g. `"~941 MB (GGUF Q4_K_M)"`.
213
+ final String approxMemory;
214
+
215
+ const GgufModelConfig({
216
+ required this.modelId,
217
+ required this.files,
218
+ this.tokModelId,
219
+ required this.displayName,
220
+ required this.approxMemory,
221
+ });
222
+
223
+ @override
224
+ int get hashCode =>
225
+ modelId.hashCode ^
226
+ files.hashCode ^
227
+ tokModelId.hashCode ^
228
+ displayName.hashCode ^
229
+ approxMemory.hashCode;
230
+
231
+ @override
232
+ bool operator ==(Object other) =>
233
+ identical(this, other) ||
234
+ other is GgufModelConfig &&
235
+ runtimeType == other.runtimeType &&
236
+ modelId == other.modelId &&
237
+ files == other.files &&
238
+ tokModelId == other.tokModelId &&
239
+ displayName == other.displayName &&
240
+ approxMemory == other.approxMemory;
241
+}
242
+
243
+/// The result of a completed inference request.
244
+class InferenceResult {
245
+ /// The generated assistant reply text.
246
+ final String text;
247
+
248
+ /// Wall-clock inference duration in seconds.
249
+ final double durationSecs;
250
+
251
+ /// Human-readable duration string, e.g. `"4.5s"` or `"2m 3.1s"`.
252
+ final String durationDisplay;
253
+
254
+ /// Finish reason reported by the model, e.g. `"stop"` or `"length"`.
255
+ final String finishReason;
256
+
257
+ const InferenceResult({
258
+ required this.text,
259
+ required this.durationSecs,
260
+ required this.durationDisplay,
261
+ required this.finishReason,
262
+ });
263
+
264
+ @override
265
+ int get hashCode =>
266
+ text.hashCode ^
267
+ durationSecs.hashCode ^
268
+ durationDisplay.hashCode ^
269
+ finishReason.hashCode;
270
+
271
+ @override
272
+ bool operator ==(Object other) =>
273
+ identical(this, other) ||
274
+ other is InferenceResult &&
275
+ runtimeType == other.runtimeType &&
276
+ text == other.text &&
277
+ durationSecs == other.durationSecs &&
278
+ durationDisplay == other.durationDisplay &&
279
+ finishReason == other.finishReason;
280
+}
281
+
282
+@freezed
283
+sealed class OndeError with _$OndeError implements FrbException {
284
+ const OndeError._();
285
+
286
+ const factory OndeError.noModelLoaded() = OndeError_NoModelLoaded;
287
+ const factory OndeError.alreadyLoaded({
288
+ required String modelName,
289
+ }) = OndeError_AlreadyLoaded;
290
+ const factory OndeError.modelBuild({
291
+ required String reason,
292
+ }) = OndeError_ModelBuild;
293
+ const factory OndeError.inference({
294
+ required String reason,
295
+ }) = OndeError_Inference;
296
+ const factory OndeError.cancelled() = OndeError_Cancelled;
297
+ const factory OndeError.other({
298
+ required String reason,
299
+ }) = OndeError_Other;
300
+}
301
+
302
+/// Sampling parameters for text generation. All fields are optional — `None`
303
+/// means "use the engine default".
304
+class SamplingConfig {
305
+ final double? temperature;
306
+ final double? topP;
307
+ final BigInt? topK;
308
+ final double? minP;
309
+ final BigInt? maxTokens;
310
+ final double? frequencyPenalty;
311
+ final double? presencePenalty;
312
+
313
+ const SamplingConfig({
314
+ this.temperature,
315
+ this.topP,
316
+ this.topK,
317
+ this.minP,
318
+ this.maxTokens,
319
+ this.frequencyPenalty,
320
+ this.presencePenalty,
321
+ });
322
+
323
+ @override
324
+ int get hashCode =>
325
+ temperature.hashCode ^
326
+ topP.hashCode ^
327
+ topK.hashCode ^
328
+ minP.hashCode ^
329
+ maxTokens.hashCode ^
330
+ frequencyPenalty.hashCode ^
331
+ presencePenalty.hashCode;
332
+
333
+ @override
334
+ bool operator ==(Object other) =>
335
+ identical(this, other) ||
336
+ other is SamplingConfig &&
337
+ runtimeType == other.runtimeType &&
338
+ temperature == other.temperature &&
339
+ topP == other.topP &&
340
+ topK == other.topK &&
341
+ minP == other.minP &&
342
+ maxTokens == other.maxTokens &&
343
+ frequencyPenalty == other.frequencyPenalty &&
344
+ presencePenalty == other.presencePenalty;
345
+}
346
+
347
+/// A single streaming token chunk emitted during inference.
348
+class StreamChunk {
349
+ /// The token text delta (may be empty on the final chunk).
350
+ final String delta;
351
+
352
+ /// `true` when this is the last chunk in the stream.
353
+ final bool done;
354
+
355
+ /// Finish reason (set only on the final chunk).
356
+ final String? finishReason;
357
+
358
+ const StreamChunk({
359
+ required this.delta,
360
+ required this.done,
361
+ this.finishReason,
362
+ });
363
+
364
+ @override
365
+ int get hashCode => delta.hashCode ^ done.hashCode ^ finishReason.hashCode;
366
+
367
+ @override
368
+ bool operator ==(Object other) =>
369
+ identical(this, other) ||
370
+ other is StreamChunk &&
371
+ runtimeType == other.runtimeType &&
372
+ delta == other.delta &&
373
+ done == other.done &&
374
+ finishReason == other.finishReason;
375
+}
sdk/dart/lib/src/frb_generated.dart/api.freezed.dart
new
+1037
@@ -0,0 +1,1037 @@
1
+// coverage:ignore-file
2
+// GENERATED CODE - DO NOT MODIFY BY HAND
3
+// ignore_for_file: type=lint
4
+// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
5
+
6
+part of 'api.dart';
7
+
8
+// **************************************************************************
9
+// FreezedGenerator
10
+// **************************************************************************
11
+
12
+T _$identity<T>(T value) => value;
13
+
14
+final _privateConstructorUsedError = UnsupportedError(
15
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
16
+
17
+/// @nodoc
18
+mixin _$OndeError {
19
+ @optionalTypeArgs
20
+ TResult when<TResult extends Object?>({
21
+ required TResult Function() noModelLoaded,
22
+ required TResult Function(String modelName) alreadyLoaded,
23
+ required TResult Function(String reason) modelBuild,
24
+ required TResult Function(String reason) inference,
25
+ required TResult Function() cancelled,
26
+ required TResult Function(String reason) other,
27
+ }) =>
28
+ throw _privateConstructorUsedError;
29
+ @optionalTypeArgs
30
+ TResult? whenOrNull<TResult extends Object?>({
31
+ TResult? Function()? noModelLoaded,
32
+ TResult? Function(String modelName)? alreadyLoaded,
33
+ TResult? Function(String reason)? modelBuild,
34
+ TResult? Function(String reason)? inference,
35
+ TResult? Function()? cancelled,
36
+ TResult? Function(String reason)? other,
37
+ }) =>
38
+ throw _privateConstructorUsedError;
39
+ @optionalTypeArgs
40
+ TResult maybeWhen<TResult extends Object?>({
41
+ TResult Function()? noModelLoaded,
42
+ TResult Function(String modelName)? alreadyLoaded,
43
+ TResult Function(String reason)? modelBuild,
44
+ TResult Function(String reason)? inference,
45
+ TResult Function()? cancelled,
46
+ TResult Function(String reason)? other,
47
+ required TResult orElse(),
48
+ }) =>
49
+ throw _privateConstructorUsedError;
50
+ @optionalTypeArgs
51
+ TResult map<TResult extends Object?>({
52
+ required TResult Function(OndeError_NoModelLoaded value) noModelLoaded,
53
+ required TResult Function(OndeError_AlreadyLoaded value) alreadyLoaded,
54
+ required TResult Function(OndeError_ModelBuild value) modelBuild,
55
+ required TResult Function(OndeError_Inference value) inference,
56
+ required TResult Function(OndeError_Cancelled value) cancelled,
57
+ required TResult Function(OndeError_Other value) other,
58
+ }) =>
59
+ throw _privateConstructorUsedError;
60
+ @optionalTypeArgs
61
+ TResult? mapOrNull<TResult extends Object?>({
62
+ TResult? Function(OndeError_NoModelLoaded value)? noModelLoaded,
63
+ TResult? Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
64
+ TResult? Function(OndeError_ModelBuild value)? modelBuild,
65
+ TResult? Function(OndeError_Inference value)? inference,
66
+ TResult? Function(OndeError_Cancelled value)? cancelled,
67
+ TResult? Function(OndeError_Other value)? other,
68
+ }) =>
69
+ throw _privateConstructorUsedError;
70
+ @optionalTypeArgs
71
+ TResult maybeMap<TResult extends Object?>({
72
+ TResult Function(OndeError_NoModelLoaded value)? noModelLoaded,
73
+ TResult Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
74
+ TResult Function(OndeError_ModelBuild value)? modelBuild,
75
+ TResult Function(OndeError_Inference value)? inference,
76
+ TResult Function(OndeError_Cancelled value)? cancelled,
77
+ TResult Function(OndeError_Other value)? other,
78
+ required TResult orElse(),
79
+ }) =>
80
+ throw _privateConstructorUsedError;
81
+}
82
+
83
+/// @nodoc
84
+abstract class $OndeErrorCopyWith<$Res> {
85
+ factory $OndeErrorCopyWith(OndeError value, $Res Function(OndeError) then) =
86
+ _$OndeErrorCopyWithImpl<$Res, OndeError>;
87
+}
88
+
89
+/// @nodoc
90
+class _$OndeErrorCopyWithImpl<$Res, $Val extends OndeError>
91
+ implements $OndeErrorCopyWith<$Res> {
92
+ _$OndeErrorCopyWithImpl(this._value, this._then);
93
+
94
+ // ignore: unused_field
95
+ final $Val _value;
96
+ // ignore: unused_field
97
+ final $Res Function($Val) _then;
98
+
99
+ /// Create a copy of OndeError
100
+ /// with the given fields replaced by the non-null parameter values.
101
+}
102
+
103
+/// @nodoc
104
+abstract class _$$OndeError_NoModelLoadedImplCopyWith<$Res> {
105
+ factory _$$OndeError_NoModelLoadedImplCopyWith(
106
+ _$OndeError_NoModelLoadedImpl value,
107
+ $Res Function(_$OndeError_NoModelLoadedImpl) then) =
108
+ __$$OndeError_NoModelLoadedImplCopyWithImpl<$Res>;
109
+}
110
+
111
+/// @nodoc
112
+class __$$OndeError_NoModelLoadedImplCopyWithImpl<$Res>
113
+ extends _$OndeErrorCopyWithImpl<$Res, _$OndeError_NoModelLoadedImpl>
114
+ implements _$$OndeError_NoModelLoadedImplCopyWith<$Res> {
115
+ __$$OndeError_NoModelLoadedImplCopyWithImpl(
116
+ _$OndeError_NoModelLoadedImpl _value,
117
+ $Res Function(_$OndeError_NoModelLoadedImpl) _then)
118
+ : super(_value, _then);
119
+
120
+ /// Create a copy of OndeError
121
+ /// with the given fields replaced by the non-null parameter values.
122
+}
123
+
124
+/// @nodoc
125
+
126
+class _$OndeError_NoModelLoadedImpl extends OndeError_NoModelLoaded {
127
+ const _$OndeError_NoModelLoadedImpl() : super._();
128
+
129
+ @override
130
+ String toString() {
131
+ return 'OndeError.noModelLoaded()';
132
+ }
133
+
134
+ @override
135
+ bool operator ==(Object other) {
136
+ return identical(this, other) ||
137
+ (other.runtimeType == runtimeType &&
138
+ other is _$OndeError_NoModelLoadedImpl);
139
+ }
140
+
141
+ @override
142
+ int get hashCode => runtimeType.hashCode;
143
+
144
+ @override
145
+ @optionalTypeArgs
146
+ TResult when<TResult extends Object?>({
147
+ required TResult Function() noModelLoaded,
148
+ required TResult Function(String modelName) alreadyLoaded,
149
+ required TResult Function(String reason) modelBuild,
150
+ required TResult Function(String reason) inference,
151
+ required TResult Function() cancelled,
152
+ required TResult Function(String reason) other,
153
+ }) {
154
+ return noModelLoaded();
155
+ }
156
+
157
+ @override
158
+ @optionalTypeArgs
159
+ TResult? whenOrNull<TResult extends Object?>({
160
+ TResult? Function()? noModelLoaded,
161
+ TResult? Function(String modelName)? alreadyLoaded,
162
+ TResult? Function(String reason)? modelBuild,
163
+ TResult? Function(String reason)? inference,
164
+ TResult? Function()? cancelled,
165
+ TResult? Function(String reason)? other,
166
+ }) {
167
+ return noModelLoaded?.call();
168
+ }
169
+
170
+ @override
171
+ @optionalTypeArgs
172
+ TResult maybeWhen<TResult extends Object?>({
173
+ TResult Function()? noModelLoaded,
174
+ TResult Function(String modelName)? alreadyLoaded,
175
+ TResult Function(String reason)? modelBuild,
176
+ TResult Function(String reason)? inference,
177
+ TResult Function()? cancelled,
178
+ TResult Function(String reason)? other,
179
+ required TResult orElse(),
180
+ }) {
181
+ if (noModelLoaded != null) {
182
+ return noModelLoaded();
183
+ }
184
+ return orElse();
185
+ }
186
+
187
+ @override
188
+ @optionalTypeArgs
189
+ TResult map<TResult extends Object?>({
190
+ required TResult Function(OndeError_NoModelLoaded value) noModelLoaded,
191
+ required TResult Function(OndeError_AlreadyLoaded value) alreadyLoaded,
192
+ required TResult Function(OndeError_ModelBuild value) modelBuild,
193
+ required TResult Function(OndeError_Inference value) inference,
194
+ required TResult Function(OndeError_Cancelled value) cancelled,
195
+ required TResult Function(OndeError_Other value) other,
196
+ }) {
197
+ return noModelLoaded(this);
198
+ }
199
+
200
+ @override
201
+ @optionalTypeArgs
202
+ TResult? mapOrNull<TResult extends Object?>({
203
+ TResult? Function(OndeError_NoModelLoaded value)? noModelLoaded,
204
+ TResult? Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
205
+ TResult? Function(OndeError_ModelBuild value)? modelBuild,
206
+ TResult? Function(OndeError_Inference value)? inference,
207
+ TResult? Function(OndeError_Cancelled value)? cancelled,
208
+ TResult? Function(OndeError_Other value)? other,
209
+ }) {
210
+ return noModelLoaded?.call(this);
211
+ }
212
+
213
+ @override
214
+ @optionalTypeArgs
215
+ TResult maybeMap<TResult extends Object?>({
216
+ TResult Function(OndeError_NoModelLoaded value)? noModelLoaded,
217
+ TResult Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
218
+ TResult Function(OndeError_ModelBuild value)? modelBuild,
219
+ TResult Function(OndeError_Inference value)? inference,
220
+ TResult Function(OndeError_Cancelled value)? cancelled,
221
+ TResult Function(OndeError_Other value)? other,
222
+ required TResult orElse(),
223
+ }) {
224
+ if (noModelLoaded != null) {
225
+ return noModelLoaded(this);
226
+ }
227
+ return orElse();
228
+ }
229
+}
230
+
231
+abstract class OndeError_NoModelLoaded extends OndeError {
232
+ const factory OndeError_NoModelLoaded() = _$OndeError_NoModelLoadedImpl;
233
+ const OndeError_NoModelLoaded._() : super._();
234
+}
235
+
236
+/// @nodoc
237
+abstract class _$$OndeError_AlreadyLoadedImplCopyWith<$Res> {
238
+ factory _$$OndeError_AlreadyLoadedImplCopyWith(
239
+ _$OndeError_AlreadyLoadedImpl value,
240
+ $Res Function(_$OndeError_AlreadyLoadedImpl) then) =
241
+ __$$OndeError_AlreadyLoadedImplCopyWithImpl<$Res>;
242
+ @useResult
243
+ $Res call({String modelName});
244
+}
245
+
246
+/// @nodoc
247
+class __$$OndeError_AlreadyLoadedImplCopyWithImpl<$Res>
248
+ extends _$OndeErrorCopyWithImpl<$Res, _$OndeError_AlreadyLoadedImpl>
249
+ implements _$$OndeError_AlreadyLoadedImplCopyWith<$Res> {
250
+ __$$OndeError_AlreadyLoadedImplCopyWithImpl(
251
+ _$OndeError_AlreadyLoadedImpl _value,
252
+ $Res Function(_$OndeError_AlreadyLoadedImpl) _then)
253
+ : super(_value, _then);
254
+
255
+ /// Create a copy of OndeError
256
+ /// with the given fields replaced by the non-null parameter values.
257
+ @pragma('vm:prefer-inline')
258
+ @override
259
+ $Res call({
260
+ Object? modelName = null,
261
+ }) {
262
+ return _then(_$OndeError_AlreadyLoadedImpl(
263
+ modelName: null == modelName
264
+ ? _value.modelName
265
+ : modelName // ignore: cast_nullable_to_non_nullable
266
+ as String,
267
+ ));
268
+ }
269
+}
270
+
271
+/// @nodoc
272
+
273
+class _$OndeError_AlreadyLoadedImpl extends OndeError_AlreadyLoaded {
274
+ const _$OndeError_AlreadyLoadedImpl({required this.modelName}) : super._();
275
+
276
+ @override
277
+ final String modelName;
278
+
279
+ @override
280
+ String toString() {
281
+ return 'OndeError.alreadyLoaded(modelName: $modelName)';
282
+ }
283
+
284
+ @override
285
+ bool operator ==(Object other) {
286
+ return identical(this, other) ||
287
+ (other.runtimeType == runtimeType &&
288
+ other is _$OndeError_AlreadyLoadedImpl &&
289
+ (identical(other.modelName, modelName) ||
290
+ other.modelName == modelName));
291
+ }
292
+
293
+ @override
294
+ int get hashCode => Object.hash(runtimeType, modelName);
295
+
296
+ /// Create a copy of OndeError
297
+ /// with the given fields replaced by the non-null parameter values.
298
+ @JsonKey(includeFromJson: false, includeToJson: false)
299
+ @override
300
+ @pragma('vm:prefer-inline')
301
+ _$$OndeError_AlreadyLoadedImplCopyWith<_$OndeError_AlreadyLoadedImpl>
302
+ get copyWith => __$$OndeError_AlreadyLoadedImplCopyWithImpl<
303
+ _$OndeError_AlreadyLoadedImpl>(this, _$identity);
304
+
305
+ @override
306
+ @optionalTypeArgs
307
+ TResult when<TResult extends Object?>({
308
+ required TResult Function() noModelLoaded,
309
+ required TResult Function(String modelName) alreadyLoaded,
310
+ required TResult Function(String reason) modelBuild,
311
+ required TResult Function(String reason) inference,
312
+ required TResult Function() cancelled,
313
+ required TResult Function(String reason) other,
314
+ }) {
315
+ return alreadyLoaded(modelName);
316
+ }
317
+
318
+ @override
319
+ @optionalTypeArgs
320
+ TResult? whenOrNull<TResult extends Object?>({
321
+ TResult? Function()? noModelLoaded,
322
+ TResult? Function(String modelName)? alreadyLoaded,
323
+ TResult? Function(String reason)? modelBuild,
324
+ TResult? Function(String reason)? inference,
325
+ TResult? Function()? cancelled,
326
+ TResult? Function(String reason)? other,
327
+ }) {
328
+ return alreadyLoaded?.call(modelName);
329
+ }
330
+
331
+ @override
332
+ @optionalTypeArgs
333
+ TResult maybeWhen<TResult extends Object?>({
334
+ TResult Function()? noModelLoaded,
335
+ TResult Function(String modelName)? alreadyLoaded,
336
+ TResult Function(String reason)? modelBuild,
337
+ TResult Function(String reason)? inference,
338
+ TResult Function()? cancelled,
339
+ TResult Function(String reason)? other,
340
+ required TResult orElse(),
341
+ }) {
342
+ if (alreadyLoaded != null) {
343
+ return alreadyLoaded(modelName);
344
+ }
345
+ return orElse();
346
+ }
347
+
348
+ @override
349
+ @optionalTypeArgs
350
+ TResult map<TResult extends Object?>({
351
+ required TResult Function(OndeError_NoModelLoaded value) noModelLoaded,
352
+ required TResult Function(OndeError_AlreadyLoaded value) alreadyLoaded,
353
+ required TResult Function(OndeError_ModelBuild value) modelBuild,
354
+ required TResult Function(OndeError_Inference value) inference,
355
+ required TResult Function(OndeError_Cancelled value) cancelled,
356
+ required TResult Function(OndeError_Other value) other,
357
+ }) {
358
+ return alreadyLoaded(this);
359
+ }
360
+
361
+ @override
362
+ @optionalTypeArgs
363
+ TResult? mapOrNull<TResult extends Object?>({
364
+ TResult? Function(OndeError_NoModelLoaded value)? noModelLoaded,
365
+ TResult? Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
366
+ TResult? Function(OndeError_ModelBuild value)? modelBuild,
367
+ TResult? Function(OndeError_Inference value)? inference,
368
+ TResult? Function(OndeError_Cancelled value)? cancelled,
369
+ TResult? Function(OndeError_Other value)? other,
370
+ }) {
371
+ return alreadyLoaded?.call(this);
372
+ }
373
+
374
+ @override
375
+ @optionalTypeArgs
376
+ TResult maybeMap<TResult extends Object?>({
377
+ TResult Function(OndeError_NoModelLoaded value)? noModelLoaded,
378
+ TResult Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
379
+ TResult Function(OndeError_ModelBuild value)? modelBuild,
380
+ TResult Function(OndeError_Inference value)? inference,
381
+ TResult Function(OndeError_Cancelled value)? cancelled,
382
+ TResult Function(OndeError_Other value)? other,
383
+ required TResult orElse(),
384
+ }) {
385
+ if (alreadyLoaded != null) {
386
+ return alreadyLoaded(this);
387
+ }
388
+ return orElse();
389
+ }
390
+}
391
+
392
+abstract class OndeError_AlreadyLoaded extends OndeError {
393
+ const factory OndeError_AlreadyLoaded({required final String modelName}) =
394
+ _$OndeError_AlreadyLoadedImpl;
395
+ const OndeError_AlreadyLoaded._() : super._();
396
+
397
+ String get modelName;
398
+
399
+ /// Create a copy of OndeError
400
+ /// with the given fields replaced by the non-null parameter values.
401
+ @JsonKey(includeFromJson: false, includeToJson: false)
402
+ _$$OndeError_AlreadyLoadedImplCopyWith<_$OndeError_AlreadyLoadedImpl>
403
+ get copyWith => throw _privateConstructorUsedError;
404
+}
405
+
406
+/// @nodoc
407
+abstract class _$$OndeError_ModelBuildImplCopyWith<$Res> {
408
+ factory _$$OndeError_ModelBuildImplCopyWith(_$OndeError_ModelBuildImpl value,
409
+ $Res Function(_$OndeError_ModelBuildImpl) then) =
410
+ __$$OndeError_ModelBuildImplCopyWithImpl<$Res>;
411
+ @useResult
412
+ $Res call({String reason});
413
+}
414
+
415
+/// @nodoc
416
+class __$$OndeError_ModelBuildImplCopyWithImpl<$Res>
417
+ extends _$OndeErrorCopyWithImpl<$Res, _$OndeError_ModelBuildImpl>
418
+ implements _$$OndeError_ModelBuildImplCopyWith<$Res> {
419
+ __$$OndeError_ModelBuildImplCopyWithImpl(_$OndeError_ModelBuildImpl _value,
420
+ $Res Function(_$OndeError_ModelBuildImpl) _then)
421
+ : super(_value, _then);
422
+
423
+ /// Create a copy of OndeError
424
+ /// with the given fields replaced by the non-null parameter values.
425
+ @pragma('vm:prefer-inline')
426
+ @override
427
+ $Res call({
428
+ Object? reason = null,
429
+ }) {
430
+ return _then(_$OndeError_ModelBuildImpl(
431
+ reason: null == reason
432
+ ? _value.reason
433
+ : reason // ignore: cast_nullable_to_non_nullable
434
+ as String,
435
+ ));
436
+ }
437
+}
438
+
439
+/// @nodoc
440
+
441
+class _$OndeError_ModelBuildImpl extends OndeError_ModelBuild {
442
+ const _$OndeError_ModelBuildImpl({required this.reason}) : super._();
443
+
444
+ @override
445
+ final String reason;
446
+
447
+ @override
448
+ String toString() {
449
+ return 'OndeError.modelBuild(reason: $reason)';
450
+ }
451
+
452
+ @override
453
+ bool operator ==(Object other) {
454
+ return identical(this, other) ||
455
+ (other.runtimeType == runtimeType &&
456
+ other is _$OndeError_ModelBuildImpl &&
457
+ (identical(other.reason, reason) || other.reason == reason));
458
+ }
459
+
460
+ @override
461
+ int get hashCode => Object.hash(runtimeType, reason);
462
+
463
+ /// Create a copy of OndeError
464
+ /// with the given fields replaced by the non-null parameter values.
465
+ @JsonKey(includeFromJson: false, includeToJson: false)
466
+ @override
467
+ @pragma('vm:prefer-inline')
468
+ _$$OndeError_ModelBuildImplCopyWith<_$OndeError_ModelBuildImpl>
469
+ get copyWith =>
470
+ __$$OndeError_ModelBuildImplCopyWithImpl<_$OndeError_ModelBuildImpl>(
471
+ this, _$identity);
472
+
473
+ @override
474
+ @optionalTypeArgs
475
+ TResult when<TResult extends Object?>({
476
+ required TResult Function() noModelLoaded,
477
+ required TResult Function(String modelName) alreadyLoaded,
478
+ required TResult Function(String reason) modelBuild,
479
+ required TResult Function(String reason) inference,
480
+ required TResult Function() cancelled,
481
+ required TResult Function(String reason) other,
482
+ }) {
483
+ return modelBuild(reason);
484
+ }
485
+
486
+ @override
487
+ @optionalTypeArgs
488
+ TResult? whenOrNull<TResult extends Object?>({
489
+ TResult? Function()? noModelLoaded,
490
+ TResult? Function(String modelName)? alreadyLoaded,
491
+ TResult? Function(String reason)? modelBuild,
492
+ TResult? Function(String reason)? inference,
493
+ TResult? Function()? cancelled,
494
+ TResult? Function(String reason)? other,
495
+ }) {
496
+ return modelBuild?.call(reason);
497
+ }
498
+
499
+ @override
500
+ @optionalTypeArgs
501
+ TResult maybeWhen<TResult extends Object?>({
502
+ TResult Function()? noModelLoaded,
503
+ TResult Function(String modelName)? alreadyLoaded,
504
+ TResult Function(String reason)? modelBuild,
505
+ TResult Function(String reason)? inference,
506
+ TResult Function()? cancelled,
507
+ TResult Function(String reason)? other,
508
+ required TResult orElse(),
509
+ }) {
510
+ if (modelBuild != null) {
511
+ return modelBuild(reason);
512
+ }
513
+ return orElse();
514
+ }
515
+
516
+ @override
517
+ @optionalTypeArgs
518
+ TResult map<TResult extends Object?>({
519
+ required TResult Function(OndeError_NoModelLoaded value) noModelLoaded,
520
+ required TResult Function(OndeError_AlreadyLoaded value) alreadyLoaded,
521
+ required TResult Function(OndeError_ModelBuild value) modelBuild,
522
+ required TResult Function(OndeError_Inference value) inference,
523
+ required TResult Function(OndeError_Cancelled value) cancelled,
524
+ required TResult Function(OndeError_Other value) other,
525
+ }) {
526
+ return modelBuild(this);
527
+ }
528
+
529
+ @override
530
+ @optionalTypeArgs
531
+ TResult? mapOrNull<TResult extends Object?>({
532
+ TResult? Function(OndeError_NoModelLoaded value)? noModelLoaded,
533
+ TResult? Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
534
+ TResult? Function(OndeError_ModelBuild value)? modelBuild,
535
+ TResult? Function(OndeError_Inference value)? inference,
536
+ TResult? Function(OndeError_Cancelled value)? cancelled,
537
+ TResult? Function(OndeError_Other value)? other,
538
+ }) {
539
+ return modelBuild?.call(this);
540
+ }
541
+
542
+ @override
543
+ @optionalTypeArgs
544
+ TResult maybeMap<TResult extends Object?>({
545
+ TResult Function(OndeError_NoModelLoaded value)? noModelLoaded,
546
+ TResult Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
547
+ TResult Function(OndeError_ModelBuild value)? modelBuild,
548
+ TResult Function(OndeError_Inference value)? inference,
549
+ TResult Function(OndeError_Cancelled value)? cancelled,
550
+ TResult Function(OndeError_Other value)? other,
551
+ required TResult orElse(),
552
+ }) {
553
+ if (modelBuild != null) {
554
+ return modelBuild(this);
555
+ }
556
+ return orElse();
557
+ }
558
+}
559
+
560
+abstract class OndeError_ModelBuild extends OndeError {
561
+ const factory OndeError_ModelBuild({required final String reason}) =
562
+ _$OndeError_ModelBuildImpl;
563
+ const OndeError_ModelBuild._() : super._();
564
+
565
+ String get reason;
566
+
567
+ /// Create a copy of OndeError
568
+ /// with the given fields replaced by the non-null parameter values.
569
+ @JsonKey(includeFromJson: false, includeToJson: false)
570
+ _$$OndeError_ModelBuildImplCopyWith<_$OndeError_ModelBuildImpl>
571
+ get copyWith => throw _privateConstructorUsedError;
572
+}
573
+
574
+/// @nodoc
575
+abstract class _$$OndeError_InferenceImplCopyWith<$Res> {
576
+ factory _$$OndeError_InferenceImplCopyWith(_$OndeError_InferenceImpl value,
577
+ $Res Function(_$OndeError_InferenceImpl) then) =
578
+ __$$OndeError_InferenceImplCopyWithImpl<$Res>;
579
+ @useResult
580
+ $Res call({String reason});
581
+}
582
+
583
+/// @nodoc
584
+class __$$OndeError_InferenceImplCopyWithImpl<$Res>
585
+ extends _$OndeErrorCopyWithImpl<$Res, _$OndeError_InferenceImpl>
586
+ implements _$$OndeError_InferenceImplCopyWith<$Res> {
587
+ __$$OndeError_InferenceImplCopyWithImpl(_$OndeError_InferenceImpl _value,
588
+ $Res Function(_$OndeError_InferenceImpl) _then)
589
+ : super(_value, _then);
590
+
591
+ /// Create a copy of OndeError
592
+ /// with the given fields replaced by the non-null parameter values.
593
+ @pragma('vm:prefer-inline')
594
+ @override
595
+ $Res call({
596
+ Object? reason = null,
597
+ }) {
598
+ return _then(_$OndeError_InferenceImpl(
599
+ reason: null == reason
600
+ ? _value.reason
601
+ : reason // ignore: cast_nullable_to_non_nullable
602
+ as String,
603
+ ));
604
+ }
605
+}
606
+
607
+/// @nodoc
608
+
609
+class _$OndeError_InferenceImpl extends OndeError_Inference {
610
+ const _$OndeError_InferenceImpl({required this.reason}) : super._();
611
+
612
+ @override
613
+ final String reason;
614
+
615
+ @override
616
+ String toString() {
617
+ return 'OndeError.inference(reason: $reason)';
618
+ }
619
+
620
+ @override
621
+ bool operator ==(Object other) {
622
+ return identical(this, other) ||
623
+ (other.runtimeType == runtimeType &&
624
+ other is _$OndeError_InferenceImpl &&
625
+ (identical(other.reason, reason) || other.reason == reason));
626
+ }
627
+
628
+ @override
629
+ int get hashCode => Object.hash(runtimeType, reason);
630
+
631
+ /// Create a copy of OndeError
632
+ /// with the given fields replaced by the non-null parameter values.
633
+ @JsonKey(includeFromJson: false, includeToJson: false)
634
+ @override
635
+ @pragma('vm:prefer-inline')
636
+ _$$OndeError_InferenceImplCopyWith<_$OndeError_InferenceImpl> get copyWith =>
637
+ __$$OndeError_InferenceImplCopyWithImpl<_$OndeError_InferenceImpl>(
638
+ this, _$identity);
639
+
640
+ @override
641
+ @optionalTypeArgs
642
+ TResult when<TResult extends Object?>({
643
+ required TResult Function() noModelLoaded,
644
+ required TResult Function(String modelName) alreadyLoaded,
645
+ required TResult Function(String reason) modelBuild,
646
+ required TResult Function(String reason) inference,
647
+ required TResult Function() cancelled,
648
+ required TResult Function(String reason) other,
649
+ }) {
650
+ return inference(reason);
651
+ }
652
+
653
+ @override
654
+ @optionalTypeArgs
655
+ TResult? whenOrNull<TResult extends Object?>({
656
+ TResult? Function()? noModelLoaded,
657
+ TResult? Function(String modelName)? alreadyLoaded,
658
+ TResult? Function(String reason)? modelBuild,
659
+ TResult? Function(String reason)? inference,
660
+ TResult? Function()? cancelled,
661
+ TResult? Function(String reason)? other,
662
+ }) {
663
+ return inference?.call(reason);
664
+ }
665
+
666
+ @override
667
+ @optionalTypeArgs
668
+ TResult maybeWhen<TResult extends Object?>({
669
+ TResult Function()? noModelLoaded,
670
+ TResult Function(String modelName)? alreadyLoaded,
671
+ TResult Function(String reason)? modelBuild,
672
+ TResult Function(String reason)? inference,
673
+ TResult Function()? cancelled,
674
+ TResult Function(String reason)? other,
675
+ required TResult orElse(),
676
+ }) {
677
+ if (inference != null) {
678
+ return inference(reason);
679
+ }
680
+ return orElse();
681
+ }
682
+
683
+ @override
684
+ @optionalTypeArgs
685
+ TResult map<TResult extends Object?>({
686
+ required TResult Function(OndeError_NoModelLoaded value) noModelLoaded,
687
+ required TResult Function(OndeError_AlreadyLoaded value) alreadyLoaded,
688
+ required TResult Function(OndeError_ModelBuild value) modelBuild,
689
+ required TResult Function(OndeError_Inference value) inference,
690
+ required TResult Function(OndeError_Cancelled value) cancelled,
691
+ required TResult Function(OndeError_Other value) other,
692
+ }) {
693
+ return inference(this);
694
+ }
695
+
696
+ @override
697
+ @optionalTypeArgs
698
+ TResult? mapOrNull<TResult extends Object?>({
699
+ TResult? Function(OndeError_NoModelLoaded value)? noModelLoaded,
700
+ TResult? Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
701
+ TResult? Function(OndeError_ModelBuild value)? modelBuild,
702
+ TResult? Function(OndeError_Inference value)? inference,
703
+ TResult? Function(OndeError_Cancelled value)? cancelled,
704
+ TResult? Function(OndeError_Other value)? other,
705
+ }) {
706
+ return inference?.call(this);
707
+ }
708
+
709
+ @override
710
+ @optionalTypeArgs
711
+ TResult maybeMap<TResult extends Object?>({
712
+ TResult Function(OndeError_NoModelLoaded value)? noModelLoaded,
713
+ TResult Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
714
+ TResult Function(OndeError_ModelBuild value)? modelBuild,
715
+ TResult Function(OndeError_Inference value)? inference,
716
+ TResult Function(OndeError_Cancelled value)? cancelled,
717
+ TResult Function(OndeError_Other value)? other,
718
+ required TResult orElse(),
719
+ }) {
720
+ if (inference != null) {
721
+ return inference(this);
722
+ }
723
+ return orElse();
724
+ }
725
+}
726
+
727
+abstract class OndeError_Inference extends OndeError {
728
+ const factory OndeError_Inference({required final String reason}) =
729
+ _$OndeError_InferenceImpl;
730
+ const OndeError_Inference._() : super._();
731
+
732
+ String get reason;
733
+
734
+ /// Create a copy of OndeError
735
+ /// with the given fields replaced by the non-null parameter values.
736
+ @JsonKey(includeFromJson: false, includeToJson: false)
737
+ _$$OndeError_InferenceImplCopyWith<_$OndeError_InferenceImpl> get copyWith =>
738
+ throw _privateConstructorUsedError;
739
+}
740
+
741
+/// @nodoc
742
+abstract class _$$OndeError_CancelledImplCopyWith<$Res> {
743
+ factory _$$OndeError_CancelledImplCopyWith(_$OndeError_CancelledImpl value,
744
+ $Res Function(_$OndeError_CancelledImpl) then) =
745
+ __$$OndeError_CancelledImplCopyWithImpl<$Res>;
746
+}
747
+
748
+/// @nodoc
749
+class __$$OndeError_CancelledImplCopyWithImpl<$Res>
750
+ extends _$OndeErrorCopyWithImpl<$Res, _$OndeError_CancelledImpl>
751
+ implements _$$OndeError_CancelledImplCopyWith<$Res> {
752
+ __$$OndeError_CancelledImplCopyWithImpl(_$OndeError_CancelledImpl _value,
753
+ $Res Function(_$OndeError_CancelledImpl) _then)
754
+ : super(_value, _then);
755
+
756
+ /// Create a copy of OndeError
757
+ /// with the given fields replaced by the non-null parameter values.
758
+}
759
+
760
+/// @nodoc
761
+
762
+class _$OndeError_CancelledImpl extends OndeError_Cancelled {
763
+ const _$OndeError_CancelledImpl() : super._();
764
+
765
+ @override
766
+ String toString() {
767
+ return 'OndeError.cancelled()';
768
+ }
769
+
770
+ @override
771
+ bool operator ==(Object other) {
772
+ return identical(this, other) ||
773
+ (other.runtimeType == runtimeType &&
774
+ other is _$OndeError_CancelledImpl);
775
+ }
776
+
777
+ @override
778
+ int get hashCode => runtimeType.hashCode;
779
+
780
+ @override
781
+ @optionalTypeArgs
782
+ TResult when<TResult extends Object?>({
783
+ required TResult Function() noModelLoaded,
784
+ required TResult Function(String modelName) alreadyLoaded,
785
+ required TResult Function(String reason) modelBuild,
786
+ required TResult Function(String reason) inference,
787
+ required TResult Function() cancelled,
788
+ required TResult Function(String reason) other,
789
+ }) {
790
+ return cancelled();
791
+ }
792
+
793
+ @override
794
+ @optionalTypeArgs
795
+ TResult? whenOrNull<TResult extends Object?>({
796
+ TResult? Function()? noModelLoaded,
797
+ TResult? Function(String modelName)? alreadyLoaded,
798
+ TResult? Function(String reason)? modelBuild,
799
+ TResult? Function(String reason)? inference,
800
+ TResult? Function()? cancelled,
801
+ TResult? Function(String reason)? other,
802
+ }) {
803
+ return cancelled?.call();
804
+ }
805
+
806
+ @override
807
+ @optionalTypeArgs
808
+ TResult maybeWhen<TResult extends Object?>({
809
+ TResult Function()? noModelLoaded,
810
+ TResult Function(String modelName)? alreadyLoaded,
811
+ TResult Function(String reason)? modelBuild,
812
+ TResult Function(String reason)? inference,
813
+ TResult Function()? cancelled,
814
+ TResult Function(String reason)? other,
815
+ required TResult orElse(),
816
+ }) {
817
+ if (cancelled != null) {
818
+ return cancelled();
819
+ }
820
+ return orElse();
821
+ }
822
+
823
+ @override
824
+ @optionalTypeArgs
825
+ TResult map<TResult extends Object?>({
826
+ required TResult Function(OndeError_NoModelLoaded value) noModelLoaded,
827
+ required TResult Function(OndeError_AlreadyLoaded value) alreadyLoaded,
828
+ required TResult Function(OndeError_ModelBuild value) modelBuild,
829
+ required TResult Function(OndeError_Inference value) inference,
830
+ required TResult Function(OndeError_Cancelled value) cancelled,
831
+ required TResult Function(OndeError_Other value) other,
832
+ }) {
833
+ return cancelled(this);
834
+ }
835
+
836
+ @override
837
+ @optionalTypeArgs
838
+ TResult? mapOrNull<TResult extends Object?>({
839
+ TResult? Function(OndeError_NoModelLoaded value)? noModelLoaded,
840
+ TResult? Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
841
+ TResult? Function(OndeError_ModelBuild value)? modelBuild,
842
+ TResult? Function(OndeError_Inference value)? inference,
843
+ TResult? Function(OndeError_Cancelled value)? cancelled,
844
+ TResult? Function(OndeError_Other value)? other,
845
+ }) {
846
+ return cancelled?.call(this);
847
+ }
848
+
849
+ @override
850
+ @optionalTypeArgs
851
+ TResult maybeMap<TResult extends Object?>({
852
+ TResult Function(OndeError_NoModelLoaded value)? noModelLoaded,
853
+ TResult Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
854
+ TResult Function(OndeError_ModelBuild value)? modelBuild,
855
+ TResult Function(OndeError_Inference value)? inference,
856
+ TResult Function(OndeError_Cancelled value)? cancelled,
857
+ TResult Function(OndeError_Other value)? other,
858
+ required TResult orElse(),
859
+ }) {
860
+ if (cancelled != null) {
861
+ return cancelled(this);
862
+ }
863
+ return orElse();
864
+ }
865
+}
866
+
867
+abstract class OndeError_Cancelled extends OndeError {
868
+ const factory OndeError_Cancelled() = _$OndeError_CancelledImpl;
869
+ const OndeError_Cancelled._() : super._();
870
+}
871
+
872
+/// @nodoc
873
+abstract class _$$OndeError_OtherImplCopyWith<$Res> {
874
+ factory _$$OndeError_OtherImplCopyWith(_$OndeError_OtherImpl value,
875
+ $Res Function(_$OndeError_OtherImpl) then) =
876
+ __$$OndeError_OtherImplCopyWithImpl<$Res>;
877
+ @useResult
878
+ $Res call({String reason});
879
+}
880
+
881
+/// @nodoc
882
+class __$$OndeError_OtherImplCopyWithImpl<$Res>
883
+ extends _$OndeErrorCopyWithImpl<$Res, _$OndeError_OtherImpl>
884
+ implements _$$OndeError_OtherImplCopyWith<$Res> {
885
+ __$$OndeError_OtherImplCopyWithImpl(
886
+ _$OndeError_OtherImpl _value, $Res Function(_$OndeError_OtherImpl) _then)
887
+ : super(_value, _then);
888
+
889
+ /// Create a copy of OndeError
890
+ /// with the given fields replaced by the non-null parameter values.
891
+ @pragma('vm:prefer-inline')
892
+ @override
893
+ $Res call({
894
+ Object? reason = null,
895
+ }) {
896
+ return _then(_$OndeError_OtherImpl(
897
+ reason: null == reason
898
+ ? _value.reason
899
+ : reason // ignore: cast_nullable_to_non_nullable
900
+ as String,
901
+ ));
902
+ }
903
+}
904
+
905
+/// @nodoc
906
+
907
+class _$OndeError_OtherImpl extends OndeError_Other {
908
+ const _$OndeError_OtherImpl({required this.reason}) : super._();
909
+
910
+ @override
911
+ final String reason;
912
+
913
+ @override
914
+ String toString() {
915
+ return 'OndeError.other(reason: $reason)';
916
+ }
917
+
918
+ @override
919
+ bool operator ==(Object other) {
920
+ return identical(this, other) ||
921
+ (other.runtimeType == runtimeType &&
922
+ other is _$OndeError_OtherImpl &&
923
+ (identical(other.reason, reason) || other.reason == reason));
924
+ }
925
+
926
+ @override
927
+ int get hashCode => Object.hash(runtimeType, reason);
928
+
929
+ /// Create a copy of OndeError
930
+ /// with the given fields replaced by the non-null parameter values.
931
+ @JsonKey(includeFromJson: false, includeToJson: false)
932
+ @override
933
+ @pragma('vm:prefer-inline')
934
+ _$$OndeError_OtherImplCopyWith<_$OndeError_OtherImpl> get copyWith =>
935
+ __$$OndeError_OtherImplCopyWithImpl<_$OndeError_OtherImpl>(
936
+ this, _$identity);
937
+
938
+ @override
939
+ @optionalTypeArgs
940
+ TResult when<TResult extends Object?>({
941
+ required TResult Function() noModelLoaded,
942
+ required TResult Function(String modelName) alreadyLoaded,
943
+ required TResult Function(String reason) modelBuild,
944
+ required TResult Function(String reason) inference,
945
+ required TResult Function() cancelled,
946
+ required TResult Function(String reason) other,
947
+ }) {
948
+ return other(reason);
949
+ }
950
+
951
+ @override
952
+ @optionalTypeArgs
953
+ TResult? whenOrNull<TResult extends Object?>({
954
+ TResult? Function()? noModelLoaded,
955
+ TResult? Function(String modelName)? alreadyLoaded,
956
+ TResult? Function(String reason)? modelBuild,
957
+ TResult? Function(String reason)? inference,
958
+ TResult? Function()? cancelled,
959
+ TResult? Function(String reason)? other,
960
+ }) {
961
+ return other?.call(reason);
962
+ }
963
+
964
+ @override
965
+ @optionalTypeArgs
966
+ TResult maybeWhen<TResult extends Object?>({
967
+ TResult Function()? noModelLoaded,
968
+ TResult Function(String modelName)? alreadyLoaded,
969
+ TResult Function(String reason)? modelBuild,
970
+ TResult Function(String reason)? inference,
971
+ TResult Function()? cancelled,
972
+ TResult Function(String reason)? other,
973
+ required TResult orElse(),
974
+ }) {
975
+ if (other != null) {
976
+ return other(reason);
977
+ }
978
+ return orElse();
979
+ }
980
+
981
+ @override
982
+ @optionalTypeArgs
983
+ TResult map<TResult extends Object?>({
984
+ required TResult Function(OndeError_NoModelLoaded value) noModelLoaded,
985
+ required TResult Function(OndeError_AlreadyLoaded value) alreadyLoaded,
986
+ required TResult Function(OndeError_ModelBuild value) modelBuild,
987
+ required TResult Function(OndeError_Inference value) inference,
988
+ required TResult Function(OndeError_Cancelled value) cancelled,
989
+ required TResult Function(OndeError_Other value) other,
990
+ }) {
991
+ return other(this);
992
+ }
993
+
994
+ @override
995
+ @optionalTypeArgs
996
+ TResult? mapOrNull<TResult extends Object?>({
997
+ TResult? Function(OndeError_NoModelLoaded value)? noModelLoaded,
998
+ TResult? Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
999
+ TResult? Function(OndeError_ModelBuild value)? modelBuild,
1000
+ TResult? Function(OndeError_Inference value)? inference,
1001
+ TResult? Function(OndeError_Cancelled value)? cancelled,
1002
+ TResult? Function(OndeError_Other value)? other,
1003
+ }) {
1004
+ return other?.call(this);
1005
+ }
1006
+
1007
+ @override
1008
+ @optionalTypeArgs
1009
+ TResult maybeMap<TResult extends Object?>({
1010
+ TResult Function(OndeError_NoModelLoaded value)? noModelLoaded,
1011
+ TResult Function(OndeError_AlreadyLoaded value)? alreadyLoaded,
1012
+ TResult Function(OndeError_ModelBuild value)? modelBuild,
1013
+ TResult Function(OndeError_Inference value)? inference,
1014
+ TResult Function(OndeError_Cancelled value)? cancelled,
1015
+ TResult Function(OndeError_Other value)? other,
1016
+ required TResult orElse(),
1017
+ }) {
1018
+ if (other != null) {
1019
+ return other(this);
1020
+ }
1021
+ return orElse();
1022
+ }
1023
+}
1024
+
1025
+abstract class OndeError_Other extends OndeError {
1026
+ const factory OndeError_Other({required final String reason}) =
1027
+ _$OndeError_OtherImpl;
1028
+ const OndeError_Other._() : super._();
1029
+
1030
+ String get reason;
1031
+
1032
+ /// Create a copy of OndeError
1033
+ /// with the given fields replaced by the non-null parameter values.
1034
+ @JsonKey(includeFromJson: false, includeToJson: false)
1035
+ _$$OndeError_OtherImplCopyWith<_$OndeError_OtherImpl> get copyWith =>
1036
+ throw _privateConstructorUsedError;
1037
+}
sdk/dart/lib/src/frb_generated.dart/frb_generated.dart
new
+1816
@@ -0,0 +1,1816 @@
1
+// This file is automatically generated, so please do not edit it.
2
+// @generated by `flutter_rust_bridge`@ 2.12.0.
3
+
4
+// ignore_for_file: type=lint, unused_import, unnecessary_import
5
+
6
+// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
7
+
8
+import 'api.dart';
9
+import 'dart:async';
10
+import 'dart:convert';
11
+import 'frb_generated.dart';
12
+import 'frb_generated.io.dart'
13
+ if (dart.library.js_interop) 'frb_generated.web.dart';
14
+import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
15
+
16
+/// Main entrypoint of the Rust API
17
+class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {
18
+ @internal
19
+ static final instance = RustLib._();
20
+
21
+ RustLib._();
22
+
23
+ /// Initialize flutter_rust_bridge
24
+ static Future<void> init({
25
+ RustLibApi? api,
26
+ BaseHandler? handler,
27
+ ExternalLibrary? externalLibrary,
28
+ bool forceSameCodegenVersion = true,
29
+ }) async {
30
+ await instance.initImpl(
31
+ api: api,
32
+ handler: handler,
33
+ externalLibrary: externalLibrary,
34
+ forceSameCodegenVersion: forceSameCodegenVersion,
35
+ );
36
+ }
37
+
38
+ /// Initialize flutter_rust_bridge in mock mode.
39
+ /// No libraries for FFI are loaded.
40
+ static void initMock({
41
+ required RustLibApi api,
42
+ }) {
43
+ instance.initMockImpl(
44
+ api: api,
45
+ );
46
+ }
47
+
48
+ /// Dispose flutter_rust_bridge
49
+ ///
50
+ /// The call to this function is optional, since flutter_rust_bridge (and everything else)
51
+ /// is automatically disposed when the app stops.
52
+ static void dispose() => instance.disposeImpl();
53
+
54
+ @override
55
+ ApiImplConstructor<RustLibApiImpl, RustLibWire> get apiImplConstructor =>
56
+ RustLibApiImpl.new;
57
+
58
+ @override
59
+ WireConstructor<RustLibWire> get wireConstructor =>
60
+ RustLibWire.fromExternalLibrary;
61
+
62
+ @override
63
+ Future<void> executeRustInitializers() async {}
64
+
65
+ @override
66
+ ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig =>
67
+ kDefaultExternalLibraryLoaderConfig;
68
+
69
+ @override
70
+ String get codegenVersion => '2.12.0';
71
+
72
+ @override
73
+ int get rustContentHash => -2058074152;
74
+
75
+ static const kDefaultExternalLibraryLoaderConfig =
76
+ ExternalLibraryLoaderConfig(
77
+ stem: 'onde_inference_dart',
78
+ ioDirectory: 'rust/target/release/',
79
+ webPrefix: 'pkg/',
80
+ wasmBindgenName: 'wasm_bindgen',
81
+ );
82
+}
83
+
84
+abstract class RustLibApi extends BaseApi {
85
+ Future<BigInt> crateApiOndeChatEngineClearHistory(
86
+ {required OndeChatEngine that});
87
+
88
+ Future<void> crateApiOndeChatEngineClearSystemPrompt(
89
+ {required OndeChatEngine that});
90
+
91
+ Future<InferenceResult> crateApiOndeChatEngineGenerate(
92
+ {required OndeChatEngine that,
93
+ required List<ChatMessage> messages,
94
+ SamplingConfig? sampling});
95
+
96
+ Future<List<ChatMessage>> crateApiOndeChatEngineHistory(
97
+ {required OndeChatEngine that});
98
+
99
+ Future<EngineInfo> crateApiOndeChatEngineInfo({required OndeChatEngine that});
100
+
101
+ Future<bool> crateApiOndeChatEngineIsLoaded({required OndeChatEngine that});
102
+
103
+ Future<double> crateApiOndeChatEngineLoadGgufModel(
104
+ {required OndeChatEngine that,
105
+ required GgufModelConfig config,
106
+ String? systemPrompt,
107
+ SamplingConfig? sampling});
108
+
109
+ OndeChatEngine crateApiOndeChatEngineNew();
110
+
111
+ Future<void> crateApiOndeChatEnginePushHistory(
112
+ {required OndeChatEngine that, required ChatMessage message});
113
+
114
+ Future<InferenceResult> crateApiOndeChatEngineSendMessage(
115
+ {required OndeChatEngine that, required String message});
116
+
117
+ Future<void> crateApiOndeChatEngineSetSampling(
118
+ {required OndeChatEngine that, required SamplingConfig sampling});
119
+
120
+ Future<void> crateApiOndeChatEngineSetSystemPrompt(
121
+ {required OndeChatEngine that, required String prompt});
122
+
123
+ Stream<StreamChunk> crateApiOndeChatEngineStreamMessage(
124
+ {required OndeChatEngine that, required String message});
125
+
126
+ Future<String?> crateApiOndeChatEngineUnloadModel(
127
+ {required OndeChatEngine that});
128
+
129
+ GgufModelConfig crateApiDefaultModelConfig();
130
+
131
+ SamplingConfig crateApiDefaultSamplingConfig();
132
+
133
+ SamplingConfig crateApiDeterministicSamplingConfig();
134
+
135
+ SamplingConfig crateApiMobileSamplingConfig();
136
+
137
+ GgufModelConfig crateApiQwen2515BConfig();
138
+
139
+ GgufModelConfig crateApiQwen253BConfig();
140
+
141
+ GgufModelConfig crateApiQwen25Coder15BConfig();
142
+
143
+ GgufModelConfig crateApiQwen25Coder3BConfig();
144
+
145
+ RustArcIncrementStrongCountFnType
146
+ get rust_arc_increment_strong_count_OndeChatEngine;
147
+
148
+ RustArcDecrementStrongCountFnType
149
+ get rust_arc_decrement_strong_count_OndeChatEngine;
150
+
151
+ CrossPlatformFinalizerArg
152
+ get rust_arc_decrement_strong_count_OndeChatEnginePtr;
153
+}
154
+
155
+class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
156
+ RustLibApiImpl({
157
+ required super.handler,
158
+ required super.wire,
159
+ required super.generalizedFrbRustBinding,
160
+ required super.portManager,
161
+ });
162
+
163
+ @override
164
+ Future<BigInt> crateApiOndeChatEngineClearHistory(
165
+ {required OndeChatEngine that}) {
166
+ return handler.executeNormal(NormalTask(
167
+ callFfi: (port_) {
168
+ final serializer = SseSerializer(generalizedFrbRustBinding);
169
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
170
+ that, serializer);
171
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
172
+ funcId: 1, port: port_);
173
+ },
174
+ codec: SseCodec(
175
+ decodeSuccessData: sse_decode_u_64,
176
+ decodeErrorData: null,
177
+ ),
178
+ constMeta: kCrateApiOndeChatEngineClearHistoryConstMeta,
179
+ argValues: [that],
180
+ apiImpl: this,
181
+ ));
182
+ }
183
+
184
+ TaskConstMeta get kCrateApiOndeChatEngineClearHistoryConstMeta =>
185
+ const TaskConstMeta(
186
+ debugName: "OndeChatEngine_clear_history",
187
+ argNames: ["that"],
188
+ );
189
+
190
+ @override
191
+ Future<void> crateApiOndeChatEngineClearSystemPrompt(
192
+ {required OndeChatEngine that}) {
193
+ return handler.executeNormal(NormalTask(
194
+ callFfi: (port_) {
195
+ final serializer = SseSerializer(generalizedFrbRustBinding);
196
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
197
+ that, serializer);
198
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
199
+ funcId: 2, port: port_);
200
+ },
201
+ codec: SseCodec(
202
+ decodeSuccessData: sse_decode_unit,
203
+ decodeErrorData: null,
204
+ ),
205
+ constMeta: kCrateApiOndeChatEngineClearSystemPromptConstMeta,
206
+ argValues: [that],
207
+ apiImpl: this,
208
+ ));
209
+ }
210
+
211
+ TaskConstMeta get kCrateApiOndeChatEngineClearSystemPromptConstMeta =>
212
+ const TaskConstMeta(
213
+ debugName: "OndeChatEngine_clear_system_prompt",
214
+ argNames: ["that"],
215
+ );
216
+
217
+ @override
218
+ Future<InferenceResult> crateApiOndeChatEngineGenerate(
219
+ {required OndeChatEngine that,
220
+ required List<ChatMessage> messages,
221
+ SamplingConfig? sampling}) {
222
+ return handler.executeNormal(NormalTask(
223
+ callFfi: (port_) {
224
+ final serializer = SseSerializer(generalizedFrbRustBinding);
225
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
226
+ that, serializer);
227
+ sse_encode_list_chat_message(messages, serializer);
228
+ sse_encode_opt_box_autoadd_sampling_config(sampling, serializer);
229
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
230
+ funcId: 3, port: port_);
231
+ },
232
+ codec: SseCodec(
233
+ decodeSuccessData: sse_decode_inference_result,
234
+ decodeErrorData: sse_decode_onde_error,
235
+ ),
236
+ constMeta: kCrateApiOndeChatEngineGenerateConstMeta,
237
+ argValues: [that, messages, sampling],
238
+ apiImpl: this,
239
+ ));
240
+ }
241
+
242
+ TaskConstMeta get kCrateApiOndeChatEngineGenerateConstMeta =>
243
+ const TaskConstMeta(
244
+ debugName: "OndeChatEngine_generate",
245
+ argNames: ["that", "messages", "sampling"],
246
+ );
247
+
248
+ @override
249
+ Future<List<ChatMessage>> crateApiOndeChatEngineHistory(
250
+ {required OndeChatEngine that}) {
251
+ return handler.executeNormal(NormalTask(
252
+ callFfi: (port_) {
253
+ final serializer = SseSerializer(generalizedFrbRustBinding);
254
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
255
+ that, serializer);
256
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
257
+ funcId: 4, port: port_);
258
+ },
259
+ codec: SseCodec(
260
+ decodeSuccessData: sse_decode_list_chat_message,
261
+ decodeErrorData: null,
262
+ ),
263
+ constMeta: kCrateApiOndeChatEngineHistoryConstMeta,
264
+ argValues: [that],
265
+ apiImpl: this,
266
+ ));
267
+ }
268
+
269
+ TaskConstMeta get kCrateApiOndeChatEngineHistoryConstMeta =>
270
+ const TaskConstMeta(
271
+ debugName: "OndeChatEngine_history",
272
+ argNames: ["that"],
273
+ );
274
+
275
+ @override
276
+ Future<EngineInfo> crateApiOndeChatEngineInfo(
277
+ {required OndeChatEngine that}) {
278
+ return handler.executeNormal(NormalTask(
279
+ callFfi: (port_) {
280
+ final serializer = SseSerializer(generalizedFrbRustBinding);
281
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
282
+ that, serializer);
283
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
284
+ funcId: 5, port: port_);
285
+ },
286
+ codec: SseCodec(
287
+ decodeSuccessData: sse_decode_engine_info,
288
+ decodeErrorData: null,
289
+ ),
290
+ constMeta: kCrateApiOndeChatEngineInfoConstMeta,
291
+ argValues: [that],
292
+ apiImpl: this,
293
+ ));
294
+ }
295
+
296
+ TaskConstMeta get kCrateApiOndeChatEngineInfoConstMeta => const TaskConstMeta(
297
+ debugName: "OndeChatEngine_info",
298
+ argNames: ["that"],
299
+ );
300
+
301
+ @override
302
+ Future<bool> crateApiOndeChatEngineIsLoaded({required OndeChatEngine that}) {
303
+ return handler.executeNormal(NormalTask(
304
+ callFfi: (port_) {
305
+ final serializer = SseSerializer(generalizedFrbRustBinding);
306
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
307
+ that, serializer);
308
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
309
+ funcId: 6, port: port_);
310
+ },
311
+ codec: SseCodec(
312
+ decodeSuccessData: sse_decode_bool,
313
+ decodeErrorData: null,
314
+ ),
315
+ constMeta: kCrateApiOndeChatEngineIsLoadedConstMeta,
316
+ argValues: [that],
317
+ apiImpl: this,
318
+ ));
319
+ }
320
+
321
+ TaskConstMeta get kCrateApiOndeChatEngineIsLoadedConstMeta =>
322
+ const TaskConstMeta(
323
+ debugName: "OndeChatEngine_is_loaded",
324
+ argNames: ["that"],
325
+ );
326
+
327
+ @override
328
+ Future<double> crateApiOndeChatEngineLoadGgufModel(
329
+ {required OndeChatEngine that,
330
+ required GgufModelConfig config,
331
+ String? systemPrompt,
332
+ SamplingConfig? sampling}) {
333
+ return handler.executeNormal(NormalTask(
334
+ callFfi: (port_) {
335
+ final serializer = SseSerializer(generalizedFrbRustBinding);
336
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
337
+ that, serializer);
338
+ sse_encode_box_autoadd_gguf_model_config(config, serializer);
339
+ sse_encode_opt_String(systemPrompt, serializer);
340
+ sse_encode_opt_box_autoadd_sampling_config(sampling, serializer);
341
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
342
+ funcId: 7, port: port_);
343
+ },
344
+ codec: SseCodec(
345
+ decodeSuccessData: sse_decode_f_64,
346
+ decodeErrorData: sse_decode_onde_error,
347
+ ),
348
+ constMeta: kCrateApiOndeChatEngineLoadGgufModelConstMeta,
349
+ argValues: [that, config, systemPrompt, sampling],
350
+ apiImpl: this,
351
+ ));
352
+ }
353
+
354
+ TaskConstMeta get kCrateApiOndeChatEngineLoadGgufModelConstMeta =>
355
+ const TaskConstMeta(
356
+ debugName: "OndeChatEngine_load_gguf_model",
357
+ argNames: ["that", "config", "systemPrompt", "sampling"],
358
+ );
359
+
360
+ @override
361
+ OndeChatEngine crateApiOndeChatEngineNew() {
362
+ return handler.executeSync(SyncTask(
363
+ callFfi: () {
364
+ final serializer = SseSerializer(generalizedFrbRustBinding);
365
+ return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 8)!;
366
+ },
367
+ codec: SseCodec(
368
+ decodeSuccessData:
369
+ sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine,
370
+ decodeErrorData: null,
371
+ ),
372
+ constMeta: kCrateApiOndeChatEngineNewConstMeta,
373
+ argValues: [],
374
+ apiImpl: this,
375
+ ));
376
+ }
377
+
378
+ TaskConstMeta get kCrateApiOndeChatEngineNewConstMeta => const TaskConstMeta(
379
+ debugName: "OndeChatEngine_new",
380
+ argNames: [],
381
+ );
382
+
383
+ @override
384
+ Future<void> crateApiOndeChatEnginePushHistory(
385
+ {required OndeChatEngine that, required ChatMessage message}) {
386
+ return handler.executeNormal(NormalTask(
387
+ callFfi: (port_) {
388
+ final serializer = SseSerializer(generalizedFrbRustBinding);
389
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
390
+ that, serializer);
391
+ sse_encode_box_autoadd_chat_message(message, serializer);
392
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
393
+ funcId: 9, port: port_);
394
+ },
395
+ codec: SseCodec(
396
+ decodeSuccessData: sse_decode_unit,
397
+ decodeErrorData: null,
398
+ ),
399
+ constMeta: kCrateApiOndeChatEnginePushHistoryConstMeta,
400
+ argValues: [that, message],
401
+ apiImpl: this,
402
+ ));
403
+ }
404
+
405
+ TaskConstMeta get kCrateApiOndeChatEnginePushHistoryConstMeta =>
406
+ const TaskConstMeta(
407
+ debugName: "OndeChatEngine_push_history",
408
+ argNames: ["that", "message"],
409
+ );
410
+
411
+ @override
412
+ Future<InferenceResult> crateApiOndeChatEngineSendMessage(
413
+ {required OndeChatEngine that, required String message}) {
414
+ return handler.executeNormal(NormalTask(
415
+ callFfi: (port_) {
416
+ final serializer = SseSerializer(generalizedFrbRustBinding);
417
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
418
+ that, serializer);
419
+ sse_encode_String(message, serializer);
420
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
421
+ funcId: 10, port: port_);
422
+ },
423
+ codec: SseCodec(
424
+ decodeSuccessData: sse_decode_inference_result,
425
+ decodeErrorData: sse_decode_onde_error,
426
+ ),
427
+ constMeta: kCrateApiOndeChatEngineSendMessageConstMeta,
428
+ argValues: [that, message],
429
+ apiImpl: this,
430
+ ));
431
+ }
432
+
433
+ TaskConstMeta get kCrateApiOndeChatEngineSendMessageConstMeta =>
434
+ const TaskConstMeta(
435
+ debugName: "OndeChatEngine_send_message",
436
+ argNames: ["that", "message"],
437
+ );
438
+
439
+ @override
440
+ Future<void> crateApiOndeChatEngineSetSampling(
441
+ {required OndeChatEngine that, required SamplingConfig sampling}) {
442
+ return handler.executeNormal(NormalTask(
443
+ callFfi: (port_) {
444
+ final serializer = SseSerializer(generalizedFrbRustBinding);
445
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
446
+ that, serializer);
447
+ sse_encode_box_autoadd_sampling_config(sampling, serializer);
448
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
449
+ funcId: 11, port: port_);
450
+ },
451
+ codec: SseCodec(
452
+ decodeSuccessData: sse_decode_unit,
453
+ decodeErrorData: null,
454
+ ),
455
+ constMeta: kCrateApiOndeChatEngineSetSamplingConstMeta,
456
+ argValues: [that, sampling],
457
+ apiImpl: this,
458
+ ));
459
+ }
460
+
461
+ TaskConstMeta get kCrateApiOndeChatEngineSetSamplingConstMeta =>
462
+ const TaskConstMeta(
463
+ debugName: "OndeChatEngine_set_sampling",
464
+ argNames: ["that", "sampling"],
465
+ );
466
+
467
+ @override
468
+ Future<void> crateApiOndeChatEngineSetSystemPrompt(
469
+ {required OndeChatEngine that, required String prompt}) {
470
+ return handler.executeNormal(NormalTask(
471
+ callFfi: (port_) {
472
+ final serializer = SseSerializer(generalizedFrbRustBinding);
473
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
474
+ that, serializer);
475
+ sse_encode_String(prompt, serializer);
476
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
477
+ funcId: 12, port: port_);
478
+ },
479
+ codec: SseCodec(
480
+ decodeSuccessData: sse_decode_unit,
481
+ decodeErrorData: null,
482
+ ),
483
+ constMeta: kCrateApiOndeChatEngineSetSystemPromptConstMeta,
484
+ argValues: [that, prompt],
485
+ apiImpl: this,
486
+ ));
487
+ }
488
+
489
+ TaskConstMeta get kCrateApiOndeChatEngineSetSystemPromptConstMeta =>
490
+ const TaskConstMeta(
491
+ debugName: "OndeChatEngine_set_system_prompt",
492
+ argNames: ["that", "prompt"],
493
+ );
494
+
495
+ @override
496
+ Stream<StreamChunk> crateApiOndeChatEngineStreamMessage(
497
+ {required OndeChatEngine that, required String message}) {
498
+ final sink = RustStreamSink<StreamChunk>();
499
+ unawaited(handler.executeNormal(NormalTask(
500
+ callFfi: (port_) {
501
+ final serializer = SseSerializer(generalizedFrbRustBinding);
502
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
503
+ that, serializer);
504
+ sse_encode_String(message, serializer);
505
+ sse_encode_StreamSink_stream_chunk_Sse(sink, serializer);
506
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
507
+ funcId: 13, port: port_);
508
+ },
509
+ codec: SseCodec(
510
+ decodeSuccessData: sse_decode_unit,
511
+ decodeErrorData: sse_decode_onde_error,
512
+ ),
513
+ constMeta: kCrateApiOndeChatEngineStreamMessageConstMeta,
514
+ argValues: [that, message, sink],
515
+ apiImpl: this,
516
+ )));
517
+ return sink.stream;
518
+ }
519
+
520
+ TaskConstMeta get kCrateApiOndeChatEngineStreamMessageConstMeta =>
521
+ const TaskConstMeta(
522
+ debugName: "OndeChatEngine_stream_message",
523
+ argNames: ["that", "message", "sink"],
524
+ );
525
+
526
+ @override
527
+ Future<String?> crateApiOndeChatEngineUnloadModel(
528
+ {required OndeChatEngine that}) {
529
+ return handler.executeNormal(NormalTask(
530
+ callFfi: (port_) {
531
+ final serializer = SseSerializer(generalizedFrbRustBinding);
532
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
533
+ that, serializer);
534
+ pdeCallFfi(generalizedFrbRustBinding, serializer,
535
+ funcId: 14, port: port_);
536
+ },
537
+ codec: SseCodec(
538
+ decodeSuccessData: sse_decode_opt_String,
539
+ decodeErrorData: null,
540
+ ),
541
+ constMeta: kCrateApiOndeChatEngineUnloadModelConstMeta,
542
+ argValues: [that],
543
+ apiImpl: this,
544
+ ));
545
+ }
546
+
547
+ TaskConstMeta get kCrateApiOndeChatEngineUnloadModelConstMeta =>
548
+ const TaskConstMeta(
549
+ debugName: "OndeChatEngine_unload_model",
550
+ argNames: ["that"],
551
+ );
552
+
553
+ @override
554
+ GgufModelConfig crateApiDefaultModelConfig() {
555
+ return handler.executeSync(SyncTask(
556
+ callFfi: () {
557
+ final serializer = SseSerializer(generalizedFrbRustBinding);
558
+ return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 15)!;
559
+ },
560
+ codec: SseCodec(
561
+ decodeSuccessData: sse_decode_gguf_model_config,
562
+ decodeErrorData: null,
563
+ ),
564
+ constMeta: kCrateApiDefaultModelConfigConstMeta,
565
+ argValues: [],
566
+ apiImpl: this,
567
+ ));
568
+ }
569
+
570
+ TaskConstMeta get kCrateApiDefaultModelConfigConstMeta => const TaskConstMeta(
571
+ debugName: "default_model_config",
572
+ argNames: [],
573
+ );
574
+
575
+ @override
576
+ SamplingConfig crateApiDefaultSamplingConfig() {
577
+ return handler.executeSync(SyncTask(
578
+ callFfi: () {
579
+ final serializer = SseSerializer(generalizedFrbRustBinding);
580
+ return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 16)!;
581
+ },
582
+ codec: SseCodec(
583
+ decodeSuccessData: sse_decode_sampling_config,
584
+ decodeErrorData: null,
585
+ ),
586
+ constMeta: kCrateApiDefaultSamplingConfigConstMeta,
587
+ argValues: [],
588
+ apiImpl: this,
589
+ ));
590
+ }
591
+
592
+ TaskConstMeta get kCrateApiDefaultSamplingConfigConstMeta =>
593
+ const TaskConstMeta(
594
+ debugName: "default_sampling_config",
595
+ argNames: [],
596
+ );
597
+
598
+ @override
599
+ SamplingConfig crateApiDeterministicSamplingConfig() {
600
+ return handler.executeSync(SyncTask(
601
+ callFfi: () {
602
+ final serializer = SseSerializer(generalizedFrbRustBinding);
603
+ return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 17)!;
604
+ },
605
+ codec: SseCodec(
606
+ decodeSuccessData: sse_decode_sampling_config,
607
+ decodeErrorData: null,
608
+ ),
609
+ constMeta: kCrateApiDeterministicSamplingConfigConstMeta,
610
+ argValues: [],
611
+ apiImpl: this,
612
+ ));
613
+ }
614
+
615
+ TaskConstMeta get kCrateApiDeterministicSamplingConfigConstMeta =>
616
+ const TaskConstMeta(
617
+ debugName: "deterministic_sampling_config",
618
+ argNames: [],
619
+ );
620
+
621
+ @override
622
+ SamplingConfig crateApiMobileSamplingConfig() {
623
+ return handler.executeSync(SyncTask(
624
+ callFfi: () {
625
+ final serializer = SseSerializer(generalizedFrbRustBinding);
626
+ return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 18)!;
627
+ },
628
+ codec: SseCodec(
629
+ decodeSuccessData: sse_decode_sampling_config,
630
+ decodeErrorData: null,
631
+ ),
632
+ constMeta: kCrateApiMobileSamplingConfigConstMeta,
633
+ argValues: [],
634
+ apiImpl: this,
635
+ ));
636
+ }
637
+
638
+ TaskConstMeta get kCrateApiMobileSamplingConfigConstMeta =>
639
+ const TaskConstMeta(
640
+ debugName: "mobile_sampling_config",
641
+ argNames: [],
642
+ );
643
+
644
+ @override
645
+ GgufModelConfig crateApiQwen2515BConfig() {
646
+ return handler.executeSync(SyncTask(
647
+ callFfi: () {
648
+ final serializer = SseSerializer(generalizedFrbRustBinding);
649
+ return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 19)!;
650
+ },
651
+ codec: SseCodec(
652
+ decodeSuccessData: sse_decode_gguf_model_config,
653
+ decodeErrorData: null,
654
+ ),
655
+ constMeta: kCrateApiQwen2515BConfigConstMeta,
656
+ argValues: [],
657
+ apiImpl: this,
658
+ ));
659
+ }
660
+
661
+ TaskConstMeta get kCrateApiQwen2515BConfigConstMeta => const TaskConstMeta(
662
+ debugName: "qwen25_1_5b_config",
663
+ argNames: [],
664
+ );
665
+
666
+ @override
667
+ GgufModelConfig crateApiQwen253BConfig() {
668
+ return handler.executeSync(SyncTask(
669
+ callFfi: () {
670
+ final serializer = SseSerializer(generalizedFrbRustBinding);
671
+ return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 20)!;
672
+ },
673
+ codec: SseCodec(
674
+ decodeSuccessData: sse_decode_gguf_model_config,
675
+ decodeErrorData: null,
676
+ ),
677
+ constMeta: kCrateApiQwen253BConfigConstMeta,
678
+ argValues: [],
679
+ apiImpl: this,
680
+ ));
681
+ }
682
+
683
+ TaskConstMeta get kCrateApiQwen253BConfigConstMeta => const TaskConstMeta(
684
+ debugName: "qwen25_3b_config",
685
+ argNames: [],
686
+ );
687
+
688
+ @override
689
+ GgufModelConfig crateApiQwen25Coder15BConfig() {
690
+ return handler.executeSync(SyncTask(
691
+ callFfi: () {
692
+ final serializer = SseSerializer(generalizedFrbRustBinding);
693
+ return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 21)!;
694
+ },
695
+ codec: SseCodec(
696
+ decodeSuccessData: sse_decode_gguf_model_config,
697
+ decodeErrorData: null,
698
+ ),
699
+ constMeta: kCrateApiQwen25Coder15BConfigConstMeta,
700
+ argValues: [],
701
+ apiImpl: this,
702
+ ));
703
+ }
704
+
705
+ TaskConstMeta get kCrateApiQwen25Coder15BConfigConstMeta =>
706
+ const TaskConstMeta(
707
+ debugName: "qwen25_coder_1_5b_config",
708
+ argNames: [],
709
+ );
710
+
711
+ @override
712
+ GgufModelConfig crateApiQwen25Coder3BConfig() {
713
+ return handler.executeSync(SyncTask(
714
+ callFfi: () {
715
+ final serializer = SseSerializer(generalizedFrbRustBinding);
716
+ return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 22)!;
717
+ },
718
+ codec: SseCodec(
719
+ decodeSuccessData: sse_decode_gguf_model_config,
720
+ decodeErrorData: null,
721
+ ),
722
+ constMeta: kCrateApiQwen25Coder3BConfigConstMeta,
723
+ argValues: [],
724
+ apiImpl: this,
725
+ ));
726
+ }
727
+
728
+ TaskConstMeta get kCrateApiQwen25Coder3BConfigConstMeta =>
729
+ const TaskConstMeta(
730
+ debugName: "qwen25_coder_3b_config",
731
+ argNames: [],
732
+ );
733
+
734
+ RustArcIncrementStrongCountFnType
735
+ get rust_arc_increment_strong_count_OndeChatEngine => wire
736
+ .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine;
737
+
738
+ RustArcDecrementStrongCountFnType
739
+ get rust_arc_decrement_strong_count_OndeChatEngine => wire
740
+ .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine;
741
+
742
+ @protected
743
+ AnyhowException dco_decode_AnyhowException(dynamic raw) {
744
+ // Codec=Dco (DartCObject based), see doc to use other codecs
745
+ return AnyhowException(raw as String);
746
+ }
747
+
748
+ @protected
749
+ OndeChatEngine
750
+ dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
751
+ dynamic raw) {
752
+ // Codec=Dco (DartCObject based), see doc to use other codecs
753
+ return OndeChatEngineImpl.frbInternalDcoDecode(raw as List<dynamic>);
754
+ }
755
+
756
+ @protected
757
+ OndeChatEngine
758
+ dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
759
+ dynamic raw) {
760
+ // Codec=Dco (DartCObject based), see doc to use other codecs
761
+ return OndeChatEngineImpl.frbInternalDcoDecode(raw as List<dynamic>);
762
+ }
763
+
764
+ @protected
765
+ OndeChatEngine
766
+ dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
767
+ dynamic raw) {
768
+ // Codec=Dco (DartCObject based), see doc to use other codecs
769
+ return OndeChatEngineImpl.frbInternalDcoDecode(raw as List<dynamic>);
770
+ }
771
+
772
+ @protected
773
+ RustStreamSink<StreamChunk> dco_decode_StreamSink_stream_chunk_Sse(
774
+ dynamic raw) {
775
+ // Codec=Dco (DartCObject based), see doc to use other codecs
776
+ throw UnimplementedError();
777
+ }
778
+
779
+ @protected
780
+ String dco_decode_String(dynamic raw) {
781
+ // Codec=Dco (DartCObject based), see doc to use other codecs
782
+ return raw as String;
783
+ }
784
+
785
+ @protected
786
+ bool dco_decode_bool(dynamic raw) {
787
+ // Codec=Dco (DartCObject based), see doc to use other codecs
788
+ return raw as bool;
789
+ }
790
+
791
+ @protected
792
+ ChatMessage dco_decode_box_autoadd_chat_message(dynamic raw) {
793
+ // Codec=Dco (DartCObject based), see doc to use other codecs
794
+ return dco_decode_chat_message(raw);
795
+ }
796
+
797
+ @protected
798
+ double dco_decode_box_autoadd_f_32(dynamic raw) {
799
+ // Codec=Dco (DartCObject based), see doc to use other codecs
800
+ return raw as double;
801
+ }
802
+
803
+ @protected
804
+ double dco_decode_box_autoadd_f_64(dynamic raw) {
805
+ // Codec=Dco (DartCObject based), see doc to use other codecs
806
+ return raw as double;
807
+ }
808
+
809
+ @protected
810
+ GgufModelConfig dco_decode_box_autoadd_gguf_model_config(dynamic raw) {
811
+ // Codec=Dco (DartCObject based), see doc to use other codecs
812
+ return dco_decode_gguf_model_config(raw);
813
+ }
814
+
815
+ @protected
816
+ SamplingConfig dco_decode_box_autoadd_sampling_config(dynamic raw) {
817
+ // Codec=Dco (DartCObject based), see doc to use other codecs
818
+ return dco_decode_sampling_config(raw);
819
+ }
820
+
821
+ @protected
822
+ BigInt dco_decode_box_autoadd_u_64(dynamic raw) {
823
+ // Codec=Dco (DartCObject based), see doc to use other codecs
824
+ return dco_decode_u_64(raw);
825
+ }
826
+
827
+ @protected
828
+ ChatMessage dco_decode_chat_message(dynamic raw) {
829
+ // Codec=Dco (DartCObject based), see doc to use other codecs
830
+ final arr = raw as List<dynamic>;
831
+ if (arr.length != 2)
832
+ throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
833
+ return ChatMessage(
834
+ role: dco_decode_chat_role(arr[0]),
835
+ content: dco_decode_String(arr[1]),
836
+ );
837
+ }
838
+
839
+ @protected
840
+ ChatRole dco_decode_chat_role(dynamic raw) {
841
+ // Codec=Dco (DartCObject based), see doc to use other codecs
842
+ return ChatRole.values[raw as int];
843
+ }
844
+
845
+ @protected
846
+ EngineInfo dco_decode_engine_info(dynamic raw) {
847
+ // Codec=Dco (DartCObject based), see doc to use other codecs
848
+ final arr = raw as List<dynamic>;
849
+ if (arr.length != 4)
850
+ throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
851
+ return EngineInfo(
852
+ status: dco_decode_engine_status(arr[0]),
853
+ modelName: dco_decode_opt_String(arr[1]),
854
+ approxMemory: dco_decode_opt_String(arr[2]),
855
+ historyLength: dco_decode_u_64(arr[3]),
856
+ );
857
+ }
858
+
859
+ @protected
860
+ EngineStatus dco_decode_engine_status(dynamic raw) {
861
+ // Codec=Dco (DartCObject based), see doc to use other codecs
862
+ return EngineStatus.values[raw as int];
863
+ }
864
+
865
+ @protected
866
+ double dco_decode_f_32(dynamic raw) {
867
+ // Codec=Dco (DartCObject based), see doc to use other codecs
868
+ return raw as double;
869
+ }
870
+
871
+ @protected
872
+ double dco_decode_f_64(dynamic raw) {
873
+ // Codec=Dco (DartCObject based), see doc to use other codecs
874
+ return raw as double;
875
+ }
876
+
877
+ @protected
878
+ GgufModelConfig dco_decode_gguf_model_config(dynamic raw) {
879
+ // Codec=Dco (DartCObject based), see doc to use other codecs
880
+ final arr = raw as List<dynamic>;
881
+ if (arr.length != 5)
882
+ throw Exception('unexpected arr length: expect 5 but see ${arr.length}');
883
+ return GgufModelConfig(
884
+ modelId: dco_decode_String(arr[0]),
885
+ files: dco_decode_list_String(arr[1]),
886
+ tokModelId: dco_decode_opt_String(arr[2]),
887
+ displayName: dco_decode_String(arr[3]),
888
+ approxMemory: dco_decode_String(arr[4]),
889
+ );
890
+ }
891
+
892
+ @protected
893
+ int dco_decode_i_32(dynamic raw) {
894
+ // Codec=Dco (DartCObject based), see doc to use other codecs
895
+ return raw as int;
896
+ }
897
+
898
+ @protected
899
+ InferenceResult dco_decode_inference_result(dynamic raw) {
900
+ // Codec=Dco (DartCObject based), see doc to use other codecs
901
+ final arr = raw as List<dynamic>;
902
+ if (arr.length != 4)
903
+ throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
904
+ return InferenceResult(
905
+ text: dco_decode_String(arr[0]),
906
+ durationSecs: dco_decode_f_64(arr[1]),
907
+ durationDisplay: dco_decode_String(arr[2]),
908
+ finishReason: dco_decode_String(arr[3]),
909
+ );
910
+ }
911
+
912
+ @protected
913
+ List<String> dco_decode_list_String(dynamic raw) {
914
+ // Codec=Dco (DartCObject based), see doc to use other codecs
915
+ return (raw as List<dynamic>).map(dco_decode_String).toList();
916
+ }
917
+
918
+ @protected
919
+ List<ChatMessage> dco_decode_list_chat_message(dynamic raw) {
920
+ // Codec=Dco (DartCObject based), see doc to use other codecs
921
+ return (raw as List<dynamic>).map(dco_decode_chat_message).toList();
922
+ }
923
+
924
+ @protected
925
+ Uint8List dco_decode_list_prim_u_8_strict(dynamic raw) {
926
+ // Codec=Dco (DartCObject based), see doc to use other codecs
927
+ return raw as Uint8List;
928
+ }
929
+
930
+ @protected
931
+ OndeError dco_decode_onde_error(dynamic raw) {
932
+ // Codec=Dco (DartCObject based), see doc to use other codecs
933
+ switch (raw[0]) {
934
+ case 0:
935
+ return OndeError_NoModelLoaded();
936
+ case 1:
937
+ return OndeError_AlreadyLoaded(
938
+ modelName: dco_decode_String(raw[1]),
939
+ );
940
+ case 2:
941
+ return OndeError_ModelBuild(
942
+ reason: dco_decode_String(raw[1]),
943
+ );
944
+ case 3:
945
+ return OndeError_Inference(
946
+ reason: dco_decode_String(raw[1]),
947
+ );
948
+ case 4:
949
+ return OndeError_Cancelled();
950
+ case 5:
951
+ return OndeError_Other(
952
+ reason: dco_decode_String(raw[1]),
953
+ );
954
+ default:
955
+ throw Exception("unreachable");
956
+ }
957
+ }
958
+
959
+ @protected
960
+ String? dco_decode_opt_String(dynamic raw) {
961
+ // Codec=Dco (DartCObject based), see doc to use other codecs
962
+ return raw == null ? null : dco_decode_String(raw);
963
+ }
964
+
965
+ @protected
966
+ double? dco_decode_opt_box_autoadd_f_32(dynamic raw) {
967
+ // Codec=Dco (DartCObject based), see doc to use other codecs
968
+ return raw == null ? null : dco_decode_box_autoadd_f_32(raw);
969
+ }
970
+
971
+ @protected
972
+ double? dco_decode_opt_box_autoadd_f_64(dynamic raw) {
973
+ // Codec=Dco (DartCObject based), see doc to use other codecs
974
+ return raw == null ? null : dco_decode_box_autoadd_f_64(raw);
975
+ }
976
+
977
+ @protected
978
+ SamplingConfig? dco_decode_opt_box_autoadd_sampling_config(dynamic raw) {
979
+ // Codec=Dco (DartCObject based), see doc to use other codecs
980
+ return raw == null ? null : dco_decode_box_autoadd_sampling_config(raw);
981
+ }
982
+
983
+ @protected
984
+ BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw) {
985
+ // Codec=Dco (DartCObject based), see doc to use other codecs
986
+ return raw == null ? null : dco_decode_box_autoadd_u_64(raw);
987
+ }
988
+
989
+ @protected
990
+ SamplingConfig dco_decode_sampling_config(dynamic raw) {
991
+ // Codec=Dco (DartCObject based), see doc to use other codecs
992
+ final arr = raw as List<dynamic>;
993
+ if (arr.length != 7)
994
+ throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
995
+ return SamplingConfig(
996
+ temperature: dco_decode_opt_box_autoadd_f_64(arr[0]),
997
+ topP: dco_decode_opt_box_autoadd_f_64(arr[1]),
998
+ topK: dco_decode_opt_box_autoadd_u_64(arr[2]),
999
+ minP: dco_decode_opt_box_autoadd_f_64(arr[3]),
1000
+ maxTokens: dco_decode_opt_box_autoadd_u_64(arr[4]),
1001
+ frequencyPenalty: dco_decode_opt_box_autoadd_f_32(arr[5]),
1002
+ presencePenalty: dco_decode_opt_box_autoadd_f_32(arr[6]),
1003
+ );
1004
+ }
1005
+
1006
+ @protected
1007
+ StreamChunk dco_decode_stream_chunk(dynamic raw) {
1008
+ // Codec=Dco (DartCObject based), see doc to use other codecs
1009
+ final arr = raw as List<dynamic>;
1010
+ if (arr.length != 3)
1011
+ throw Exception('unexpected arr length: expect 3 but see ${arr.length}');
1012
+ return StreamChunk(
1013
+ delta: dco_decode_String(arr[0]),
1014
+ done: dco_decode_bool(arr[1]),
1015
+ finishReason: dco_decode_opt_String(arr[2]),
1016
+ );
1017
+ }
1018
+
1019
+ @protected
1020
+ BigInt dco_decode_u_64(dynamic raw) {
1021
+ // Codec=Dco (DartCObject based), see doc to use other codecs
1022
+ return dcoDecodeU64(raw);
1023
+ }
1024
+
1025
+ @protected
1026
+ int dco_decode_u_8(dynamic raw) {
1027
+ // Codec=Dco (DartCObject based), see doc to use other codecs
1028
+ return raw as int;
1029
+ }
1030
+
1031
+ @protected
1032
+ void dco_decode_unit(dynamic raw) {
1033
+ // Codec=Dco (DartCObject based), see doc to use other codecs
1034
+ return;
1035
+ }
1036
+
1037
+ @protected
1038
+ BigInt dco_decode_usize(dynamic raw) {
1039
+ // Codec=Dco (DartCObject based), see doc to use other codecs
1040
+ return dcoDecodeU64(raw);
1041
+ }
1042
+
1043
+ @protected
1044
+ AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer) {
1045
+ // Codec=Sse (Serialization based), see doc to use other codecs
1046
+ var inner = sse_decode_String(deserializer);
1047
+ return AnyhowException(inner);
1048
+ }
1049
+
1050
+ @protected
1051
+ OndeChatEngine
1052
+ sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
1053
+ SseDeserializer deserializer) {
1054
+ // Codec=Sse (Serialization based), see doc to use other codecs
1055
+ return OndeChatEngineImpl.frbInternalSseDecode(
1056
+ sse_decode_usize(deserializer), sse_decode_i_32(deserializer));
1057
+ }
1058
+
1059
+ @protected
1060
+ OndeChatEngine
1061
+ sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
1062
+ SseDeserializer deserializer) {
1063
+ // Codec=Sse (Serialization based), see doc to use other codecs
1064
+ return OndeChatEngineImpl.frbInternalSseDecode(
1065
+ sse_decode_usize(deserializer), sse_decode_i_32(deserializer));
1066
+ }
1067
+
1068
+ @protected
1069
+ OndeChatEngine
1070
+ sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
1071
+ SseDeserializer deserializer) {
1072
+ // Codec=Sse (Serialization based), see doc to use other codecs
1073
+ return OndeChatEngineImpl.frbInternalSseDecode(
1074
+ sse_decode_usize(deserializer), sse_decode_i_32(deserializer));
1075
+ }
1076
+
1077
+ @protected
1078
+ RustStreamSink<StreamChunk> sse_decode_StreamSink_stream_chunk_Sse(
1079
+ SseDeserializer deserializer) {
1080
+ // Codec=Sse (Serialization based), see doc to use other codecs
1081
+ throw UnimplementedError('Unreachable ()');
1082
+ }
1083
+
1084
+ @protected
1085
+ String sse_decode_String(SseDeserializer deserializer) {
1086
+ // Codec=Sse (Serialization based), see doc to use other codecs
1087
+ var inner = sse_decode_list_prim_u_8_strict(deserializer);
1088
+ return utf8.decoder.convert(inner);
1089
+ }
1090
+
1091
+ @protected
1092
+ bool sse_decode_bool(SseDeserializer deserializer) {
1093
+ // Codec=Sse (Serialization based), see doc to use other codecs
1094
+ return deserializer.buffer.getUint8() != 0;
1095
+ }
1096
+
1097
+ @protected
1098
+ ChatMessage sse_decode_box_autoadd_chat_message(
1099
+ SseDeserializer deserializer) {
1100
+ // Codec=Sse (Serialization based), see doc to use other codecs
1101
+ return (sse_decode_chat_message(deserializer));
1102
+ }
1103
+
1104
+ @protected
1105
+ double sse_decode_box_autoadd_f_32(SseDeserializer deserializer) {
1106
+ // Codec=Sse (Serialization based), see doc to use other codecs
1107
+ return (sse_decode_f_32(deserializer));
1108
+ }
1109
+
1110
+ @protected
1111
+ double sse_decode_box_autoadd_f_64(SseDeserializer deserializer) {
1112
+ // Codec=Sse (Serialization based), see doc to use other codecs
1113
+ return (sse_decode_f_64(deserializer));
1114
+ }
1115
+
1116
+ @protected
1117
+ GgufModelConfig sse_decode_box_autoadd_gguf_model_config(
1118
+ SseDeserializer deserializer) {
1119
+ // Codec=Sse (Serialization based), see doc to use other codecs
1120
+ return (sse_decode_gguf_model_config(deserializer));
1121
+ }
1122
+
1123
+ @protected
1124
+ SamplingConfig sse_decode_box_autoadd_sampling_config(
1125
+ SseDeserializer deserializer) {
1126
+ // Codec=Sse (Serialization based), see doc to use other codecs
1127
+ return (sse_decode_sampling_config(deserializer));
1128
+ }
1129
+
1130
+ @protected
1131
+ BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer) {
1132
+ // Codec=Sse (Serialization based), see doc to use other codecs
1133
+ return (sse_decode_u_64(deserializer));
1134
+ }
1135
+
1136
+ @protected
1137
+ ChatMessage sse_decode_chat_message(SseDeserializer deserializer) {
1138
+ // Codec=Sse (Serialization based), see doc to use other codecs
1139
+ var var_role = sse_decode_chat_role(deserializer);
1140
+ var var_content = sse_decode_String(deserializer);
1141
+ return ChatMessage(role: var_role, content: var_content);
1142
+ }
1143
+
1144
+ @protected
1145
+ ChatRole sse_decode_chat_role(SseDeserializer deserializer) {
1146
+ // Codec=Sse (Serialization based), see doc to use other codecs
1147
+ var inner = sse_decode_i_32(deserializer);
1148
+ return ChatRole.values[inner];
1149
+ }
1150
+
1151
+ @protected
1152
+ EngineInfo sse_decode_engine_info(SseDeserializer deserializer) {
1153
+ // Codec=Sse (Serialization based), see doc to use other codecs
1154
+ var var_status = sse_decode_engine_status(deserializer);
1155
+ var var_modelName = sse_decode_opt_String(deserializer);
1156
+ var var_approxMemory = sse_decode_opt_String(deserializer);
1157
+ var var_historyLength = sse_decode_u_64(deserializer);
1158
+ return EngineInfo(
1159
+ status: var_status,
1160
+ modelName: var_modelName,
1161
+ approxMemory: var_approxMemory,
1162
+ historyLength: var_historyLength);
1163
+ }
1164
+
1165
+ @protected
1166
+ EngineStatus sse_decode_engine_status(SseDeserializer deserializer) {
1167
+ // Codec=Sse (Serialization based), see doc to use other codecs
1168
+ var inner = sse_decode_i_32(deserializer);
1169
+ return EngineStatus.values[inner];
1170
+ }
1171
+
1172
+ @protected
1173
+ double sse_decode_f_32(SseDeserializer deserializer) {
1174
+ // Codec=Sse (Serialization based), see doc to use other codecs
1175
+ return deserializer.buffer.getFloat32();
1176
+ }
1177
+
1178
+ @protected
1179
+ double sse_decode_f_64(SseDeserializer deserializer) {
1180
+ // Codec=Sse (Serialization based), see doc to use other codecs
1181
+ return deserializer.buffer.getFloat64();
1182
+ }
1183
+
1184
+ @protected
1185
+ GgufModelConfig sse_decode_gguf_model_config(SseDeserializer deserializer) {
1186
+ // Codec=Sse (Serialization based), see doc to use other codecs
1187
+ var var_modelId = sse_decode_String(deserializer);
1188
+ var var_files = sse_decode_list_String(deserializer);
1189
+ var var_tokModelId = sse_decode_opt_String(deserializer);
1190
+ var var_displayName = sse_decode_String(deserializer);
1191
+ var var_approxMemory = sse_decode_String(deserializer);
1192
+ return GgufModelConfig(
1193
+ modelId: var_modelId,
1194
+ files: var_files,
1195
+ tokModelId: var_tokModelId,
1196
+ displayName: var_displayName,
1197
+ approxMemory: var_approxMemory);
1198
+ }
1199
+
1200
+ @protected
1201
+ int sse_decode_i_32(SseDeserializer deserializer) {
1202
+ // Codec=Sse (Serialization based), see doc to use other codecs
1203
+ return deserializer.buffer.getInt32();
1204
+ }
1205
+
1206
+ @protected
1207
+ InferenceResult sse_decode_inference_result(SseDeserializer deserializer) {
1208
+ // Codec=Sse (Serialization based), see doc to use other codecs
1209
+ var var_text = sse_decode_String(deserializer);
1210
+ var var_durationSecs = sse_decode_f_64(deserializer);
1211
+ var var_durationDisplay = sse_decode_String(deserializer);
1212
+ var var_finishReason = sse_decode_String(deserializer);
1213
+ return InferenceResult(
1214
+ text: var_text,
1215
+ durationSecs: var_durationSecs,
1216
+ durationDisplay: var_durationDisplay,
1217
+ finishReason: var_finishReason);
1218
+ }
1219
+
1220
+ @protected
1221
+ List<String> sse_decode_list_String(SseDeserializer deserializer) {
1222
+ // Codec=Sse (Serialization based), see doc to use other codecs
1223
+
1224
+ var len_ = sse_decode_i_32(deserializer);
1225
+ var ans_ = <String>[];
1226
+ for (var idx_ = 0; idx_ < len_; ++idx_) {
1227
+ ans_.add(sse_decode_String(deserializer));
1228
+ }
1229
+ return ans_;
1230
+ }
1231
+
1232
+ @protected
1233
+ List<ChatMessage> sse_decode_list_chat_message(SseDeserializer deserializer) {
1234
+ // Codec=Sse (Serialization based), see doc to use other codecs
1235
+
1236
+ var len_ = sse_decode_i_32(deserializer);
1237
+ var ans_ = <ChatMessage>[];
1238
+ for (var idx_ = 0; idx_ < len_; ++idx_) {
1239
+ ans_.add(sse_decode_chat_message(deserializer));
1240
+ }
1241
+ return ans_;
1242
+ }
1243
+
1244
+ @protected
1245
+ Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer) {
1246
+ // Codec=Sse (Serialization based), see doc to use other codecs
1247
+ var len_ = sse_decode_i_32(deserializer);
1248
+ return deserializer.buffer.getUint8List(len_);
1249
+ }
1250
+
1251
+ @protected
1252
+ OndeError sse_decode_onde_error(SseDeserializer deserializer) {
1253
+ // Codec=Sse (Serialization based), see doc to use other codecs
1254
+
1255
+ var tag_ = sse_decode_i_32(deserializer);
1256
+ switch (tag_) {
1257
+ case 0:
1258
+ return OndeError_NoModelLoaded();
1259
+ case 1:
1260
+ var var_modelName = sse_decode_String(deserializer);
1261
+ return OndeError_AlreadyLoaded(modelName: var_modelName);
1262
+ case 2:
1263
+ var var_reason = sse_decode_String(deserializer);
1264
+ return OndeError_ModelBuild(reason: var_reason);
1265
+ case 3:
1266
+ var var_reason = sse_decode_String(deserializer);
1267
+ return OndeError_Inference(reason: var_reason);
1268
+ case 4:
1269
+ return OndeError_Cancelled();
1270
+ case 5:
1271
+ var var_reason = sse_decode_String(deserializer);
1272
+ return OndeError_Other(reason: var_reason);
1273
+ default:
1274
+ throw UnimplementedError('');
1275
+ }
1276
+ }
1277
+
1278
+ @protected
1279
+ String? sse_decode_opt_String(SseDeserializer deserializer) {
1280
+ // Codec=Sse (Serialization based), see doc to use other codecs
1281
+
1282
+ if (sse_decode_bool(deserializer)) {
1283
+ return (sse_decode_String(deserializer));
1284
+ } else {
1285
+ return null;
1286
+ }
1287
+ }
1288
+
1289
+ @protected
1290
+ double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer) {
1291
+ // Codec=Sse (Serialization based), see doc to use other codecs
1292
+
1293
+ if (sse_decode_bool(deserializer)) {
1294
+ return (sse_decode_box_autoadd_f_32(deserializer));
1295
+ } else {
1296
+ return null;
1297
+ }
1298
+ }
1299
+
1300
+ @protected
1301
+ double? sse_decode_opt_box_autoadd_f_64(SseDeserializer deserializer) {
1302
+ // Codec=Sse (Serialization based), see doc to use other codecs
1303
+
1304
+ if (sse_decode_bool(deserializer)) {
1305
+ return (sse_decode_box_autoadd_f_64(deserializer));
1306
+ } else {
1307
+ return null;
1308
+ }
1309
+ }
1310
+
1311
+ @protected
1312
+ SamplingConfig? sse_decode_opt_box_autoadd_sampling_config(
1313
+ SseDeserializer deserializer) {
1314
+ // Codec=Sse (Serialization based), see doc to use other codecs
1315
+
1316
+ if (sse_decode_bool(deserializer)) {
1317
+ return (sse_decode_box_autoadd_sampling_config(deserializer));
1318
+ } else {
1319
+ return null;
1320
+ }
1321
+ }
1322
+
1323
+ @protected
1324
+ BigInt? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer) {
1325
+ // Codec=Sse (Serialization based), see doc to use other codecs
1326
+
1327
+ if (sse_decode_bool(deserializer)) {
1328
+ return (sse_decode_box_autoadd_u_64(deserializer));
1329
+ } else {
1330
+ return null;
1331
+ }
1332
+ }
1333
+
1334
+ @protected
1335
+ SamplingConfig sse_decode_sampling_config(SseDeserializer deserializer) {
1336
+ // Codec=Sse (Serialization based), see doc to use other codecs
1337
+ var var_temperature = sse_decode_opt_box_autoadd_f_64(deserializer);
1338
+ var var_topP = sse_decode_opt_box_autoadd_f_64(deserializer);
1339
+ var var_topK = sse_decode_opt_box_autoadd_u_64(deserializer);
1340
+ var var_minP = sse_decode_opt_box_autoadd_f_64(deserializer);
1341
+ var var_maxTokens = sse_decode_opt_box_autoadd_u_64(deserializer);
1342
+ var var_frequencyPenalty = sse_decode_opt_box_autoadd_f_32(deserializer);
1343
+ var var_presencePenalty = sse_decode_opt_box_autoadd_f_32(deserializer);
1344
+ return SamplingConfig(
1345
+ temperature: var_temperature,
1346
+ topP: var_topP,
1347
+ topK: var_topK,
1348
+ minP: var_minP,
1349
+ maxTokens: var_maxTokens,
1350
+ frequencyPenalty: var_frequencyPenalty,
1351
+ presencePenalty: var_presencePenalty);
1352
+ }
1353
+
1354
+ @protected
1355
+ StreamChunk sse_decode_stream_chunk(SseDeserializer deserializer) {
1356
+ // Codec=Sse (Serialization based), see doc to use other codecs
1357
+ var var_delta = sse_decode_String(deserializer);
1358
+ var var_done = sse_decode_bool(deserializer);
1359
+ var var_finishReason = sse_decode_opt_String(deserializer);
1360
+ return StreamChunk(
1361
+ delta: var_delta, done: var_done, finishReason: var_finishReason);
1362
+ }
1363
+
1364
+ @protected
1365
+ BigInt sse_decode_u_64(SseDeserializer deserializer) {
1366
+ // Codec=Sse (Serialization based), see doc to use other codecs
1367
+ return deserializer.buffer.getBigUint64();
1368
+ }
1369
+
1370
+ @protected
1371
+ int sse_decode_u_8(SseDeserializer deserializer) {
1372
+ // Codec=Sse (Serialization based), see doc to use other codecs
1373
+ return deserializer.buffer.getUint8();
1374
+ }
1375
+
1376
+ @protected
1377
+ void sse_decode_unit(SseDeserializer deserializer) {
1378
+ // Codec=Sse (Serialization based), see doc to use other codecs
1379
+ }
1380
+
1381
+ @protected
1382
+ BigInt sse_decode_usize(SseDeserializer deserializer) {
1383
+ // Codec=Sse (Serialization based), see doc to use other codecs
1384
+ return deserializer.buffer.getBigUint64();
1385
+ }
1386
+
1387
+ @protected
1388
+ void sse_encode_AnyhowException(
1389
+ AnyhowException self, SseSerializer serializer) {
1390
+ // Codec=Sse (Serialization based), see doc to use other codecs
1391
+ sse_encode_String(self.message, serializer);
1392
+ }
1393
+
1394
+ @protected
1395
+ void
1396
+ sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
1397
+ OndeChatEngine self, SseSerializer serializer) {
1398
+ // Codec=Sse (Serialization based), see doc to use other codecs
1399
+ sse_encode_usize(
1400
+ (self as OndeChatEngineImpl).frbInternalSseEncode(move: true),
1401
+ serializer);
1402
+ }
1403
+
1404
+ @protected
1405
+ void
1406
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
1407
+ OndeChatEngine self, SseSerializer serializer) {
1408
+ // Codec=Sse (Serialization based), see doc to use other codecs
1409
+ sse_encode_usize(
1410
+ (self as OndeChatEngineImpl).frbInternalSseEncode(move: false),
1411
+ serializer);
1412
+ }
1413
+
1414
+ @protected
1415
+ void
1416
+ sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
1417
+ OndeChatEngine self, SseSerializer serializer) {
1418
+ // Codec=Sse (Serialization based), see doc to use other codecs
1419
+ sse_encode_usize(
1420
+ (self as OndeChatEngineImpl).frbInternalSseEncode(move: null),
1421
+ serializer);
1422
+ }
1423
+
1424
+ @protected
1425
+ void sse_encode_StreamSink_stream_chunk_Sse(
1426
+ RustStreamSink<StreamChunk> self, SseSerializer serializer) {
1427
+ // Codec=Sse (Serialization based), see doc to use other codecs
1428
+ sse_encode_String(
1429
+ self.setupAndSerialize(
1430
+ codec: SseCodec(
1431
+ decodeSuccessData: sse_decode_stream_chunk,
1432
+ decodeErrorData: sse_decode_AnyhowException,
1433
+ )),
1434
+ serializer);
1435
+ }
1436
+
1437
+ @protected
1438
+ void sse_encode_String(String self, SseSerializer serializer) {
1439
+ // Codec=Sse (Serialization based), see doc to use other codecs
1440
+ sse_encode_list_prim_u_8_strict(utf8.encoder.convert(self), serializer);
1441
+ }
1442
+
1443
+ @protected
1444
+ void sse_encode_bool(bool self, SseSerializer serializer) {
1445
+ // Codec=Sse (Serialization based), see doc to use other codecs
1446
+ serializer.buffer.putUint8(self ? 1 : 0);
1447
+ }
1448
+
1449
+ @protected
1450
+ void sse_encode_box_autoadd_chat_message(
1451
+ ChatMessage self, SseSerializer serializer) {
1452
+ // Codec=Sse (Serialization based), see doc to use other codecs
1453
+ sse_encode_chat_message(self, serializer);
1454
+ }
1455
+
1456
+ @protected
1457
+ void sse_encode_box_autoadd_f_32(double self, SseSerializer serializer) {
1458
+ // Codec=Sse (Serialization based), see doc to use other codecs
1459
+ sse_encode_f_32(self, serializer);
1460
+ }
1461
+
1462
+ @protected
1463
+ void sse_encode_box_autoadd_f_64(double self, SseSerializer serializer) {
1464
+ // Codec=Sse (Serialization based), see doc to use other codecs
1465
+ sse_encode_f_64(self, serializer);
1466
+ }
1467
+
1468
+ @protected
1469
+ void sse_encode_box_autoadd_gguf_model_config(
1470
+ GgufModelConfig self, SseSerializer serializer) {
1471
+ // Codec=Sse (Serialization based), see doc to use other codecs
1472
+ sse_encode_gguf_model_config(self, serializer);
1473
+ }
1474
+
1475
+ @protected
1476
+ void sse_encode_box_autoadd_sampling_config(
1477
+ SamplingConfig self, SseSerializer serializer) {
1478
+ // Codec=Sse (Serialization based), see doc to use other codecs
1479
+ sse_encode_sampling_config(self, serializer);
1480
+ }
1481
+
1482
+ @protected
1483
+ void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer) {
1484
+ // Codec=Sse (Serialization based), see doc to use other codecs
1485
+ sse_encode_u_64(self, serializer);
1486
+ }
1487
+
1488
+ @protected
1489
+ void sse_encode_chat_message(ChatMessage self, SseSerializer serializer) {
1490
+ // Codec=Sse (Serialization based), see doc to use other codecs
1491
+ sse_encode_chat_role(self.role, serializer);
1492
+ sse_encode_String(self.content, serializer);
1493
+ }
1494
+
1495
+ @protected
1496
+ void sse_encode_chat_role(ChatRole self, SseSerializer serializer) {
1497
+ // Codec=Sse (Serialization based), see doc to use other codecs
1498
+ sse_encode_i_32(self.index, serializer);
1499
+ }
1500
+
1501
+ @protected
1502
+ void sse_encode_engine_info(EngineInfo self, SseSerializer serializer) {
1503
+ // Codec=Sse (Serialization based), see doc to use other codecs
1504
+ sse_encode_engine_status(self.status, serializer);
1505
+ sse_encode_opt_String(self.modelName, serializer);
1506
+ sse_encode_opt_String(self.approxMemory, serializer);
1507
+ sse_encode_u_64(self.historyLength, serializer);
1508
+ }
1509
+
1510
+ @protected
1511
+ void sse_encode_engine_status(EngineStatus self, SseSerializer serializer) {
1512
+ // Codec=Sse (Serialization based), see doc to use other codecs
1513
+ sse_encode_i_32(self.index, serializer);
1514
+ }
1515
+
1516
+ @protected
1517
+ void sse_encode_f_32(double self, SseSerializer serializer) {
1518
+ // Codec=Sse (Serialization based), see doc to use other codecs
1519
+ serializer.buffer.putFloat32(self);
1520
+ }
1521
+
1522
+ @protected
1523
+ void sse_encode_f_64(double self, SseSerializer serializer) {
1524
+ // Codec=Sse (Serialization based), see doc to use other codecs
1525
+ serializer.buffer.putFloat64(self);
1526
+ }
1527
+
1528
+ @protected
1529
+ void sse_encode_gguf_model_config(
1530
+ GgufModelConfig self, SseSerializer serializer) {
1531
+ // Codec=Sse (Serialization based), see doc to use other codecs
1532
+ sse_encode_String(self.modelId, serializer);
1533
+ sse_encode_list_String(self.files, serializer);
1534
+ sse_encode_opt_String(self.tokModelId, serializer);
1535
+ sse_encode_String(self.displayName, serializer);
1536
+ sse_encode_String(self.approxMemory, serializer);
1537
+ }
1538
+
1539
+ @protected
1540
+ void sse_encode_i_32(int self, SseSerializer serializer) {
1541
+ // Codec=Sse (Serialization based), see doc to use other codecs
1542
+ serializer.buffer.putInt32(self);
1543
+ }
1544
+
1545
+ @protected
1546
+ void sse_encode_inference_result(
1547
+ InferenceResult self, SseSerializer serializer) {
1548
+ // Codec=Sse (Serialization based), see doc to use other codecs
1549
+ sse_encode_String(self.text, serializer);
1550
+ sse_encode_f_64(self.durationSecs, serializer);
1551
+ sse_encode_String(self.durationDisplay, serializer);
1552
+ sse_encode_String(self.finishReason, serializer);
1553
+ }
1554
+
1555
+ @protected
1556
+ void sse_encode_list_String(List<String> self, SseSerializer serializer) {
1557
+ // Codec=Sse (Serialization based), see doc to use other codecs
1558
+ sse_encode_i_32(self.length, serializer);
1559
+ for (final item in self) {
1560
+ sse_encode_String(item, serializer);
1561
+ }
1562
+ }
1563
+
1564
+ @protected
1565
+ void sse_encode_list_chat_message(
1566
+ List<ChatMessage> self, SseSerializer serializer) {
1567
+ // Codec=Sse (Serialization based), see doc to use other codecs
1568
+ sse_encode_i_32(self.length, serializer);
1569
+ for (final item in self) {
1570
+ sse_encode_chat_message(item, serializer);
1571
+ }
1572
+ }
1573
+
1574
+ @protected
1575
+ void sse_encode_list_prim_u_8_strict(
1576
+ Uint8List self, SseSerializer serializer) {
1577
+ // Codec=Sse (Serialization based), see doc to use other codecs
1578
+ sse_encode_i_32(self.length, serializer);
1579
+ serializer.buffer.putUint8List(self);
1580
+ }
1581
+
1582
+ @protected
1583
+ void sse_encode_onde_error(OndeError self, SseSerializer serializer) {
1584
+ // Codec=Sse (Serialization based), see doc to use other codecs
1585
+ switch (self) {
1586
+ case OndeError_NoModelLoaded():
1587
+ sse_encode_i_32(0, serializer);
1588
+ case OndeError_AlreadyLoaded(modelName: final modelName):
1589
+ sse_encode_i_32(1, serializer);
1590
+ sse_encode_String(modelName, serializer);
1591
+ case OndeError_ModelBuild(reason: final reason):
1592
+ sse_encode_i_32(2, serializer);
1593
+ sse_encode_String(reason, serializer);
1594
+ case OndeError_Inference(reason: final reason):
1595
+ sse_encode_i_32(3, serializer);
1596
+ sse_encode_String(reason, serializer);
1597
+ case OndeError_Cancelled():
1598
+ sse_encode_i_32(4, serializer);
1599
+ case OndeError_Other(reason: final reason):
1600
+ sse_encode_i_32(5, serializer);
1601
+ sse_encode_String(reason, serializer);
1602
+ }
1603
+ }
1604
+
1605
+ @protected
1606
+ void sse_encode_opt_String(String? self, SseSerializer serializer) {
1607
+ // Codec=Sse (Serialization based), see doc to use other codecs
1608
+
1609
+ sse_encode_bool(self != null, serializer);
1610
+ if (self != null) {
1611
+ sse_encode_String(self, serializer);
1612
+ }
1613
+ }
1614
+
1615
+ @protected
1616
+ void sse_encode_opt_box_autoadd_f_32(double? self, SseSerializer serializer) {
1617
+ // Codec=Sse (Serialization based), see doc to use other codecs
1618
+
1619
+ sse_encode_bool(self != null, serializer);
1620
+ if (self != null) {
1621
+ sse_encode_box_autoadd_f_32(self, serializer);
1622
+ }
1623
+ }
1624
+
1625
+ @protected
1626
+ void sse_encode_opt_box_autoadd_f_64(double? self, SseSerializer serializer) {
1627
+ // Codec=Sse (Serialization based), see doc to use other codecs
1628
+
1629
+ sse_encode_bool(self != null, serializer);
1630
+ if (self != null) {
1631
+ sse_encode_box_autoadd_f_64(self, serializer);
1632
+ }
1633
+ }
1634
+
1635
+ @protected
1636
+ void sse_encode_opt_box_autoadd_sampling_config(
1637
+ SamplingConfig? self, SseSerializer serializer) {
1638
+ // Codec=Sse (Serialization based), see doc to use other codecs
1639
+
1640
+ sse_encode_bool(self != null, serializer);
1641
+ if (self != null) {
1642
+ sse_encode_box_autoadd_sampling_config(self, serializer);
1643
+ }
1644
+ }
1645
+
1646
+ @protected
1647
+ void sse_encode_opt_box_autoadd_u_64(BigInt? self, SseSerializer serializer) {
1648
+ // Codec=Sse (Serialization based), see doc to use other codecs
1649
+
1650
+ sse_encode_bool(self != null, serializer);
1651
+ if (self != null) {
1652
+ sse_encode_box_autoadd_u_64(self, serializer);
1653
+ }
1654
+ }
1655
+
1656
+ @protected
1657
+ void sse_encode_sampling_config(
1658
+ SamplingConfig self, SseSerializer serializer) {
1659
+ // Codec=Sse (Serialization based), see doc to use other codecs
1660
+ sse_encode_opt_box_autoadd_f_64(self.temperature, serializer);
1661
+ sse_encode_opt_box_autoadd_f_64(self.topP, serializer);
1662
+ sse_encode_opt_box_autoadd_u_64(self.topK, serializer);
1663
+ sse_encode_opt_box_autoadd_f_64(self.minP, serializer);
1664
+ sse_encode_opt_box_autoadd_u_64(self.maxTokens, serializer);
1665
+ sse_encode_opt_box_autoadd_f_32(self.frequencyPenalty, serializer);
1666
+ sse_encode_opt_box_autoadd_f_32(self.presencePenalty, serializer);
1667
+ }
1668
+
1669
+ @protected
1670
+ void sse_encode_stream_chunk(StreamChunk self, SseSerializer serializer) {
1671
+ // Codec=Sse (Serialization based), see doc to use other codecs
1672
+ sse_encode_String(self.delta, serializer);
1673
+ sse_encode_bool(self.done, serializer);
1674
+ sse_encode_opt_String(self.finishReason, serializer);
1675
+ }
1676
+
1677
+ @protected
1678
+ void sse_encode_u_64(BigInt self, SseSerializer serializer) {
1679
+ // Codec=Sse (Serialization based), see doc to use other codecs
1680
+ serializer.buffer.putBigUint64(self);
1681
+ }
1682
+
1683
+ @protected
1684
+ void sse_encode_u_8(int self, SseSerializer serializer) {
1685
+ // Codec=Sse (Serialization based), see doc to use other codecs
1686
+ serializer.buffer.putUint8(self);
1687
+ }
1688
+
1689
+ @protected
1690
+ void sse_encode_unit(void self, SseSerializer serializer) {
1691
+ // Codec=Sse (Serialization based), see doc to use other codecs
1692
+ }
1693
+
1694
+ @protected
1695
+ void sse_encode_usize(BigInt self, SseSerializer serializer) {
1696
+ // Codec=Sse (Serialization based), see doc to use other codecs
1697
+ serializer.buffer.putBigUint64(self);
1698
+ }
1699
+}
1700
+
1701
+@sealed
1702
+class OndeChatEngineImpl extends RustOpaque implements OndeChatEngine {
1703
+ // Not to be used by end users
1704
+ OndeChatEngineImpl.frbInternalDcoDecode(List<dynamic> wire)
1705
+ : super.frbInternalDcoDecode(wire, _kStaticData);
1706
+
1707
+ // Not to be used by end users
1708
+ OndeChatEngineImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative)
1709
+ : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);
1710
+
1711
+ static final _kStaticData = RustArcStaticData(
1712
+ rustArcIncrementStrongCount:
1713
+ RustLib.instance.api.rust_arc_increment_strong_count_OndeChatEngine,
1714
+ rustArcDecrementStrongCount:
1715
+ RustLib.instance.api.rust_arc_decrement_strong_count_OndeChatEngine,
1716
+ rustArcDecrementStrongCountPtr:
1717
+ RustLib.instance.api.rust_arc_decrement_strong_count_OndeChatEnginePtr,
1718
+ );
1719
+
1720
+ /// Clear the conversation history while keeping the model loaded.
1721
+ ///
1722
+ /// Returns the number of turns that were removed.
1723
+ Future<BigInt> clearHistory() =>
1724
+ RustLib.instance.api.crateApiOndeChatEngineClearHistory(
1725
+ that: this,
1726
+ );
1727
+
1728
+ /// Clear the current system prompt.
1729
+ Future<void> clearSystemPrompt() =>
1730
+ RustLib.instance.api.crateApiOndeChatEngineClearSystemPrompt(
1731
+ that: this,
1732
+ );
1733
+
1734
+ /// One-shot generation from an explicit message list.
1735
+ ///
1736
+ /// Does **not** modify the conversation history.
1737
+ Future<InferenceResult> generate(
1738
+ {required List<ChatMessage> messages, SamplingConfig? sampling}) =>
1739
+ RustLib.instance.api.crateApiOndeChatEngineGenerate(
1740
+ that: this, messages: messages, sampling: sampling);
1741
+
1742
+ /// Returns a clone of the full conversation history.
1743
+ Future<List<ChatMessage>> history() =>
1744
+ RustLib.instance.api.crateApiOndeChatEngineHistory(
1745
+ that: this,
1746
+ );
1747
+
1748
+ /// Returns a point-in-time snapshot of the engine's state.
1749
+ Future<EngineInfo> info() => RustLib.instance.api.crateApiOndeChatEngineInfo(
1750
+ that: this,
1751
+ );
1752
+
1753
+ /// Returns `true` if a model is currently loaded and ready.
1754
+ Future<bool> isLoaded() =>
1755
+ RustLib.instance.api.crateApiOndeChatEngineIsLoaded(
1756
+ that: this,
1757
+ );
1758
+
1759
+ /// Load a GGUF model into the engine.
1760
+ ///
1761
+ /// Returns the load duration in seconds on success.
1762
+ Future<double> loadGgufModel(
1763
+ {required GgufModelConfig config,
1764
+ String? systemPrompt,
1765
+ SamplingConfig? sampling}) =>
1766
+ RustLib.instance.api.crateApiOndeChatEngineLoadGgufModel(
1767
+ that: this,
1768
+ config: config,
1769
+ systemPrompt: systemPrompt,
1770
+ sampling: sampling);
1771
+
1772
+ /// Append a message to history without running inference.
1773
+ ///
1774
+ /// Useful for restoring a saved conversation or injecting context.
1775
+ Future<void> pushHistory({required ChatMessage message}) =>
1776
+ RustLib.instance.api
1777
+ .crateApiOndeChatEnginePushHistory(that: this, message: message);
1778
+
1779
+ /// Send a user message and receive a complete assistant reply.
1780
+ ///
1781
+ /// Both the user message and assistant reply are appended to the
1782
+ /// conversation history on success.
1783
+ Future<InferenceResult> sendMessage({required String message}) =>
1784
+ RustLib.instance.api
1785
+ .crateApiOndeChatEngineSendMessage(that: this, message: message);
1786
+
1787
+ /// Replace the sampling configuration used for all subsequent inference.
1788
+ Future<void> setSampling({required SamplingConfig sampling}) =>
1789
+ RustLib.instance.api
1790
+ .crateApiOndeChatEngineSetSampling(that: this, sampling: sampling);
1791
+
1792
+ /// Set or replace the system prompt.
1793
+ ///
1794
+ /// The prompt is prepended to every inference request and is **not**
1795
+ /// stored in the conversation history.
1796
+ Future<void> setSystemPrompt({required String prompt}) => RustLib.instance.api
1797
+ .crateApiOndeChatEngineSetSystemPrompt(that: this, prompt: prompt);
1798
+
1799
+ /// Stream a reply token-by-token.
1800
+ ///
1801
+ /// Each [`StreamChunk`] carries a `delta` string. The final chunk has
1802
+ /// `done == true`. The `sink` is closed automatically when the stream
1803
+ /// ends or if the receiver is dropped.
1804
+ Stream<StreamChunk> streamMessage({required String message}) =>
1805
+ RustLib.instance.api
1806
+ .crateApiOndeChatEngineStreamMessage(that: this, message: message);
1807
+
1808
+ /// Unload the current model and release its memory.
1809
+ ///
1810
+ /// Returns the display name of the model that was unloaded, or `None`
1811
+ /// if no model was loaded.
1812
+ Future<String?> unloadModel() =>
1813
+ RustLib.instance.api.crateApiOndeChatEngineUnloadModel(
1814
+ that: this,
1815
+ );
1816
+}
sdk/dart/lib/src/frb_generated.dart/frb_generated.io.dart
new
+440
@@ -0,0 +1,440 @@
1
+// This file is automatically generated, so please do not edit it.
2
+// @generated by `flutter_rust_bridge`@ 2.12.0.
3
+
4
+// ignore_for_file: type=lint, unused_import, unnecessary_import
5
+
6
+// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field
7
+
8
+import 'api.dart';
9
+import 'dart:async';
10
+import 'dart:convert';
11
+import 'dart:ffi' as ffi;
12
+import 'frb_generated.dart';
13
+import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart';
14
+
15
+abstract class RustLibApiImplPlatform extends BaseApiImpl<RustLibWire> {
16
+ RustLibApiImplPlatform({
17
+ required super.handler,
18
+ required super.wire,
19
+ required super.generalizedFrbRustBinding,
20
+ required super.portManager,
21
+ });
22
+
23
+ CrossPlatformFinalizerArg
24
+ get rust_arc_decrement_strong_count_OndeChatEnginePtr => wire
25
+ ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEnginePtr;
26
+
27
+ @protected
28
+ AnyhowException dco_decode_AnyhowException(dynamic raw);
29
+
30
+ @protected
31
+ OndeChatEngine
32
+ dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
33
+ dynamic raw);
34
+
35
+ @protected
36
+ OndeChatEngine
37
+ dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
38
+ dynamic raw);
39
+
40
+ @protected
41
+ OndeChatEngine
42
+ dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
43
+ dynamic raw);
44
+
45
+ @protected
46
+ RustStreamSink<StreamChunk> dco_decode_StreamSink_stream_chunk_Sse(
47
+ dynamic raw);
48
+
49
+ @protected
50
+ String dco_decode_String(dynamic raw);
51
+
52
+ @protected
53
+ bool dco_decode_bool(dynamic raw);
54
+
55
+ @protected
56
+ ChatMessage dco_decode_box_autoadd_chat_message(dynamic raw);
57
+
58
+ @protected
59
+ double dco_decode_box_autoadd_f_32(dynamic raw);
60
+
61
+ @protected
62
+ double dco_decode_box_autoadd_f_64(dynamic raw);
63
+
64
+ @protected
65
+ GgufModelConfig dco_decode_box_autoadd_gguf_model_config(dynamic raw);
66
+
67
+ @protected
68
+ SamplingConfig dco_decode_box_autoadd_sampling_config(dynamic raw);
69
+
70
+ @protected
71
+ BigInt dco_decode_box_autoadd_u_64(dynamic raw);
72
+
73
+ @protected
74
+ ChatMessage dco_decode_chat_message(dynamic raw);
75
+
76
+ @protected
77
+ ChatRole dco_decode_chat_role(dynamic raw);
78
+
79
+ @protected
80
+ EngineInfo dco_decode_engine_info(dynamic raw);
81
+
82
+ @protected
83
+ EngineStatus dco_decode_engine_status(dynamic raw);
84
+
85
+ @protected
86
+ double dco_decode_f_32(dynamic raw);
87
+
88
+ @protected
89
+ double dco_decode_f_64(dynamic raw);
90
+
91
+ @protected
92
+ GgufModelConfig dco_decode_gguf_model_config(dynamic raw);
93
+
94
+ @protected
95
+ int dco_decode_i_32(dynamic raw);
96
+
97
+ @protected
98
+ InferenceResult dco_decode_inference_result(dynamic raw);
99
+
100
+ @protected
101
+ List<String> dco_decode_list_String(dynamic raw);
102
+
103
+ @protected
104
+ List<ChatMessage> dco_decode_list_chat_message(dynamic raw);
105
+
106
+ @protected
107
+ Uint8List dco_decode_list_prim_u_8_strict(dynamic raw);
108
+
109
+ @protected
110
+ OndeError dco_decode_onde_error(dynamic raw);
111
+
112
+ @protected
113
+ String? dco_decode_opt_String(dynamic raw);
114
+
115
+ @protected
116
+ double? dco_decode_opt_box_autoadd_f_32(dynamic raw);
117
+
118
+ @protected
119
+ double? dco_decode_opt_box_autoadd_f_64(dynamic raw);
120
+
121
+ @protected
122
+ SamplingConfig? dco_decode_opt_box_autoadd_sampling_config(dynamic raw);
123
+
124
+ @protected
125
+ BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw);
126
+
127
+ @protected
128
+ SamplingConfig dco_decode_sampling_config(dynamic raw);
129
+
130
+ @protected
131
+ StreamChunk dco_decode_stream_chunk(dynamic raw);
132
+
133
+ @protected
134
+ BigInt dco_decode_u_64(dynamic raw);
135
+
136
+ @protected
137
+ int dco_decode_u_8(dynamic raw);
138
+
139
+ @protected
140
+ void dco_decode_unit(dynamic raw);
141
+
142
+ @protected
143
+ BigInt dco_decode_usize(dynamic raw);
144
+
145
+ @protected
146
+ AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer);
147
+
148
+ @protected
149
+ OndeChatEngine
150
+ sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
151
+ SseDeserializer deserializer);
152
+
153
+ @protected
154
+ OndeChatEngine
155
+ sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
156
+ SseDeserializer deserializer);
157
+
158
+ @protected
159
+ OndeChatEngine
160
+ sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
161
+ SseDeserializer deserializer);
162
+
163
+ @protected
164
+ RustStreamSink<StreamChunk> sse_decode_StreamSink_stream_chunk_Sse(
165
+ SseDeserializer deserializer);
166
+
167
+ @protected
168
+ String sse_decode_String(SseDeserializer deserializer);
169
+
170
+ @protected
171
+ bool sse_decode_bool(SseDeserializer deserializer);
172
+
173
+ @protected
174
+ ChatMessage sse_decode_box_autoadd_chat_message(SseDeserializer deserializer);
175
+
176
+ @protected
177
+ double sse_decode_box_autoadd_f_32(SseDeserializer deserializer);
178
+
179
+ @protected
180
+ double sse_decode_box_autoadd_f_64(SseDeserializer deserializer);
181
+
182
+ @protected
183
+ GgufModelConfig sse_decode_box_autoadd_gguf_model_config(
184
+ SseDeserializer deserializer);
185
+
186
+ @protected
187
+ SamplingConfig sse_decode_box_autoadd_sampling_config(
188
+ SseDeserializer deserializer);
189
+
190
+ @protected
191
+ BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer);
192
+
193
+ @protected
194
+ ChatMessage sse_decode_chat_message(SseDeserializer deserializer);
195
+
196
+ @protected
197
+ ChatRole sse_decode_chat_role(SseDeserializer deserializer);
198
+
199
+ @protected
200
+ EngineInfo sse_decode_engine_info(SseDeserializer deserializer);
201
+
202
+ @protected
203
+ EngineStatus sse_decode_engine_status(SseDeserializer deserializer);
204
+
205
+ @protected
206
+ double sse_decode_f_32(SseDeserializer deserializer);
207
+
208
+ @protected
209
+ double sse_decode_f_64(SseDeserializer deserializer);
210
+
211
+ @protected
212
+ GgufModelConfig sse_decode_gguf_model_config(SseDeserializer deserializer);
213
+
214
+ @protected
215
+ int sse_decode_i_32(SseDeserializer deserializer);
216
+
217
+ @protected
218
+ InferenceResult sse_decode_inference_result(SseDeserializer deserializer);
219
+
220
+ @protected
221
+ List<String> sse_decode_list_String(SseDeserializer deserializer);
222
+
223
+ @protected
224
+ List<ChatMessage> sse_decode_list_chat_message(SseDeserializer deserializer);
225
+
226
+ @protected
227
+ Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer);
228
+
229
+ @protected
230
+ OndeError sse_decode_onde_error(SseDeserializer deserializer);
231
+
232
+ @protected
233
+ String? sse_decode_opt_String(SseDeserializer deserializer);
234
+
235
+ @protected
236
+ double? sse_decode_opt_box_autoadd_f_32(SseDeserializer deserializer);
237
+
238
+ @protected
239
+ double? sse_decode_opt_box_autoadd_f_64(SseDeserializer deserializer);
240
+
241
+ @protected
242
+ SamplingConfig? sse_decode_opt_box_autoadd_sampling_config(
243
+ SseDeserializer deserializer);
244
+
245
+ @protected
246
+ BigInt? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer);
247
+
248
+ @protected
249
+ SamplingConfig sse_decode_sampling_config(SseDeserializer deserializer);
250
+
251
+ @protected
252
+ StreamChunk sse_decode_stream_chunk(SseDeserializer deserializer);
253
+
254
+ @protected
255
+ BigInt sse_decode_u_64(SseDeserializer deserializer);
256
+
257
+ @protected
258
+ int sse_decode_u_8(SseDeserializer deserializer);
259
+
260
+ @protected
261
+ void sse_decode_unit(SseDeserializer deserializer);
262
+
263
+ @protected
264
+ BigInt sse_decode_usize(SseDeserializer deserializer);
265
+
266
+ @protected
267
+ void sse_encode_AnyhowException(
268
+ AnyhowException self, SseSerializer serializer);
269
+
270
+ @protected
271
+ void
272
+ sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
273
+ OndeChatEngine self, SseSerializer serializer);
274
+
275
+ @protected
276
+ void
277
+ sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
278
+ OndeChatEngine self, SseSerializer serializer);
279
+
280
+ @protected
281
+ void
282
+ sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
283
+ OndeChatEngine self, SseSerializer serializer);
284
+
285
+ @protected
286
+ void sse_encode_StreamSink_stream_chunk_Sse(
287
+ RustStreamSink<StreamChunk> self, SseSerializer serializer);
288
+
289
+ @protected
290
+ void sse_encode_String(String self, SseSerializer serializer);
291
+
292
+ @protected
293
+ void sse_encode_bool(bool self, SseSerializer serializer);
294
+
295
+ @protected
296
+ void sse_encode_box_autoadd_chat_message(
297
+ ChatMessage self, SseSerializer serializer);
298
+
299
+ @protected
300
+ void sse_encode_box_autoadd_f_32(double self, SseSerializer serializer);
301
+
302
+ @protected
303
+ void sse_encode_box_autoadd_f_64(double self, SseSerializer serializer);
304
+
305
+ @protected
306
+ void sse_encode_box_autoadd_gguf_model_config(
307
+ GgufModelConfig self, SseSerializer serializer);
308
+
309
+ @protected
310
+ void sse_encode_box_autoadd_sampling_config(
311
+ SamplingConfig self, SseSerializer serializer);
312
+
313
+ @protected
314
+ void sse_encode_box_autoadd_u_64(BigInt self, SseSerializer serializer);
315
+
316
+ @protected
317
+ void sse_encode_chat_message(ChatMessage self, SseSerializer serializer);
318
+
319
+ @protected
320
+ void sse_encode_chat_role(ChatRole self, SseSerializer serializer);
321
+
322
+ @protected
323
+ void sse_encode_engine_info(EngineInfo self, SseSerializer serializer);
324
+
325
+ @protected
326
+ void sse_encode_engine_status(EngineStatus self, SseSerializer serializer);
327
+
328
+ @protected
329
+ void sse_encode_f_32(double self, SseSerializer serializer);
330
+
331
+ @protected
332
+ void sse_encode_f_64(double self, SseSerializer serializer);
333
+
334
+ @protected
335
+ void sse_encode_gguf_model_config(
336
+ GgufModelConfig self, SseSerializer serializer);
337
+
338
+ @protected
339
+ void sse_encode_i_32(int self, SseSerializer serializer);
340
+
341
+ @protected
342
+ void sse_encode_inference_result(
343
+ InferenceResult self, SseSerializer serializer);
344
+
345
+ @protected
346
+ void sse_encode_list_String(List<String> self, SseSerializer serializer);
347
+
348
+ @protected
349
+ void sse_encode_list_chat_message(
350
+ List<ChatMessage> self, SseSerializer serializer);
351
+
352
+ @protected
353
+ void sse_encode_list_prim_u_8_strict(
354
+ Uint8List self, SseSerializer serializer);
355
+
356
+ @protected
357
+ void sse_encode_onde_error(OndeError self, SseSerializer serializer);
358
+
359
+ @protected
360
+ void sse_encode_opt_String(String? self, SseSerializer serializer);
361
+
362
+ @protected
363
+ void sse_encode_opt_box_autoadd_f_32(double? self, SseSerializer serializer);
364
+
365
+ @protected
366
+ void sse_encode_opt_box_autoadd_f_64(double? self, SseSerializer serializer);
367
+
368
+ @protected
369
+ void sse_encode_opt_box_autoadd_sampling_config(
370
+ SamplingConfig? self, SseSerializer serializer);
371
+
372
+ @protected
373
+ void sse_encode_opt_box_autoadd_u_64(BigInt? self, SseSerializer serializer);
374
+
375
+ @protected
376
+ void sse_encode_sampling_config(
377
+ SamplingConfig self, SseSerializer serializer);
378
+
379
+ @protected
380
+ void sse_encode_stream_chunk(StreamChunk self, SseSerializer serializer);
381
+
382
+ @protected
383
+ void sse_encode_u_64(BigInt self, SseSerializer serializer);
384
+
385
+ @protected
386
+ void sse_encode_u_8(int self, SseSerializer serializer);
387
+
388
+ @protected
389
+ void sse_encode_unit(void self, SseSerializer serializer);
390
+
391
+ @protected
392
+ void sse_encode_usize(BigInt self, SseSerializer serializer);
393
+}
394
+
395
+// Section: wire_class
396
+
397
+class RustLibWire implements BaseWire {
398
+ factory RustLibWire.fromExternalLibrary(ExternalLibrary lib) =>
399
+ RustLibWire(lib.ffiDynamicLibrary);
400
+
401
+ /// Holds the symbol lookup function.
402
+ final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
403
+ _lookup;
404
+
405
+ /// The symbols are looked up in [dynamicLibrary].
406
+ RustLibWire(ffi.DynamicLibrary dynamicLibrary)
407
+ : _lookup = dynamicLibrary.lookup;
408
+
409
+ void
410
+ rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
411
+ ffi.Pointer<ffi.Void> ptr,
412
+ ) {
413
+ return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
414
+ ptr,
415
+ );
416
+ }
417
+
418
+ late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEnginePtr =
419
+ _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
420
+ 'frbgen_onde_inference_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine');
421
+ late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine =
422
+ _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEnginePtr
423
+ .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
424
+
425
+ void
426
+ rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
427
+ ffi.Pointer<ffi.Void> ptr,
428
+ ) {
429
+ return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
430
+ ptr,
431
+ );
432
+ }
433
+
434
+ late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEnginePtr =
435
+ _lookup<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>(
436
+ 'frbgen_onde_inference_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine');
437
+ late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine =
438
+ _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEnginePtr
439
+ .asFunction<void Function(ffi.Pointer<ffi.Void>)>();
440
+}
sdk/dart/lib/src/types.dart
new
+233
@@ -0,0 +1,233 @@
1
+/// Generated and convenience types for the Onde Inference SDK.
2
+///
3
+/// All core data types ([ChatRole], [ChatMessage], [SamplingConfig],
4
+/// [GgufModelConfig], [InferenceResult], [StreamChunk], [EngineStatus],
5
+/// [EngineInfo], [OndeError]) are generated by `flutter_rust_bridge_codegen`
6
+/// and live in `frb_generated.dart/api.dart`. This file re-exports them
7
+/// and adds Dart-idiomatic convenience extensions.
8
+library;
9
+
10
+// Re-export every public type from the FRB-generated API layer.
11
+// After running `flutter_rust_bridge_codegen generate` this file is the
12
+// single import needed by consumers — they never need to reference the
13
+// generated directory directly.
14
+export 'frb_generated.dart/api.dart'
15
+ show
16
+ ChatRole,
17
+ ChatMessage,
18
+ SamplingConfig,
19
+ GgufModelConfig,
20
+ InferenceResult,
21
+ StreamChunk,
22
+ EngineStatus,
23
+ EngineInfo,
24
+ OndeError,
25
+ OndeError_NoModelLoaded,
26
+ OndeError_AlreadyLoaded,
27
+ OndeError_ModelBuild,
28
+ OndeError_Inference,
29
+ OndeError_Cancelled,
30
+ OndeError_Other;
31
+
32
+import 'frb_generated.dart/api.dart';
33
+
34
+// ---------------------------------------------------------------------------
35
+// OndeException
36
+// ---------------------------------------------------------------------------
37
+
38
+/// A Dart [Exception] that wraps an [OndeError] from the Rust engine.
39
+///
40
+/// All inference methods on [OndeChatEngine] throw this instead of letting
41
+/// raw [OndeError] values propagate, keeping the public API consistent with
42
+/// Dart error-handling conventions.
43
+///
44
+/// ```dart
45
+/// try {
46
+/// await engine.sendMessage('Hello!');
47
+/// } on OndeException catch (e) {
48
+/// debugPrint('Inference error: ${e.message}');
49
+/// if (e.error is OndeError_NoModelLoaded) {
50
+/// await engine.loadDefaultModel();
51
+/// }
52
+/// }
53
+/// ```
54
+class OndeException implements Exception {
55
+ /// The underlying structured error from the Rust engine.
56
+ final OndeError error;
57
+
58
+ const OndeException(this.error);
59
+
60
+ /// Human-readable description of the error, forwarded from Rust.
61
+ String get message => error.toString();
62
+
63
+ @override
64
+ String toString() => 'OndeException: $message';
65
+
66
+ @override
67
+ bool operator ==(Object other) =>
68
+ identical(this, other) ||
69
+ other is OndeException &&
70
+ runtimeType == other.runtimeType &&
71
+ error == other.error;
72
+
73
+ @override
74
+ int get hashCode => error.hashCode;
75
+}
76
+
77
+// ---------------------------------------------------------------------------
78
+// ChatMessage — convenience factory extension
79
+// ---------------------------------------------------------------------------
80
+
81
+/// Convenience factory constructors for [ChatMessage].
82
+///
83
+/// ```dart
84
+/// final msg = ChatMessageX.user('Hello!');
85
+/// final sys = ChatMessageX.system('You are a helpful assistant.');
86
+/// ```
87
+extension ChatMessageX on ChatMessage {
88
+ /// Creates a [ChatRole.system] message.
89
+ static ChatMessage system(String content) =>
90
+ ChatMessage(role: ChatRole.system, content: content);
91
+
92
+ /// Creates a [ChatRole.user] message.
93
+ static ChatMessage user(String content) =>
94
+ ChatMessage(role: ChatRole.user, content: content);
95
+
96
+ /// Creates a [ChatRole.assistant] message.
97
+ static ChatMessage assistant(String content) =>
98
+ ChatMessage(role: ChatRole.assistant, content: content);
99
+
100
+ /// Returns an excerpt of [content] for display in logs or debug output.
101
+ String get excerpt {
102
+ const max = 60;
103
+ return content.length > max ? '${content.substring(0, max)}…' : content;
104
+ }
105
+}
106
+
107
+// ---------------------------------------------------------------------------
108
+// SamplingConfig — preset factory extension
109
+// ---------------------------------------------------------------------------
110
+
111
+/// Sampling configuration presets for common use-cases.
112
+///
113
+/// ```dart
114
+/// final s = SamplingConfigX.deterministic();
115
+/// await engine.setSampling(s);
116
+/// ```
117
+extension SamplingConfigX on SamplingConfig {
118
+ /// Balanced creative-chat defaults:
119
+ /// `temperature=0.7`, `topP=0.95`, `maxTokens=512`.
120
+ static SamplingConfig defaultConfig() => SamplingConfig(
121
+ temperature: 0.7,
122
+ topP: 0.95,
123
+ topK: null,
124
+ minP: null,
125
+ maxTokens: BigInt.from(512),
126
+ frequencyPenalty: null,
127
+ presencePenalty: null,
128
+ );
129
+
130
+ /// Greedy / fully deterministic decoding:
131
+ /// `temperature=0.0`, `maxTokens=512`.
132
+ ///
133
+ /// Use for coding, fact-retrieval, or any task where reproducibility
134
+ /// matters.
135
+ static SamplingConfig deterministic() => SamplingConfig(
136
+ temperature: 0.0,
137
+ topP: null,
138
+ topK: null,
139
+ minP: null,
140
+ maxTokens: BigInt.from(512),
141
+ frequencyPenalty: null,
142
+ presencePenalty: null,
143
+ );
144
+
145
+ /// Low-latency preset for memory-constrained mobile devices:
146
+ /// `temperature=0.7`, `topP=0.95`, `maxTokens=128`.
147
+ static SamplingConfig mobile() => SamplingConfig(
148
+ temperature: 0.7,
149
+ topP: 0.95,
150
+ topK: null,
151
+ minP: null,
152
+ maxTokens: BigInt.from(128),
153
+ frequencyPenalty: null,
154
+ presencePenalty: null,
155
+ );
156
+
157
+ /// Returns a copy of this config with the given fields replaced.
158
+ SamplingConfig copyWith({
159
+ double? temperature,
160
+ double? topP,
161
+ BigInt? topK,
162
+ double? minP,
163
+ BigInt? maxTokens,
164
+ double? frequencyPenalty,
165
+ double? presencePenalty,
166
+ }) =>
167
+ SamplingConfig(
168
+ temperature: temperature ?? this.temperature,
169
+ topP: topP ?? this.topP,
170
+ topK: topK ?? this.topK,
171
+ minP: minP ?? this.minP,
172
+ maxTokens: maxTokens ?? this.maxTokens,
173
+ frequencyPenalty: frequencyPenalty ?? this.frequencyPenalty,
174
+ presencePenalty: presencePenalty ?? this.presencePenalty,
175
+ );
176
+}
177
+
178
+// ---------------------------------------------------------------------------
179
+// EngineStatus — convenience extension
180
+// ---------------------------------------------------------------------------
181
+
182
+/// Convenience helpers on [EngineStatus].
183
+extension EngineStatusX on EngineStatus {
184
+ /// Returns `true` when the engine is idle and ready to accept requests.
185
+ bool get isReady => this == EngineStatus.ready;
186
+
187
+ /// Returns `true` when the engine is either loading or generating.
188
+ bool get isBusy =>
189
+ this == EngineStatus.loading || this == EngineStatus.generating;
190
+
191
+ /// Returns `true` when no model is loaded.
192
+ bool get isUnloaded => this == EngineStatus.unloaded;
193
+
194
+ /// Returns `true` when the engine is in an unrecoverable error state.
195
+ bool get isError => this == EngineStatus.error;
196
+
197
+ /// A short human-readable label for display in UIs.
198
+ String get label => switch (this) {
199
+ EngineStatus.unloaded => 'Unloaded',
200
+ EngineStatus.loading => 'Loading…',
201
+ EngineStatus.ready => 'Ready',
202
+ EngineStatus.generating => 'Generating…',
203
+ EngineStatus.error => 'Error',
204
+ };
205
+}
206
+
207
+// ---------------------------------------------------------------------------
208
+// EngineInfo — convenience extension
209
+// ---------------------------------------------------------------------------
210
+
211
+/// Convenience helpers on [EngineInfo].
212
+extension EngineInfoX on EngineInfo {
213
+ /// Conversation turn count as a plain [int] (downcast from [BigInt]).
214
+ ///
215
+ /// Safe because history length never exceeds [int] bounds in practice.
216
+ int get historyLengthInt => historyLength.toInt();
217
+
218
+ /// Returns `true` when the engine holds at least one conversation turn.
219
+ bool get hasHistory => historyLength > BigInt.zero;
220
+}
221
+
222
+// ---------------------------------------------------------------------------
223
+// InferenceResult — convenience extension
224
+// ---------------------------------------------------------------------------
225
+
226
+/// Convenience helpers on [InferenceResult].
227
+extension InferenceResultX on InferenceResult {
228
+ /// Returns `true` if generation stopped naturally (finish reason is "stop").
229
+ bool get stoppedNaturally => finishReason == 'stop';
230
+
231
+ /// Returns `true` if generation was truncated by the `maxTokens` limit.
232
+ bool get truncated => finishReason == 'length';
233
+}
sdk/dart/linux/CMakeLists.txt
new
+54
@@ -0,0 +1,54 @@
1
+cmake_minimum_required(VERSION 3.14)
2
+project(onde_inference LANGUAGES CXX)
3
+
4
+set(PLUGIN_NAME "onde_inference_plugin")
5
+set(RUST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../rust")
6
+
7
+# -- Rust build step ----------------------------------------------------------
8
+set(RUST_LIB_OUTPUT "${RUST_DIR}/target/release/libonde_inference_dart.so")
9
+
10
+add_custom_command(
11
+ OUTPUT "${RUST_LIB_OUTPUT}"
12
+ COMMAND cargo build
13
+ --release
14
+ --manifest-path "${RUST_DIR}/Cargo.toml"
15
+ WORKING_DIRECTORY "${RUST_DIR}"
16
+ COMMENT "Building onde_inference_dart Rust bridge for Linux..."
17
+ VERBATIM
18
+)
19
+
20
+add_custom_target(onde_inference_rust_build ALL
21
+ DEPENDS "${RUST_LIB_OUTPUT}"
22
+)
23
+
24
+# -- Flutter plugin stub ------------------------------------------------------
25
+add_library(${PLUGIN_NAME} SHARED
26
+ "onde_inference_plugin.cc"
27
+)
28
+
29
+apply_standard_settings(${PLUGIN_NAME})
30
+
31
+set_target_properties(${PLUGIN_NAME} PROPERTIES
32
+ CXX_VISIBILITY_PRESET hidden
33
+)
34
+
35
+target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL)
36
+
37
+target_include_directories(${PLUGIN_NAME} INTERFACE
38
+ "${CMAKE_CURRENT_SOURCE_DIR}/include"
39
+)
40
+
41
+target_link_libraries(${PLUGIN_NAME} PRIVATE flutter)
42
+target_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::GTK)
43
+
44
+add_dependencies(${PLUGIN_NAME} onde_inference_rust_build)
45
+
46
+# -- Installation -------------------------------------------------------------
47
+install(FILES "${RUST_LIB_OUTPUT}"
48
+ DESTINATION "${CMAKE_INSTALL_PREFIX}"
49
+)
50
+
51
+set(onde_inference_plugin_bundled_libraries
52
+ "${RUST_LIB_OUTPUT}"
53
+ PARENT_SCOPE
54
+)
sdk/dart/linux/include/onde_inference/onde_inference_plugin.h
new
+24
@@ -0,0 +1,24 @@
1
+#ifndef FLUTTER_PLUGIN_ONDE_INFERENCE_PLUGIN_H_
2
+#define FLUTTER_PLUGIN_ONDE_INFERENCE_PLUGIN_H_
3
+
4
+#include <flutter_linux/flutter_linux.h>
5
+
6
+G_BEGIN_DECLS
7
+
8
+#ifdef FLUTTER_PLUGIN_IMPL
9
+#define FLUTTER_PLUGIN_EXPORT __attribute__((visibility("default")))
10
+#else
11
+#define FLUTTER_PLUGIN_EXPORT
12
+#endif
13
+
14
+typedef struct _OndeInferencePlugin OndeInferencePlugin;
15
+typedef struct _OndeInferencePluginClass OndeInferencePluginClass;
16
+
17
+FLUTTER_PLUGIN_EXPORT GType onde_inference_plugin_get_type();
18
+
19
+FLUTTER_PLUGIN_EXPORT void onde_inference_plugin_register_with_registrar(
20
+ FlPluginRegistrar* registrar);
21
+
22
+G_END_DECLS
23
+
24
+#endif // FLUTTER_PLUGIN_ONDE_INFERENCE_PLUGIN_H_
\ No newline at end of file
sdk/dart/linux/onde_inference_plugin.cc
new
+58
@@ -0,0 +1,58 @@
1
+// Copyright 2024 Onde Inference (Splitfire AB). All rights reserved.
2
+// Use of this source code is governed by the MIT license found in LICENSE.
3
+//
4
+// onde_inference_plugin.cc
5
+//
6
+// Minimal Linux Flutter plugin registration entry point for the
7
+// onde_inference package.
8
+//
9
+// All real inference logic lives inside the Rust shared library
10
+// (libonde_inference_dart.so) which is loaded at runtime by the
11
+// flutter_rust_bridge Dart package. This C++ file exists solely to satisfy
12
+// the Flutter tooling's requirement that every Linux plugin provides a
13
+// GObject-based plugin class registered via FlPluginRegistrar.
14
+
15
+#include "include/onde_inference/onde_inference_plugin.h"
16
+
17
+#include <flutter_linux/flutter_linux.h>
18
+#include <gtk/gtk.h>
19
+
20
+#define ONDE_INFERENCE_PLUGIN(obj) \
21
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), onde_inference_plugin_get_type(), \
22
+ OndeInferencePlugin))
23
+
24
+struct _OndeInferencePlugin {
25
+ GObject parent_instance;
26
+};
27
+
28
+G_DEFINE_TYPE(OndeInferencePlugin, onde_inference_plugin, G_TYPE_OBJECT)
29
+
30
+// Called when the plugin object is being finalised.
31
+static void onde_inference_plugin_dispose(GObject* object) {
32
+ G_OBJECT_CLASS(onde_inference_plugin_parent_class)->dispose(object);
33
+}
34
+
35
+// Class initialiser.
36
+static void onde_inference_plugin_class_init(
37
+ OndeInferencePluginClass* klass) {
38
+ G_OBJECT_CLASS(klass)->dispose = onde_inference_plugin_dispose;
39
+}
40
+
41
+// Instance initialiser.
42
+static void onde_inference_plugin_init(OndeInferencePlugin* self) {}
43
+
44
+// ---------------------------------------------------------------------------
45
+// Registration
46
+// ---------------------------------------------------------------------------
47
+
48
+// Called by the Flutter engine when the plugin is registered with a
49
+// FlPluginRegistrar. Because all Flutter ↔ Rust communication is handled
50
+// through the flutter_rust_bridge FFI layer (not through Flutter platform
51
+// channels), no MethodChannel is registered here.
52
+void onde_inference_plugin_register_with_registrar(
53
+ FlPluginRegistrar* registrar) {
54
+ OndeInferencePlugin* plugin = ONDE_INFERENCE_PLUGIN(
55
+ g_object_new(onde_inference_plugin_get_type(), nullptr));
56
+
57
+ g_object_unref(plugin);
58
+}
\ No newline at end of file
sdk/dart/macos/onde_inference.podspec
new
+43
@@ -0,0 +1,43 @@
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.pod_target_xcconfig = {
39
+ 'DEFINES_MODULE' => 'YES',
40
+ 'OTHER_LDFLAGS' => '-force_load ${PODS_TARGET_SRCROOT}/libonde_inference_dart.a',
41
+ }
42
+ s.preserve_paths = '../rust/**/*'
43
+end
sdk/dart/pubspec.yaml
new
+48
@@ -0,0 +1,48 @@
1
+name: onde_inference
2
+description: >-
3
+ On-device LLM inference SDK for Flutter & Dart. Runs Qwen 2.5 models locally
4
+ with Metal (Apple silicon) and CPU acceleration — no cloud, no data leaving
5
+ the device. Powered by the Onde Rust engine and mistral.rs.
6
+version: 0.1.0
7
+repository: https://github.com/ondeinference/onde
8
+homepage: https://ondeinference.com
9
+issue_tracker: https://github.com/ondeinference/onde/issues
10
+
11
+environment:
12
+ sdk: ">=3.3.0 <4.0.0"
13
+ flutter: ">=3.10.0"
14
+
15
+dependencies:
16
+ flutter:
17
+ sdk: flutter
18
+ flutter_rust_bridge: ^2.12.0
19
+ freezed_annotation: ^2.4.4
20
+
21
+dev_dependencies:
22
+ flutter_test:
23
+ sdk: flutter
24
+ flutter_lints: ^5.0.0
25
+ # freezed + build_runner are required by FRB 2.x codegen for union/sealed types.
26
+ # After running `flutter_rust_bridge_codegen generate`, also run:
27
+ # dart run build_runner build --delete-conflicting-outputs
28
+ freezed: ^2.4.0
29
+ build_runner: ^2.4.9
30
+ # NOTE: The FFI code-generator is a Rust binary — NOT a Dart package.
31
+ # Install it once with:
32
+ # cargo install flutter_rust_bridge_codegen
33
+ # Then regenerate the dart:ffi glue from the package root with:
34
+ # flutter_rust_bridge_codegen generate
35
+
36
+flutter:
37
+ plugin:
38
+ platforms:
39
+ android:
40
+ ffiPlugin: true
41
+ ios:
42
+ ffiPlugin: true
43
+ macos:
44
+ ffiPlugin: true
45
+ linux:
46
+ ffiPlugin: true
47
+ windows:
48
+ ffiPlugin: true
sdk/dart/rust/Cargo.lock
new
+7729
@@ -0,0 +1,7729 @@
1
+# This file is automatically @generated by Cargo.
2
+# It is not intended for manual editing.
3
+version = 4
4
+
5
+[[package]]
6
+name = "Inflector"
7
+version = "0.11.4"
8
+source = "registry+https://github.com/rust-lang/crates.io-index"
9
+checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3"
10
+dependencies = [
11
+ "lazy_static",
12
+ "regex",
13
+]
14
+
15
+[[package]]
16
+name = "addr2line"
17
+version = "0.25.1"
18
+source = "registry+https://github.com/rust-lang/crates.io-index"
19
+checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"
20
+dependencies = [
21
+ "gimli",
22
+]
23
+
24
+[[package]]
25
+name = "adler2"
26
+version = "2.0.1"
27
+source = "registry+https://github.com/rust-lang/crates.io-index"
28
+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
29
+
30
+[[package]]
31
+name = "ahash"
32
+version = "0.8.12"
33
+source = "registry+https://github.com/rust-lang/crates.io-index"
34
+checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
35
+dependencies = [
36
+ "cfg-if",
37
+ "getrandom 0.3.4",
38
+ "once_cell",
39
+ "serde",
40
+ "version_check",
41
+ "zerocopy",
42
+]
43
+
44
+[[package]]
45
+name = "aho-corasick"
46
+version = "1.1.4"
47
+source = "registry+https://github.com/rust-lang/crates.io-index"
48
+checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
49
+dependencies = [
50
+ "memchr",
51
+]
52
+
53
+[[package]]
54
+name = "akin"
55
+version = "0.4.0"
56
+source = "registry+https://github.com/rust-lang/crates.io-index"
57
+checksum = "1763692fc1416554cf051efc56a3de5595eca47299d731cc5c2b583adf8b4d2f"
58
+
59
+[[package]]
60
+name = "aligned"
61
+version = "0.4.3"
62
+source = "registry+https://github.com/rust-lang/crates.io-index"
63
+checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685"
64
+dependencies = [
65
+ "as-slice",
66
+]
67
+
68
+[[package]]
69
+name = "aligned-vec"
70
+version = "0.6.4"
71
+source = "registry+https://github.com/rust-lang/crates.io-index"
72
+checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b"
73
+dependencies = [
74
+ "equator",
75
+]
76
+
77
+[[package]]
78
+name = "allo-isolate"
79
+version = "0.1.27"
80
+source = "registry+https://github.com/rust-lang/crates.io-index"
81
+checksum = "449e356a4864c017286dbbec0e12767ea07efba29e3b7d984194c2a7ff3c4550"
82
+dependencies = [
83
+ "anyhow",
84
+ "atomic",
85
+ "backtrace",
86
+]
87
+
88
+[[package]]
89
+name = "allocator-api2"
90
+version = "0.2.21"
91
+source = "registry+https://github.com/rust-lang/crates.io-index"
92
+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
93
+
94
+[[package]]
95
+name = "android_log-sys"
96
+version = "0.3.2"
97
+source = "registry+https://github.com/rust-lang/crates.io-index"
98
+checksum = "84521a3cf562bc62942e294181d9eef17eb38ceb8c68677bc49f144e4c3d4f8d"
99
+
100
+[[package]]
101
+name = "android_logger"
102
+version = "0.15.1"
103
+source = "registry+https://github.com/rust-lang/crates.io-index"
104
+checksum = "dbb4e440d04be07da1f1bf44fb4495ebd58669372fe0cffa6e48595ac5bd88a3"
105
+dependencies = [
106
+ "android_log-sys",
107
+ "env_filter",
108
+ "log",
109
+]
110
+
111
+[[package]]
112
+name = "android_system_properties"
113
+version = "0.1.5"
114
+source = "registry+https://github.com/rust-lang/crates.io-index"
115
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
116
+dependencies = [
117
+ "libc",
118
+]
119
+
120
+[[package]]
121
+name = "annotate-snippets"
122
+version = "0.12.14"
123
+source = "registry+https://github.com/rust-lang/crates.io-index"
124
+checksum = "22b669bf35e50f130e98212b486b0df78d93e285963344e58937692705e1a21a"
125
+dependencies = [
126
+ "anstyle",
127
+ "memchr",
128
+ "unicode-width 0.2.2",
129
+]
130
+
131
+[[package]]
132
+name = "ansi_term"
133
+version = "0.12.1"
134
+source = "registry+https://github.com/rust-lang/crates.io-index"
135
+checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
136
+dependencies = [
137
+ "winapi",
138
+]
139
+
140
+[[package]]
141
+name = "anstream"
142
+version = "1.0.0"
143
+source = "registry+https://github.com/rust-lang/crates.io-index"
144
+checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
145
+dependencies = [
146
+ "anstyle",
147
+ "anstyle-parse",
148
+ "anstyle-query",
149
+ "anstyle-wincon",
150
+ "colorchoice",
151
+ "is_terminal_polyfill",
152
+ "utf8parse",
153
+]
154
+
155
+[[package]]
156
+name = "anstyle"
157
+version = "1.0.14"
158
+source = "registry+https://github.com/rust-lang/crates.io-index"
159
+checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
160
+
161
+[[package]]
162
+name = "anstyle-parse"
163
+version = "1.0.0"
164
+source = "registry+https://github.com/rust-lang/crates.io-index"
165
+checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
166
+dependencies = [
167
+ "utf8parse",
168
+]
169
+
170
+[[package]]
171
+name = "anstyle-query"
172
+version = "1.1.5"
173
+source = "registry+https://github.com/rust-lang/crates.io-index"
174
+checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
175
+dependencies = [
176
+ "windows-sys 0.61.2",
177
+]
178
+
179
+[[package]]
180
+name = "anstyle-wincon"
181
+version = "3.0.11"
182
+source = "registry+https://github.com/rust-lang/crates.io-index"
183
+checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
184
+dependencies = [
185
+ "anstyle",
186
+ "once_cell_polyfill",
187
+ "windows-sys 0.61.2",
188
+]
189
+
190
+[[package]]
191
+name = "anyhow"
192
+version = "1.0.102"
193
+source = "registry+https://github.com/rust-lang/crates.io-index"
194
+checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
195
+
196
+[[package]]
197
+name = "apodize"
198
+version = "1.0.0"
199
+source = "registry+https://github.com/rust-lang/crates.io-index"
200
+checksum = "fca387cdc0a1f9c7a7c26556d584aa2d07fc529843082e4861003cde4ab914ed"
201
+
202
+[[package]]
203
+name = "approx"
204
+version = "0.5.1"
205
+source = "registry+https://github.com/rust-lang/crates.io-index"
206
+checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
207
+dependencies = [
208
+ "num-traits",
209
+]
210
+
211
+[[package]]
212
+name = "arbitrary"
213
+version = "1.4.2"
214
+source = "registry+https://github.com/rust-lang/crates.io-index"
215
+checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"
216
+
217
+[[package]]
218
+name = "arg_enum_proc_macro"
219
+version = "0.3.4"
220
+source = "registry+https://github.com/rust-lang/crates.io-index"
221
+checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
222
+dependencies = [
223
+ "proc-macro2",
224
+ "quote",
225
+ "syn 2.0.117",
226
+]
227
+
228
+[[package]]
229
+name = "arraydeque"
230
+version = "0.5.1"
231
+source = "registry+https://github.com/rust-lang/crates.io-index"
232
+checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236"
233
+
234
+[[package]]
235
+name = "arrayvec"
236
+version = "0.7.6"
237
+source = "registry+https://github.com/rust-lang/crates.io-index"
238
+checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
239
+
240
+[[package]]
241
+name = "as-any"
242
+version = "0.3.2"
243
+source = "registry+https://github.com/rust-lang/crates.io-index"
244
+checksum = "b0f477b951e452a0b6b4a10b53ccd569042d1d01729b519e02074a9c0958a063"
245
+
246
+[[package]]
247
+name = "as-slice"
248
+version = "0.2.1"
249
+source = "registry+https://github.com/rust-lang/crates.io-index"
250
+checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516"
251
+dependencies = [
252
+ "stable_deref_trait",
253
+]
254
+
255
+[[package]]
256
+name = "askama"
257
+version = "0.14.0"
258
+source = "registry+https://github.com/rust-lang/crates.io-index"
259
+checksum = "f75363874b771be265f4ffe307ca705ef6f3baa19011c149da8674a87f1b75c4"
260
+dependencies = [
261
+ "askama_derive",
262
+ "itoa",
263
+ "percent-encoding",
264
+ "serde",
265
+ "serde_json",
266
+]
267
+
268
+[[package]]
269
+name = "askama_derive"
270
+version = "0.14.0"
271
+source = "registry+https://github.com/rust-lang/crates.io-index"
272
+checksum = "129397200fe83088e8a68407a8e2b1f826cf0086b21ccdb866a722c8bcd3a94f"
273
+dependencies = [
274
+ "askama_parser",
275
+ "basic-toml",
276
+ "memchr",
277
+ "proc-macro2",
278
+ "quote",
279
+ "rustc-hash 2.1.2",
280
+ "serde",
281
+ "serde_derive",
282
+ "syn 2.0.117",
283
+]
284
+
285
+[[package]]
286
+name = "askama_parser"
287
+version = "0.14.0"
288
+source = "registry+https://github.com/rust-lang/crates.io-index"
289
+checksum = "d6ab5630b3d5eaf232620167977f95eb51f3432fc76852328774afbd242d4358"
290
+dependencies = [
291
+ "memchr",
292
+ "serde",
293
+ "serde_derive",
294
+ "winnow 0.7.15",
295
+]
296
+
297
+[[package]]
298
+name = "async-compat"
299
+version = "0.2.5"
300
+source = "registry+https://github.com/rust-lang/crates.io-index"
301
+checksum = "a1ba85bc55464dcbf728b56d97e119d673f4cf9062be330a9a26f3acf504a590"
302
+dependencies = [
303
+ "futures-core",
304
+ "futures-io",
305
+ "once_cell",
306
+ "pin-project-lite",
307
+ "tokio",
308
+]
309
+
310
+[[package]]
311
+name = "async-trait"
312
+version = "0.1.89"
313
+source = "registry+https://github.com/rust-lang/crates.io-index"
314
+checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
315
+dependencies = [
316
+ "proc-macro2",
317
+ "quote",
318
+ "syn 2.0.117",
319
+]
320
+
321
+[[package]]
322
+name = "atomic"
323
+version = "0.5.3"
324
+source = "registry+https://github.com/rust-lang/crates.io-index"
325
+checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba"
326
+
327
+[[package]]
328
+name = "atomic-waker"
329
+version = "1.1.2"
330
+source = "registry+https://github.com/rust-lang/crates.io-index"
331
+checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
332
+
333
+[[package]]
334
+name = "atty"
335
+version = "0.2.14"
336
+source = "registry+https://github.com/rust-lang/crates.io-index"
337
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
338
+dependencies = [
339
+ "hermit-abi 0.1.19",
340
+ "libc",
341
+ "winapi",
342
+]
343
+
344
+[[package]]
345
+name = "autocfg"
346
+version = "1.5.0"
347
+source = "registry+https://github.com/rust-lang/crates.io-index"
348
+checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
349
+
350
+[[package]]
351
+name = "av-scenechange"
352
+version = "0.14.1"
353
+source = "registry+https://github.com/rust-lang/crates.io-index"
354
+checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394"
355
+dependencies = [
356
+ "aligned",
357
+ "anyhow",
358
+ "arg_enum_proc_macro",
359
+ "arrayvec",
360
+ "log",
361
+ "num-rational",
362
+ "num-traits",
363
+ "pastey",
364
+ "rayon",
365
+ "thiserror 2.0.18",
366
+ "v_frame",
367
+ "y4m",
368
+]
369
+
370
+[[package]]
371
+name = "av1-grain"
372
+version = "0.2.5"
373
+source = "registry+https://github.com/rust-lang/crates.io-index"
374
+checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8"
375
+dependencies = [
376
+ "anyhow",
377
+ "arrayvec",
378
+ "log",
379
+ "nom 8.0.0",
380
+ "num-rational",
381
+ "v_frame",
382
+]
383
+
384
+[[package]]
385
+name = "avif-serialize"
386
+version = "0.8.8"
387
+source = "registry+https://github.com/rust-lang/crates.io-index"
388
+checksum = "375082f007bd67184fb9c0374614b29f9aaa604ec301635f72338bb65386a53d"
389
+dependencies = [
390
+ "arrayvec",
391
+]
392
+
393
+[[package]]
394
+name = "aws-lc-rs"
395
+version = "1.16.2"
396
+source = "registry+https://github.com/rust-lang/crates.io-index"
397
+checksum = "a054912289d18629dc78375ba2c3726a3afe3ff71b4edba9dedfca0e3446d1fc"
398
+dependencies = [
399
+ "aws-lc-sys",
400
+ "zeroize",
401
+]
402
+
403
+[[package]]
404
+name = "aws-lc-sys"
405
+version = "0.39.1"
406
+source = "registry+https://github.com/rust-lang/crates.io-index"
407
+checksum = "83a25cf98105baa966497416dbd42565ce3a8cf8dbfd59803ec9ad46f3126399"
408
+dependencies = [
409
+ "cc",
410
+ "cmake",
411
+ "dunce",
412
+ "fs_extra",
413
+]
414
+
415
+[[package]]
416
+name = "backtrace"
417
+version = "0.3.76"
418
+source = "registry+https://github.com/rust-lang/crates.io-index"
419
+checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6"
420
+dependencies = [
421
+ "addr2line",
422
+ "cfg-if",
423
+ "libc",
424
+ "miniz_oxide",
425
+ "object",
426
+ "rustc-demangle",
427
+ "windows-link 0.2.1",
428
+]
429
+
430
+[[package]]
431
+name = "base64"
432
+version = "0.13.1"
433
+source = "registry+https://github.com/rust-lang/crates.io-index"
434
+checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
435
+
436
+[[package]]
437
+name = "base64"
438
+version = "0.22.1"
439
+source = "registry+https://github.com/rust-lang/crates.io-index"
440
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
441
+
442
+[[package]]
443
+name = "basic-toml"
444
+version = "0.1.10"
445
+source = "registry+https://github.com/rust-lang/crates.io-index"
446
+checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a"
447
+dependencies = [
448
+ "serde",
449
+]
450
+
451
+[[package]]
452
+name = "bit-set"
453
+version = "0.5.3"
454
+source = "registry+https://github.com/rust-lang/crates.io-index"
455
+checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
456
+dependencies = [
457
+ "bit-vec 0.6.3",
458
+]
459
+
460
+[[package]]
461
+name = "bit-set"
462
+version = "0.8.0"
463
+source = "registry+https://github.com/rust-lang/crates.io-index"
464
+checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
465
+dependencies = [
466
+ "bit-vec 0.8.0",
467
+]
468
+
469
+[[package]]
470
+name = "bit-vec"
471
+version = "0.6.3"
472
+source = "registry+https://github.com/rust-lang/crates.io-index"
473
+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
474
+
475
+[[package]]
476
+name = "bit-vec"
477
+version = "0.8.0"
478
+source = "registry+https://github.com/rust-lang/crates.io-index"
479
+checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
480
+
481
+[[package]]
482
+name = "bit_field"
483
+version = "0.10.3"
484
+source = "registry+https://github.com/rust-lang/crates.io-index"
485
+checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6"
486
+
487
+[[package]]
488
+name = "bitflags"
489
+version = "1.3.2"
490
+source = "registry+https://github.com/rust-lang/crates.io-index"
491
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
492
+
493
+[[package]]
494
+name = "bitflags"
495
+version = "2.11.0"
496
+source = "registry+https://github.com/rust-lang/crates.io-index"
497
+checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
498
+
499
+[[package]]
500
+name = "bitstream-io"
501
+version = "4.9.0"
502
+source = "registry+https://github.com/rust-lang/crates.io-index"
503
+checksum = "60d4bd9d1db2c6bdf285e223a7fa369d5ce98ec767dec949c6ca62863ce61757"
504
+dependencies = [
505
+ "core2",
506
+]
507
+
508
+[[package]]
509
+name = "block"
510
+version = "0.1.6"
511
+source = "registry+https://github.com/rust-lang/crates.io-index"
512
+checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
513
+
514
+[[package]]
515
+name = "block-buffer"
516
+version = "0.10.4"
517
+source = "registry+https://github.com/rust-lang/crates.io-index"
518
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
519
+dependencies = [
520
+ "generic-array",
521
+]
522
+
523
+[[package]]
524
+name = "block2"
525
+version = "0.6.2"
526
+source = "registry+https://github.com/rust-lang/crates.io-index"
527
+checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5"
528
+dependencies = [
529
+ "objc2",
530
+]
531
+
532
+[[package]]
533
+name = "bm25"
534
+version = "2.3.2"
535
+source = "registry+https://github.com/rust-lang/crates.io-index"
536
+checksum = "1cbd8ffdfb7b4c2ff038726178a780a94f90525ed0ad264c0afaa75dd8c18a64"
537
+dependencies = [
538
+ "cached",
539
+ "deunicode",
540
+ "fxhash",
541
+ "rust-stemmers",
542
+ "stop-words",
543
+ "unicode-segmentation",
544
+]
545
+
546
+[[package]]
547
+name = "bstr"
548
+version = "1.12.1"
549
+source = "registry+https://github.com/rust-lang/crates.io-index"
550
+checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab"
551
+dependencies = [
552
+ "memchr",
553
+ "regex-automata",
554
+ "serde",
555
+]
556
+
557
+[[package]]
558
+name = "build-target"
559
+version = "0.4.0"
560
+source = "registry+https://github.com/rust-lang/crates.io-index"
561
+checksum = "832133bbabbbaa9fbdba793456a2827627a7d2b8fb96032fa1e7666d7895832b"
562
+
563
+[[package]]
564
+name = "built"
565
+version = "0.8.0"
566
+source = "registry+https://github.com/rust-lang/crates.io-index"
567
+checksum = "f4ad8f11f288f48ca24471bbd51ac257aaeaaa07adae295591266b792902ae64"
568
+
569
+[[package]]
570
+name = "bumpalo"
571
+version = "3.20.2"
572
+source = "registry+https://github.com/rust-lang/crates.io-index"
573
+checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
574
+
575
+[[package]]
576
+name = "bytemuck"
577
+version = "1.25.0"
578
+source = "registry+https://github.com/rust-lang/crates.io-index"
579
+checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec"
580
+dependencies = [
581
+ "bytemuck_derive",
582
+]
583
+
584
+[[package]]
585
+name = "bytemuck_derive"
586
+version = "1.10.2"
587
+source = "registry+https://github.com/rust-lang/crates.io-index"
588
+checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff"
589
+dependencies = [
590
+ "proc-macro2",
591
+ "quote",
592
+ "syn 2.0.117",
593
+]
594
+
595
+[[package]]
596
+name = "byteorder"
597
+version = "1.5.0"
598
+source = "registry+https://github.com/rust-lang/crates.io-index"
599
+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
600
+
601
+[[package]]
602
+name = "byteorder-lite"
603
+version = "0.1.0"
604
+source = "registry+https://github.com/rust-lang/crates.io-index"
605
+checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
606
+
607
+[[package]]
608
+name = "bytes"
609
+version = "1.11.1"
610
+source = "registry+https://github.com/rust-lang/crates.io-index"
611
+checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
612
+
613
+[[package]]
614
+name = "cached"
615
+version = "0.56.0"
616
+source = "registry+https://github.com/rust-lang/crates.io-index"
617
+checksum = "801927ee168e17809ab8901d9f01f700cd7d8d6a6527997fee44e4b0327a253c"
618
+dependencies = [
619
+ "ahash",
620
+ "cached_proc_macro",
621
+ "cached_proc_macro_types",
622
+ "hashbrown 0.15.5",
623
+ "once_cell",
624
+ "thiserror 2.0.18",
625
+ "web-time",
626
+]
627
+
628
+[[package]]
629
+name = "cached_proc_macro"
630
+version = "0.25.0"
631
+source = "registry+https://github.com/rust-lang/crates.io-index"
632
+checksum = "9225bdcf4e4a9a4c08bf16607908eb2fbf746828d5e0b5e019726dbf6571f201"
633
+dependencies = [
634
+ "darling 0.20.11",
635
+ "proc-macro2",
636
+ "quote",
637
+ "syn 2.0.117",
638
+]
639
+
640
+[[package]]
641
+name = "cached_proc_macro_types"
642
+version = "0.1.1"
643
+source = "registry+https://github.com/rust-lang/crates.io-index"
644
+checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0"
645
+
646
+[[package]]
647
+name = "camino"
648
+version = "1.2.2"
649
+source = "registry+https://github.com/rust-lang/crates.io-index"
650
+checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48"
651
+dependencies = [
652
+ "serde_core",
653
+]
654
+
655
+[[package]]
656
+name = "candle-core"
657
+version = "0.10.2"
658
+source = "registry+https://github.com/rust-lang/crates.io-index"
659
+checksum = "6bd9895436c1ba5dc1037a19935d084b838db066ff4e15ef7dded020b7c12a4a"
660
+dependencies = [
661
+ "byteorder",
662
+ "candle-metal-kernels",
663
+ "candle-ug",
664
+ "float8",
665
+ "gemm 0.19.0",
666
+ "half",
667
+ "libm",
668
+ "memmap2",
669
+ "num-traits",
670
+ "num_cpus",
671
+ "objc2-foundation",
672
+ "objc2-metal",
673
+ "rand 0.9.2",
674
+ "rand_distr 0.5.1",
675
+ "rayon",
676
+ "safetensors 0.7.0",
677
+ "thiserror 2.0.18",
678
+ "tokenizers 0.22.2",
679
+ "yoke 0.8.2",
680
+ "zip",
681
+]
682
+
683
+[[package]]
684
+name = "candle-metal-kernels"
685
+version = "0.10.2"
686
+source = "registry+https://github.com/rust-lang/crates.io-index"
687
+checksum = "4b6b5a4cae6b4e1ab0efcee4dc05272d11b374a3d1ba121b3a961e36be54ab60"
688
+dependencies = [
689
+ "half",
690
+ "objc2",
691
+ "objc2-foundation",
692
+ "objc2-metal",
693
+ "once_cell",
694
+ "thiserror 2.0.18",
695
+ "tracing",
696
+]
697
+
698
+[[package]]
699
+name = "candle-nn"
700
+version = "0.10.2"
701
+source = "registry+https://github.com/rust-lang/crates.io-index"
702
+checksum = "a9317a09d6530b758990ed7f625ac69ff43653bc9ee28b0464644ad1169ada87"
703
+dependencies = [
704
+ "candle-core",
705
+ "candle-metal-kernels",
706
+ "half",
707
+ "libc",
708
+ "num-traits",
709
+ "objc2-metal",
710
+ "rayon",
711
+ "safetensors 0.7.0",
712
+ "serde",
713
+ "thiserror 2.0.18",
714
+]
715
+
716
+[[package]]
717
+name = "candle-ug"
718
+version = "0.10.2"
719
+source = "registry+https://github.com/rust-lang/crates.io-index"
720
+checksum = "ca0fc3167cbc99c8ec1be618cb620aa21dca95038f118c3579a79370e3dc5f77"
721
+dependencies = [
722
+ "ug",
723
+ "ug-metal",
724
+]
725
+
726
+[[package]]
727
+name = "cargo-platform"
728
+version = "0.1.9"
729
+source = "registry+https://github.com/rust-lang/crates.io-index"
730
+checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea"
731
+dependencies = [
732
+ "serde",
733
+]
734
+
735
+[[package]]
736
+name = "cargo_metadata"
737
+version = "0.19.2"
738
+source = "registry+https://github.com/rust-lang/crates.io-index"
739
+checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba"
740
+dependencies = [
741
+ "camino",
742
+ "cargo-platform",
743
+ "semver",
744
+ "serde",
745
+ "serde_json",
746
+ "thiserror 2.0.18",
747
+]
748
+
749
+[[package]]
750
+name = "castaway"
751
+version = "0.2.4"
752
+source = "registry+https://github.com/rust-lang/crates.io-index"
753
+checksum = "dec551ab6e7578819132c713a93c022a05d60159dc86e7a7050223577484c55a"
754
+dependencies = [
755
+ "rustversion",
756
+]
757
+
758
+[[package]]
759
+name = "cc"
760
+version = "1.2.59"
761
+source = "registry+https://github.com/rust-lang/crates.io-index"
762
+checksum = "b7a4d3ec6524d28a329fc53654bbadc9bdd7b0431f5d65f1a56ffb28a1ee5283"
763
+dependencies = [
764
+ "find-msvc-tools",
765
+ "jobserver",
766
+ "libc",
767
+ "shlex",
768
+]
769
+
770
+[[package]]
771
+name = "cesu8"
772
+version = "1.1.0"
773
+source = "registry+https://github.com/rust-lang/crates.io-index"
774
+checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
775
+
776
+[[package]]
777
+name = "cfg-if"
778
+version = "1.0.4"
779
+source = "registry+https://github.com/rust-lang/crates.io-index"
780
+checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
781
+
782
+[[package]]
783
+name = "cfg_aliases"
784
+version = "0.2.1"
785
+source = "registry+https://github.com/rust-lang/crates.io-index"
786
+checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
787
+
788
+[[package]]
789
+name = "cfgrammar"
790
+version = "0.14.1"
791
+source = "registry+https://github.com/rust-lang/crates.io-index"
792
+checksum = "3efdd8f0bddcc9e33f4a664d0f28bc4e51cd5367c16284087a95313104371865"
793
+dependencies = [
794
+ "indexmap 2.13.1",
795
+ "num-traits",
796
+ "proc-macro2",
797
+ "quote",
798
+ "regex",
799
+ "vob",
800
+]
801
+
802
+[[package]]
803
+name = "chrono"
804
+version = "0.4.44"
805
+source = "registry+https://github.com/rust-lang/crates.io-index"
806
+checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0"
807
+dependencies = [
808
+ "iana-time-zone",
809
+ "js-sys",
810
+ "num-traits",
811
+ "serde",
812
+ "wasm-bindgen",
813
+ "windows-link 0.2.1",
814
+]
815
+
816
+[[package]]
817
+name = "clap"
818
+version = "2.34.0"
819
+source = "registry+https://github.com/rust-lang/crates.io-index"
820
+checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
821
+dependencies = [
822
+ "ansi_term",
823
+ "atty",
824
+ "bitflags 1.3.2",
825
+ "strsim 0.8.0",
826
+ "textwrap 0.11.0",
827
+ "unicode-width 0.1.14",
828
+ "vec_map",
829
+]
830
+
831
+[[package]]
832
+name = "clap"
833
+version = "4.6.0"
834
+source = "registry+https://github.com/rust-lang/crates.io-index"
835
+checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351"
836
+dependencies = [
837
+ "clap_builder",
838
+ "clap_derive",
839
+]
840
+
841
+[[package]]
842
+name = "clap_builder"
843
+version = "4.6.0"
844
+source = "registry+https://github.com/rust-lang/crates.io-index"
845
+checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"
846
+dependencies = [
847
+ "anstream",
848
+ "anstyle",
849
+ "clap_lex",
850
+ "strsim 0.11.1",
851
+ "terminal_size",
852
+]
853
+
854
+[[package]]
855
+name = "clap_derive"
856
+version = "4.6.0"
857
+source = "registry+https://github.com/rust-lang/crates.io-index"
858
+checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a"
859
+dependencies = [
860
+ "heck 0.5.0",
861
+ "proc-macro2",
862
+ "quote",
863
+ "syn 2.0.117",
864
+]
865
+
866
+[[package]]
867
+name = "clap_lex"
868
+version = "1.1.0"
869
+source = "registry+https://github.com/rust-lang/crates.io-index"
870
+checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
871
+
872
+[[package]]
873
+name = "cmake"
874
+version = "0.1.58"
875
+source = "registry+https://github.com/rust-lang/crates.io-index"
876
+checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678"
877
+dependencies = [
878
+ "cc",
879
+]
880
+
881
+[[package]]
882
+name = "color_quant"
883
+version = "1.1.0"
884
+source = "registry+https://github.com/rust-lang/crates.io-index"
885
+checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
886
+
887
+[[package]]
888
+name = "colorchoice"
889
+version = "1.0.5"
890
+source = "registry+https://github.com/rust-lang/crates.io-index"
891
+checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
892
+
893
+[[package]]
894
+name = "combine"
895
+version = "4.6.7"
896
+source = "registry+https://github.com/rust-lang/crates.io-index"
897
+checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd"
898
+dependencies = [
899
+ "bytes",
900
+ "memchr",
901
+]
902
+
903
+[[package]]
904
+name = "compact_str"
905
+version = "0.9.0"
906
+source = "registry+https://github.com/rust-lang/crates.io-index"
907
+checksum = "3fdb1325a1cece981e8a296ab8f0f9b63ae357bd0784a9faaf548cc7b480707a"
908
+dependencies = [
909
+ "castaway",
910
+ "cfg-if",
911
+ "itoa",
912
+ "rustversion",
913
+ "ryu",
914
+ "serde",
915
+ "static_assertions",
916
+]
917
+
918
+[[package]]
919
+name = "console"
920
+version = "0.15.11"
921
+source = "registry+https://github.com/rust-lang/crates.io-index"
922
+checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8"
923
+dependencies = [
924
+ "encode_unicode",
925
+ "libc",
926
+ "once_cell",
927
+ "unicode-width 0.2.2",
928
+ "windows-sys 0.59.0",
929
+]
930
+
931
+[[package]]
932
+name = "console"
933
+version = "0.16.3"
934
+source = "registry+https://github.com/rust-lang/crates.io-index"
935
+checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87"
936
+dependencies = [
937
+ "encode_unicode",
938
+ "libc",
939
+ "unicode-width 0.2.2",
940
+ "windows-sys 0.61.2",
941
+]
942
+
943
+[[package]]
944
+name = "console_error_panic_hook"
945
+version = "0.1.7"
946
+source = "registry+https://github.com/rust-lang/crates.io-index"
947
+checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc"
948
+dependencies = [
949
+ "cfg-if",
950
+ "wasm-bindgen",
951
+]
952
+
953
+[[package]]
954
+name = "convert_case"
955
+version = "0.6.0"
956
+source = "registry+https://github.com/rust-lang/crates.io-index"
957
+checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"
958
+dependencies = [
959
+ "unicode-segmentation",
960
+]
961
+
962
+[[package]]
963
+name = "core-foundation"
964
+version = "0.9.4"
965
+source = "registry+https://github.com/rust-lang/crates.io-index"
966
+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
967
+dependencies = [
968
+ "core-foundation-sys",
969
+ "libc",
970
+]
971
+
972
+[[package]]
973
+name = "core-foundation"
974
+version = "0.10.1"
975
+source = "registry+https://github.com/rust-lang/crates.io-index"
976
+checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
977
+dependencies = [
978
+ "core-foundation-sys",
979
+ "libc",
980
+]
981
+
982
+[[package]]
983
+name = "core-foundation-sys"
984
+version = "0.8.7"
985
+source = "registry+https://github.com/rust-lang/crates.io-index"
986
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
987
+
988
+[[package]]
989
+name = "core-graphics-types"
990
+version = "0.1.3"
991
+source = "registry+https://github.com/rust-lang/crates.io-index"
992
+checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf"
993
+dependencies = [
994
+ "bitflags 1.3.2",
995
+ "core-foundation 0.9.4",
996
+ "libc",
997
+]
998
+
999
+[[package]]
1000
+name = "core2"
1001
+version = "0.4.0"
1002
+source = "registry+https://github.com/rust-lang/crates.io-index"
1003
+checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505"
1004
+dependencies = [
1005
+ "memchr",
1006
+]
1007
+
1008
+[[package]]
1009
+name = "cpufeatures"
1010
+version = "0.2.17"
1011
+source = "registry+https://github.com/rust-lang/crates.io-index"
1012
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
1013
+dependencies = [
1014
+ "libc",
1015
+]
1016
+
1017
+[[package]]
1018
+name = "crc32fast"
1019
+version = "1.5.0"
1020
+source = "registry+https://github.com/rust-lang/crates.io-index"
1021
+checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
1022
+dependencies = [
1023
+ "cfg-if",
1024
+]
1025
+
1026
+[[package]]
1027
+name = "crossbeam-deque"
1028
+version = "0.8.6"
1029
+source = "registry+https://github.com/rust-lang/crates.io-index"
1030
+checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
1031
+dependencies = [
1032
+ "crossbeam-epoch",
1033
+ "crossbeam-utils",
1034
+]
1035
+
1036
+[[package]]
1037
+name = "crossbeam-epoch"
1038
+version = "0.9.18"
1039
+source = "registry+https://github.com/rust-lang/crates.io-index"
1040
+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
1041
+dependencies = [
1042
+ "crossbeam-utils",
1043
+]
1044
+
1045
+[[package]]
1046
+name = "crossbeam-utils"
1047
+version = "0.8.21"
1048
+source = "registry+https://github.com/rust-lang/crates.io-index"
1049
+checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
1050
+
1051
+[[package]]
1052
+name = "crossterm"
1053
+version = "0.25.0"
1054
+source = "registry+https://github.com/rust-lang/crates.io-index"
1055
+checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67"
1056
+dependencies = [
1057
+ "bitflags 1.3.2",
1058
+ "crossterm_winapi",
1059
+ "libc",
1060
+ "mio 0.8.11",
1061
+ "parking_lot",
1062
+ "signal-hook",
1063
+ "signal-hook-mio",
1064
+ "winapi",
1065
+]
1066
+
1067
+[[package]]
1068
+name = "crossterm_winapi"
1069
+version = "0.9.1"
1070
+source = "registry+https://github.com/rust-lang/crates.io-index"
1071
+checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
1072
+dependencies = [
1073
+ "winapi",
1074
+]
1075
+
1076
+[[package]]
1077
+name = "crunchy"
1078
+version = "0.2.4"
1079
+source = "registry+https://github.com/rust-lang/crates.io-index"
1080
+checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
1081
+
1082
+[[package]]
1083
+name = "crypto-common"
1084
+version = "0.1.7"
1085
+source = "registry+https://github.com/rust-lang/crates.io-index"
1086
+checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
1087
+dependencies = [
1088
+ "generic-array",
1089
+ "typenum",
1090
+]
1091
+
1092
+[[package]]
1093
+name = "cssparser"
1094
+version = "0.36.0"
1095
+source = "registry+https://github.com/rust-lang/crates.io-index"
1096
+checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2"
1097
+dependencies = [
1098
+ "cssparser-macros",
1099
+ "dtoa-short",
1100
+ "itoa",
1101
+ "phf",
1102
+ "smallvec 1.15.1",
1103
+]
1104
+
1105
+[[package]]
1106
+name = "cssparser-macros"
1107
+version = "0.6.1"
1108
+source = "registry+https://github.com/rust-lang/crates.io-index"
1109
+checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
1110
+dependencies = [
1111
+ "quote",
1112
+ "syn 2.0.117",
1113
+]
1114
+
1115
+[[package]]
1116
+name = "csv"
1117
+version = "1.4.0"
1118
+source = "registry+https://github.com/rust-lang/crates.io-index"
1119
+checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938"
1120
+dependencies = [
1121
+ "csv-core",
1122
+ "itoa",
1123
+ "ryu",
1124
+ "serde_core",
1125
+]
1126
+
1127
+[[package]]
1128
+name = "csv-core"
1129
+version = "0.1.13"
1130
+source = "registry+https://github.com/rust-lang/crates.io-index"
1131
+checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782"
1132
+dependencies = [
1133
+ "memchr",
1134
+]
1135
+
1136
+[[package]]
1137
+name = "darling"
1138
+version = "0.11.0"
1139
+source = "registry+https://github.com/rust-lang/crates.io-index"
1140
+checksum = "dbffa8f8e38810422f320ca457a93cf1cd0056dc9c06c556b867558e0d471463"
1141
+dependencies = [
1142
+ "darling_core 0.11.0",
1143
+ "darling_macro 0.11.0",
1144
+]
1145
+
1146
+[[package]]
1147
+name = "darling"
1148
+version = "0.20.11"
1149
+source = "registry+https://github.com/rust-lang/crates.io-index"
1150
+checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"
1151
+dependencies = [
1152
+ "darling_core 0.20.11",
1153
+ "darling_macro 0.20.11",
1154
+]
1155
+
1156
+[[package]]
1157
+name = "darling"
1158
+version = "0.23.0"
1159
+source = "registry+https://github.com/rust-lang/crates.io-index"
1160
+checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"
1161
+dependencies = [
1162
+ "darling_core 0.23.0",
1163
+ "darling_macro 0.23.0",
1164
+]
1165
+
1166
+[[package]]
1167
+name = "darling_core"
1168
+version = "0.11.0"
1169
+source = "registry+https://github.com/rust-lang/crates.io-index"
1170
+checksum = "06e172685d94b7b83800e3256a63261537b9d6129e10f21c8e13ddf9dba8c64d"
1171
+dependencies = [
1172
+ "fnv",
1173
+ "ident_case",
1174
+ "proc-macro2",
1175
+ "quote",
1176
+ "strsim 0.10.0",
1177
+ "syn 1.0.109",
1178
+]
1179
+
1180
+[[package]]
1181
+name = "darling_core"
1182
+version = "0.20.11"
1183
+source = "registry+https://github.com/rust-lang/crates.io-index"
1184
+checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e"
1185
+dependencies = [
1186
+ "fnv",
1187
+ "ident_case",
1188
+ "proc-macro2",
1189
+ "quote",
1190
+ "strsim 0.11.1",
1191
+ "syn 2.0.117",
1192
+]
1193
+
1194
+[[package]]
1195
+name = "darling_core"
1196
+version = "0.23.0"
1197
+source = "registry+https://github.com/rust-lang/crates.io-index"
1198
+checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0"
1199
+dependencies = [
1200
+ "ident_case",
1201
+ "proc-macro2",
1202
+ "quote",
1203
+ "strsim 0.11.1",
1204
+ "syn 2.0.117",
1205
+]
1206
+
1207
+[[package]]
1208
+name = "darling_macro"
1209
+version = "0.11.0"
1210
+source = "registry+https://github.com/rust-lang/crates.io-index"
1211
+checksum = "f0618ac802792cebd1918ac6042a6ea1eeab92db34b35656afaa577929820788"
1212
+dependencies = [
1213
+ "darling_core 0.11.0",
1214
+ "quote",
1215
+ "syn 1.0.109",
1216
+]
1217
+
1218
+[[package]]
1219
+name = "darling_macro"
1220
+version = "0.20.11"
1221
+source = "registry+https://github.com/rust-lang/crates.io-index"
1222
+checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
1223
+dependencies = [
1224
+ "darling_core 0.20.11",
1225
+ "quote",
1226
+ "syn 2.0.117",
1227
+]
1228
+
1229
+[[package]]
1230
+name = "darling_macro"
1231
+version = "0.23.0"
1232
+source = "registry+https://github.com/rust-lang/crates.io-index"
1233
+checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
1234
+dependencies = [
1235
+ "darling_core 0.23.0",
1236
+ "quote",
1237
+ "syn 2.0.117",
1238
+]
1239
+
1240
+[[package]]
1241
+name = "dart-sys"
1242
+version = "4.1.5"
1243
+source = "registry+https://github.com/rust-lang/crates.io-index"
1244
+checksum = "57967e4b200d767d091b961d6ab42cc7d0cc14fe9e052e75d0d3cf9eb732d895"
1245
+dependencies = [
1246
+ "cc",
1247
+]
1248
+
1249
+[[package]]
1250
+name = "dary_heap"
1251
+version = "0.3.8"
1252
+source = "registry+https://github.com/rust-lang/crates.io-index"
1253
+checksum = "06d2e3287df1c007e74221c49ca10a95d557349e54b3a75dc2fb14712c751f04"
1254
+dependencies = [
1255
+ "serde",
1256
+]
1257
+
1258
+[[package]]
1259
+name = "dashmap"
1260
+version = "5.5.3"
1261
+source = "registry+https://github.com/rust-lang/crates.io-index"
1262
+checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856"
1263
+dependencies = [
1264
+ "cfg-if",
1265
+ "hashbrown 0.14.5",
1266
+ "lock_api",
1267
+ "once_cell",
1268
+ "parking_lot_core",
1269
+]
1270
+
1271
+[[package]]
1272
+name = "data-encoding"
1273
+version = "2.10.0"
1274
+source = "registry+https://github.com/rust-lang/crates.io-index"
1275
+checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea"
1276
+
1277
+[[package]]
1278
+name = "defmac"
1279
+version = "0.1.3"
1280
+source = "registry+https://github.com/rust-lang/crates.io-index"
1281
+checksum = "aafbece59594ed57696a1a69e8bb3ca1683fbc9cdb41d5c02726070b2cd8f19d"
1282
+
1283
+[[package]]
1284
+name = "delegate-attr"
1285
+version = "0.3.0"
1286
+source = "registry+https://github.com/rust-lang/crates.io-index"
1287
+checksum = "51aac4c99b2e6775164b412ea33ae8441b2fde2dbf05a20bc0052a63d08c475b"
1288
+dependencies = [
1289
+ "proc-macro2",
1290
+ "quote",
1291
+ "syn 2.0.117",
1292
+]
1293
+
1294
+[[package]]
1295
+name = "deranged"
1296
+version = "0.5.8"
1297
+source = "registry+https://github.com/rust-lang/crates.io-index"
1298
+checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
1299
+dependencies = [
1300
+ "powerfmt",
1301
+ "serde_core",
1302
+]
1303
+
1304
+[[package]]
1305
+name = "derive-new"
1306
+version = "0.7.0"
1307
+source = "registry+https://github.com/rust-lang/crates.io-index"
1308
+checksum = "2cdc8d50f426189eef89dac62fabfa0abb27d5cc008f25bf4156a0203325becc"
1309
+dependencies = [
1310
+ "proc-macro2",
1311
+ "quote",
1312
+ "syn 2.0.117",
1313
+]
1314
+
1315
+[[package]]
1316
+name = "derive_builder"
1317
+version = "0.20.2"
1318
+source = "registry+https://github.com/rust-lang/crates.io-index"
1319
+checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947"
1320
+dependencies = [
1321
+ "derive_builder_macro",
1322
+]
1323
+
1324
+[[package]]
1325
+name = "derive_builder_core"
1326
+version = "0.20.2"
1327
+source = "registry+https://github.com/rust-lang/crates.io-index"
1328
+checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8"
1329
+dependencies = [
1330
+ "darling 0.20.11",
1331
+ "proc-macro2",
1332
+ "quote",
1333
+ "syn 2.0.117",
1334
+]
1335
+
1336
+[[package]]
1337
+name = "derive_builder_macro"
1338
+version = "0.20.2"
1339
+source = "registry+https://github.com/rust-lang/crates.io-index"
1340
+checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"
1341
+dependencies = [
1342
+ "derive_builder_core",
1343
+ "syn 2.0.117",
1344
+]
1345
+
1346
+[[package]]
1347
+name = "derive_more"
1348
+version = "2.1.1"
1349
+source = "registry+https://github.com/rust-lang/crates.io-index"
1350
+checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134"
1351
+dependencies = [
1352
+ "derive_more-impl",
1353
+]
1354
+
1355
+[[package]]
1356
+name = "derive_more-impl"
1357
+version = "2.1.1"
1358
+source = "registry+https://github.com/rust-lang/crates.io-index"
1359
+checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb"
1360
+dependencies = [
1361
+ "proc-macro2",
1362
+ "quote",
1363
+ "rustc_version",
1364
+ "syn 2.0.117",
1365
+]
1366
+
1367
+[[package]]
1368
+name = "derivre"
1369
+version = "0.3.8"
1370
+source = "registry+https://github.com/rust-lang/crates.io-index"
1371
+checksum = "786c7c65c4ef0c7deb05de3005e01991612a8f09fe0844fc0969c68b90468ba8"
1372
+dependencies = [
1373
+ "anyhow",
1374
+ "bytemuck",
1375
+ "bytemuck_derive",
1376
+ "hashbrown 0.15.5",
1377
+ "regex-syntax",
1378
+ "strum",
1379
+]
1380
+
1381
+[[package]]
1382
+name = "deunicode"
1383
+version = "1.6.2"
1384
+source = "registry+https://github.com/rust-lang/crates.io-index"
1385
+checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04"
1386
+
1387
+[[package]]
1388
+name = "digest"
1389
+version = "0.10.7"
1390
+source = "registry+https://github.com/rust-lang/crates.io-index"
1391
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
1392
+dependencies = [
1393
+ "block-buffer",
1394
+ "crypto-common",
1395
+]
1396
+
1397
+[[package]]
1398
+name = "dirs"
1399
+version = "6.0.0"
1400
+source = "registry+https://github.com/rust-lang/crates.io-index"
1401
+checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"
1402
+dependencies = [
1403
+ "dirs-sys",
1404
+]
1405
+
1406
+[[package]]
1407
+name = "dirs-sys"
1408
+version = "0.5.0"
1409
+source = "registry+https://github.com/rust-lang/crates.io-index"
1410
+checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"
1411
+dependencies = [
1412
+ "libc",
1413
+ "option-ext",
1414
+ "redox_users",
1415
+ "windows-sys 0.61.2",
1416
+]
1417
+
1418
+[[package]]
1419
+name = "dispatch2"
1420
+version = "0.3.1"
1421
+source = "registry+https://github.com/rust-lang/crates.io-index"
1422
+checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38"
1423
+dependencies = [
1424
+ "bitflags 2.11.0",
1425
+ "block2",
1426
+ "objc2",
1427
+]
1428
+
1429
+[[package]]
1430
+name = "displaydoc"
1431
+version = "0.2.5"
1432
+source = "registry+https://github.com/rust-lang/crates.io-index"
1433
+checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
1434
+dependencies = [
1435
+ "proc-macro2",
1436
+ "quote",
1437
+ "syn 2.0.117",
1438
+]
1439
+
1440
+[[package]]
1441
+name = "doctest-file"
1442
+version = "1.1.1"
1443
+source = "registry+https://github.com/rust-lang/crates.io-index"
1444
+checksum = "c2db04e74f0a9a93103b50e90b96024c9b2bdca8bce6a632ec71b88736d3d359"
1445
+
1446
+[[package]]
1447
+name = "dtoa"
1448
+version = "1.0.11"
1449
+source = "registry+https://github.com/rust-lang/crates.io-index"
1450
+checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590"
1451
+
1452
+[[package]]
1453
+name = "dtoa-short"
1454
+version = "0.3.5"
1455
+source = "registry+https://github.com/rust-lang/crates.io-index"
1456
+checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87"
1457
+dependencies = [
1458
+ "dtoa",
1459
+]
1460
+
1461
+[[package]]
1462
+name = "dunce"
1463
+version = "1.0.5"
1464
+source = "registry+https://github.com/rust-lang/crates.io-index"
1465
+checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
1466
+
1467
+[[package]]
1468
+name = "dyn-clone"
1469
+version = "1.0.20"
1470
+source = "registry+https://github.com/rust-lang/crates.io-index"
1471
+checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
1472
+
1473
+[[package]]
1474
+name = "dyn-stack"
1475
+version = "0.13.2"
1476
+source = "registry+https://github.com/rust-lang/crates.io-index"
1477
+checksum = "1c4713e43e2886ba72b8271aa66c93d722116acf7a75555cce11dcde84388fe8"
1478
+dependencies = [
1479
+ "bytemuck",
1480
+ "dyn-stack-macros",
1481
+]
1482
+
1483
+[[package]]
1484
+name = "dyn-stack-macros"
1485
+version = "0.1.3"
1486
+source = "registry+https://github.com/rust-lang/crates.io-index"
1487
+checksum = "e1d926b4d407d372f141f93bb444696142c29d32962ccbd3531117cf3aa0bfa9"
1488
+
1489
+[[package]]
1490
+name = "ego-tree"
1491
+version = "0.10.0"
1492
+source = "registry+https://github.com/rust-lang/crates.io-index"
1493
+checksum = "b2972feb8dffe7bc8c5463b1dacda1b0dfbed3710e50f977d965429692d74cd8"
1494
+
1495
+[[package]]
1496
+name = "either"
1497
+version = "1.15.0"
1498
+source = "registry+https://github.com/rust-lang/crates.io-index"
1499
+checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
1500
+dependencies = [
1501
+ "serde",
1502
+]
1503
+
1504
+[[package]]
1505
+name = "encode_unicode"
1506
+version = "1.0.0"
1507
+source = "registry+https://github.com/rust-lang/crates.io-index"
1508
+checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"
1509
+
1510
+[[package]]
1511
+name = "encoding_rs"
1512
+version = "0.8.35"
1513
+source = "registry+https://github.com/rust-lang/crates.io-index"
1514
+checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
1515
+dependencies = [
1516
+ "cfg-if",
1517
+]
1518
+
1519
+[[package]]
1520
+name = "encoding_rs_io"
1521
+version = "0.1.7"
1522
+source = "registry+https://github.com/rust-lang/crates.io-index"
1523
+checksum = "1cc3c5651fb62ab8aa3103998dade57efdd028544bd300516baa31840c252a83"
1524
+dependencies = [
1525
+ "encoding_rs",
1526
+]
1527
+
1528
+[[package]]
1529
+name = "endian-type"
1530
+version = "0.2.0"
1531
+source = "registry+https://github.com/rust-lang/crates.io-index"
1532
+checksum = "869b0adbda23651a9c5c0c3d270aac9fcb52e8622a8f2b17e57802d7791962f2"
1533
+
1534
+[[package]]
1535
+name = "enum-as-inner"
1536
+version = "0.6.1"
1537
+source = "registry+https://github.com/rust-lang/crates.io-index"
1538
+checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc"
1539
+dependencies = [
1540
+ "heck 0.5.0",
1541
+ "proc-macro2",
1542
+ "quote",
1543
+ "syn 2.0.117",
1544
+]
1545
+
1546
+[[package]]
1547
+name = "env_filter"
1548
+version = "0.1.4"
1549
+source = "registry+https://github.com/rust-lang/crates.io-index"
1550
+checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2"
1551
+dependencies = [
1552
+ "log",
1553
+ "regex",
1554
+]
1555
+
1556
+[[package]]
1557
+name = "equator"
1558
+version = "0.4.2"
1559
+source = "registry+https://github.com/rust-lang/crates.io-index"
1560
+checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc"
1561
+dependencies = [
1562
+ "equator-macro",
1563
+]
1564
+
1565
+[[package]]
1566
+name = "equator-macro"
1567
+version = "0.4.2"
1568
+source = "registry+https://github.com/rust-lang/crates.io-index"
1569
+checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3"
1570
+dependencies = [
1571
+ "proc-macro2",
1572
+ "quote",
1573
+ "syn 2.0.117",
1574
+]
1575
+
1576
+[[package]]
1577
+name = "equivalent"
1578
+version = "1.0.2"
1579
+source = "registry+https://github.com/rust-lang/crates.io-index"
1580
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
1581
+
1582
+[[package]]
1583
+name = "errno"
1584
+version = "0.3.14"
1585
+source = "registry+https://github.com/rust-lang/crates.io-index"
1586
+checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
1587
+dependencies = [
1588
+ "libc",
1589
+ "windows-sys 0.61.2",
1590
+]
1591
+
1592
+[[package]]
1593
+name = "esaxx-rs"
1594
+version = "0.1.10"
1595
+source = "registry+https://github.com/rust-lang/crates.io-index"
1596
+checksum = "d817e038c30374a4bcb22f94d0a8a0e216958d4c3dcde369b1439fec4bdda6e6"
1597
+
1598
+[[package]]
1599
+name = "exr"
1600
+version = "1.74.0"
1601
+source = "registry+https://github.com/rust-lang/crates.io-index"
1602
+checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be"
1603
+dependencies = [
1604
+ "bit_field",
1605
+ "half",
1606
+ "lebe",
1607
+ "miniz_oxide",
1608
+ "rayon-core",
1609
+ "smallvec 1.15.1",
1610
+ "zune-inflate",
1611
+]
1612
+
1613
+[[package]]
1614
+name = "extended"
1615
+version = "0.1.0"
1616
+source = "registry+https://github.com/rust-lang/crates.io-index"
1617
+checksum = "af9673d8203fcb076b19dfd17e38b3d4ae9f44959416ea532ce72415a6020365"
1618
+
1619
+[[package]]
1620
+name = "fancy-regex"
1621
+version = "0.13.0"
1622
+source = "registry+https://github.com/rust-lang/crates.io-index"
1623
+checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2"
1624
+dependencies = [
1625
+ "bit-set 0.5.3",
1626
+ "regex-automata",
1627
+ "regex-syntax",
1628
+]
1629
+
1630
+[[package]]
1631
+name = "fancy-regex"
1632
+version = "0.14.0"
1633
+source = "registry+https://github.com/rust-lang/crates.io-index"
1634
+checksum = "6e24cb5a94bcae1e5408b0effca5cd7172ea3c5755049c5f3af4cd283a165298"
1635
+dependencies = [
1636
+ "bit-set 0.8.0",
1637
+ "regex-automata",
1638
+ "regex-syntax",
1639
+]
1640
+
1641
+[[package]]
1642
+name = "fastrand"
1643
+version = "2.4.0"
1644
+source = "registry+https://github.com/rust-lang/crates.io-index"
1645
+checksum = "a043dc74da1e37d6afe657061213aa6f425f855399a11d3463c6ecccc4dfda1f"
1646
+
1647
+[[package]]
1648
+name = "fax"
1649
+version = "0.2.6"
1650
+source = "registry+https://github.com/rust-lang/crates.io-index"
1651
+checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab"
1652
+dependencies = [
1653
+ "fax_derive",
1654
+]
1655
+
1656
+[[package]]
1657
+name = "fax_derive"
1658
+version = "0.2.0"
1659
+source = "registry+https://github.com/rust-lang/crates.io-index"
1660
+checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d"
1661
+dependencies = [
1662
+ "proc-macro2",
1663
+ "quote",
1664
+ "syn 2.0.117",
1665
+]
1666
+
1667
+[[package]]
1668
+name = "fdeflate"
1669
+version = "0.3.7"
1670
+source = "registry+https://github.com/rust-lang/crates.io-index"
1671
+checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
1672
+dependencies = [
1673
+ "simd-adler32",
1674
+]
1675
+
1676
+[[package]]
1677
+name = "find-msvc-tools"
1678
+version = "0.1.9"
1679
+source = "registry+https://github.com/rust-lang/crates.io-index"
1680
+checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
1681
+
1682
+[[package]]
1683
+name = "flate2"
1684
+version = "1.1.9"
1685
+source = "registry+https://github.com/rust-lang/crates.io-index"
1686
+checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
1687
+dependencies = [
1688
+ "crc32fast",
1689
+ "miniz_oxide",
1690
+]
1691
+
1692
+[[package]]
1693
+name = "float8"
1694
+version = "0.7.0"
1695
+source = "registry+https://github.com/rust-lang/crates.io-index"
1696
+checksum = "c2d1f04709a8ac06e8e8042875a3c466cc4832d3c1a18dbcb9dba3c6e83046bc"
1697
+dependencies = [
1698
+ "half",
1699
+ "num-traits",
1700
+ "rand 0.9.2",
1701
+ "rand_distr 0.5.1",
1702
+]
1703
+
1704
+[[package]]
1705
+name = "flutter_rust_bridge"
1706
+version = "2.12.0"
1707
+source = "registry+https://github.com/rust-lang/crates.io-index"
1708
+checksum = "a0884853aae8a6517b5b58cf36f55da487f2fe110e1686938eb29b6640aae4a5"
1709
+dependencies = [
1710
+ "allo-isolate",
1711
+ "android_logger",
1712
+ "anyhow",
1713
+ "build-target",
1714
+ "bytemuck",
1715
+ "byteorder",
1716
+ "console_error_panic_hook",
1717
+ "dart-sys",
1718
+ "delegate-attr",
1719
+ "flutter_rust_bridge_macros",
1720
+ "futures",
1721
+ "js-sys",
1722
+ "lazy_static",
1723
+ "log",
1724
+ "oslog",
1725
+ "portable-atomic",
1726
+ "threadpool",
1727
+ "tokio",
1728
+ "wasm-bindgen",
1729
+ "wasm-bindgen-futures",
1730
+ "web-sys",
1731
+]
1732
+
1733
+[[package]]
1734
+name = "flutter_rust_bridge_macros"
1735
+version = "2.12.0"
1736
+source = "registry+https://github.com/rust-lang/crates.io-index"
1737
+checksum = "6b5ce32f35f710ced8c5aa557f023f1a624e737b5460cee2b70fcd3a8df09e1b"
1738
+dependencies = [
1739
+ "hex",
1740
+ "md-5",
1741
+ "proc-macro2",
1742
+ "quote",
1743
+ "syn 2.0.117",
1744
+]
1745
+
1746
+[[package]]
1747
+name = "fnv"
1748
+version = "1.0.7"
1749
+source = "registry+https://github.com/rust-lang/crates.io-index"
1750
+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
1751
+
1752
+[[package]]
1753
+name = "foldhash"
1754
+version = "0.1.5"
1755
+source = "registry+https://github.com/rust-lang/crates.io-index"
1756
+checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
1757
+
1758
+[[package]]
1759
+name = "foldhash"
1760
+version = "0.2.0"
1761
+source = "registry+https://github.com/rust-lang/crates.io-index"
1762
+checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
1763
+
1764
+[[package]]
1765
+name = "foreign-types"
1766
+version = "0.5.0"
1767
+source = "registry+https://github.com/rust-lang/crates.io-index"
1768
+checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
1769
+dependencies = [
1770
+ "foreign-types-macros",
1771
+ "foreign-types-shared",
1772
+]
1773
+
1774
+[[package]]
1775
+name = "foreign-types-macros"
1776
+version = "0.2.3"
1777
+source = "registry+https://github.com/rust-lang/crates.io-index"
1778
+checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
1779
+dependencies = [
1780
+ "proc-macro2",
1781
+ "quote",
1782
+ "syn 2.0.117",
1783
+]
1784
+
1785
+[[package]]
1786
+name = "foreign-types-shared"
1787
+version = "0.3.1"
1788
+source = "registry+https://github.com/rust-lang/crates.io-index"
1789
+checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
1790
+
1791
+[[package]]
1792
+name = "form_urlencoded"
1793
+version = "1.2.2"
1794
+source = "registry+https://github.com/rust-lang/crates.io-index"
1795
+checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
1796
+dependencies = [
1797
+ "percent-encoding",
1798
+]
1799
+
1800
+[[package]]
1801
+name = "fs-err"
1802
+version = "2.11.0"
1803
+source = "registry+https://github.com/rust-lang/crates.io-index"
1804
+checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41"
1805
+dependencies = [
1806
+ "autocfg",
1807
+]
1808
+
1809
+[[package]]
1810
+name = "fs_extra"
1811
+version = "1.3.0"
1812
+source = "registry+https://github.com/rust-lang/crates.io-index"
1813
+checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
1814
+
1815
+[[package]]
1816
+name = "futf"
1817
+version = "0.1.5"
1818
+source = "registry+https://github.com/rust-lang/crates.io-index"
1819
+checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843"
1820
+dependencies = [
1821
+ "mac",
1822
+ "new_debug_unreachable",
1823
+]
1824
+
1825
+[[package]]
1826
+name = "futures"
1827
+version = "0.3.32"
1828
+source = "registry+https://github.com/rust-lang/crates.io-index"
1829
+checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d"
1830
+dependencies = [
1831
+ "futures-channel",
1832
+ "futures-core",
1833
+ "futures-executor",
1834
+ "futures-io",
1835
+ "futures-sink",
1836
+ "futures-task",
1837
+ "futures-util",
1838
+]
1839
+
1840
+[[package]]
1841
+name = "futures-channel"
1842
+version = "0.3.32"
1843
+source = "registry+https://github.com/rust-lang/crates.io-index"
1844
+checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
1845
+dependencies = [
1846
+ "futures-core",
1847
+ "futures-sink",
1848
+]
1849
+
1850
+[[package]]
1851
+name = "futures-core"
1852
+version = "0.3.32"
1853
+source = "registry+https://github.com/rust-lang/crates.io-index"
1854
+checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
1855
+
1856
+[[package]]
1857
+name = "futures-executor"
1858
+version = "0.3.32"
1859
+source = "registry+https://github.com/rust-lang/crates.io-index"
1860
+checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d"
1861
+dependencies = [
1862
+ "futures-core",
1863
+ "futures-task",
1864
+ "futures-util",
1865
+]
1866
+
1867
+[[package]]
1868
+name = "futures-io"
1869
+version = "0.3.32"
1870
+source = "registry+https://github.com/rust-lang/crates.io-index"
1871
+checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"
1872
+
1873
+[[package]]
1874
+name = "futures-macro"
1875
+version = "0.3.32"
1876
+source = "registry+https://github.com/rust-lang/crates.io-index"
1877
+checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b"
1878
+dependencies = [
1879
+ "proc-macro2",
1880
+ "quote",
1881
+ "syn 2.0.117",
1882
+]
1883
+
1884
+[[package]]
1885
+name = "futures-sink"
1886
+version = "0.3.32"
1887
+source = "registry+https://github.com/rust-lang/crates.io-index"
1888
+checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
1889
+
1890
+[[package]]
1891
+name = "futures-task"
1892
+version = "0.3.32"
1893
+source = "registry+https://github.com/rust-lang/crates.io-index"
1894
+checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
1895
+
1896
+[[package]]
1897
+name = "futures-util"
1898
+version = "0.3.32"
1899
+source = "registry+https://github.com/rust-lang/crates.io-index"
1900
+checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
1901
+dependencies = [
1902
+ "futures-channel",
1903
+ "futures-core",
1904
+ "futures-io",
1905
+ "futures-macro",
1906
+ "futures-sink",
1907
+ "futures-task",
1908
+ "memchr",
1909
+ "pin-project-lite",
1910
+ "slab",
1911
+]
1912
+
1913
+[[package]]
1914
+name = "fxhash"
1915
+version = "0.2.1"
1916
+source = "registry+https://github.com/rust-lang/crates.io-index"
1917
+checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
1918
+dependencies = [
1919
+ "byteorder",
1920
+]
1921
+
1922
+[[package]]
1923
+name = "galil-seiferas"
1924
+version = "0.1.5"
1925
+source = "registry+https://github.com/rust-lang/crates.io-index"
1926
+checksum = "794ac25cfda3fa11d2b07ff8c65889c6c03411646df54e59e606878d899e1d5a"
1927
+dependencies = [
1928
+ "defmac",
1929
+ "unchecked-index",
1930
+]
1931
+
1932
+[[package]]
1933
+name = "gemm"
1934
+version = "0.18.2"
1935
+source = "registry+https://github.com/rust-lang/crates.io-index"
1936
+checksum = "ab96b703d31950f1aeddded248bc95543c9efc7ac9c4a21fda8703a83ee35451"
1937
+dependencies = [
1938
+ "dyn-stack",
1939
+ "gemm-c32 0.18.2",
1940
+ "gemm-c64 0.18.2",
1941
+ "gemm-common 0.18.2",
1942
+ "gemm-f16 0.18.2",
1943
+ "gemm-f32 0.18.2",
1944
+ "gemm-f64 0.18.2",
1945
+ "num-complex",
1946
+ "num-traits",
1947
+ "paste",
1948
+ "raw-cpuid",
1949
+ "seq-macro",
1950
+]
1951
+
1952
+[[package]]
1953
+name = "gemm"
1954
+version = "0.19.0"
1955
+source = "registry+https://github.com/rust-lang/crates.io-index"
1956
+checksum = "aa0673db364b12263d103b68337a68fbecc541d6f6b61ba72fe438654709eacb"
1957
+dependencies = [
1958
+ "dyn-stack",
1959
+ "gemm-c32 0.19.0",
1960
+ "gemm-c64 0.19.0",
1961
+ "gemm-common 0.19.0",
1962
+ "gemm-f16 0.19.0",
1963
+ "gemm-f32 0.19.0",
1964
+ "gemm-f64 0.19.0",
1965
+ "num-complex",
1966
+ "num-traits",
1967
+ "paste",
1968
+ "raw-cpuid",
1969
+ "seq-macro",
1970
+]
1971
+
1972
+[[package]]
1973
+name = "gemm-c32"
1974
+version = "0.18.2"
1975
+source = "registry+https://github.com/rust-lang/crates.io-index"
1976
+checksum = "f6db9fd9f40421d00eea9dd0770045a5603b8d684654816637732463f4073847"
1977
+dependencies = [
1978
+ "dyn-stack",
1979
+ "gemm-common 0.18.2",
1980
+ "num-complex",
1981
+ "num-traits",
1982
+ "paste",
1983
+ "raw-cpuid",
1984
+ "seq-macro",
1985
+]
1986
+
1987
+[[package]]
1988
+name = "gemm-c32"
1989
+version = "0.19.0"
1990
+source = "registry+https://github.com/rust-lang/crates.io-index"
1991
+checksum = "086936dbdcb99e37aad81d320f98f670e53c1e55a98bee70573e83f95beb128c"
1992
+dependencies = [
1993
+ "dyn-stack",
1994
+ "gemm-common 0.19.0",
1995
+ "num-complex",
1996
+ "num-traits",
1997
+ "paste",
1998
+ "raw-cpuid",
1999
+ "seq-macro",
2000
+]
2001
+
2002
+[[package]]
2003
+name = "gemm-c64"
2004
+version = "0.18.2"
2005
+source = "registry+https://github.com/rust-lang/crates.io-index"
2006
+checksum = "dfcad8a3d35a43758330b635d02edad980c1e143dc2f21e6fd25f9e4eada8edf"
2007
+dependencies = [
2008
+ "dyn-stack",
2009
+ "gemm-common 0.18.2",
2010
+ "num-complex",
2011
+ "num-traits",
2012
+ "paste",
2013
+ "raw-cpuid",
2014
+ "seq-macro",
2015
+]
2016
+
2017
+[[package]]
2018
+name = "gemm-c64"
2019
+version = "0.19.0"
2020
+source = "registry+https://github.com/rust-lang/crates.io-index"
2021
+checksum = "20c8aeeeec425959bda4d9827664029ba1501a90a0d1e6228e48bef741db3a3f"
2022
+dependencies = [
2023
+ "dyn-stack",
2024
+ "gemm-common 0.19.0",
2025
+ "num-complex",
2026
+ "num-traits",
2027
+ "paste",
2028
+ "raw-cpuid",
2029
+ "seq-macro",
2030
+]
2031
+
2032
+[[package]]
2033
+name = "gemm-common"
2034
+version = "0.18.2"
2035
+source = "registry+https://github.com/rust-lang/crates.io-index"
2036
+checksum = "a352d4a69cbe938b9e2a9cb7a3a63b7e72f9349174a2752a558a8a563510d0f3"
2037
+dependencies = [
2038
+ "bytemuck",
2039
+ "dyn-stack",
2040
+ "half",
2041
+ "libm",
2042
+ "num-complex",
2043
+ "num-traits",
2044
+ "once_cell",
2045
+ "paste",
2046
+ "pulp 0.21.5",
2047
+ "raw-cpuid",
2048
+ "rayon",
2049
+ "seq-macro",
2050
+ "sysctl",
2051
+]
2052
+
2053
+[[package]]
2054
+name = "gemm-common"
2055
+version = "0.19.0"
2056
+source = "registry+https://github.com/rust-lang/crates.io-index"
2057
+checksum = "88027625910cc9b1085aaaa1c4bc46bb3a36aad323452b33c25b5e4e7c8e2a3e"
2058
+dependencies = [
2059
+ "bytemuck",
2060
+ "dyn-stack",
2061
+ "half",
2062
+ "libm",
2063
+ "num-complex",
2064
+ "num-traits",
2065
+ "once_cell",
2066
+ "paste",
2067
+ "pulp 0.22.2",
2068
+ "raw-cpuid",
2069
+ "rayon",
2070
+ "seq-macro",
2071
+ "sysctl",
2072
+]
2073
+
2074
+[[package]]
2075
+name = "gemm-f16"
2076
+version = "0.18.2"
2077
+source = "registry+https://github.com/rust-lang/crates.io-index"
2078
+checksum = "cff95ae3259432f3c3410eaa919033cd03791d81cebd18018393dc147952e109"
2079
+dependencies = [
2080
+ "dyn-stack",
2081
+ "gemm-common 0.18.2",
2082
+ "gemm-f32 0.18.2",
2083
+ "half",
2084
+ "num-complex",
2085
+ "num-traits",
2086
+ "paste",
2087
+ "raw-cpuid",
2088
+ "rayon",
2089
+ "seq-macro",
2090
+]
2091
+
2092
+[[package]]
2093
+name = "gemm-f16"
2094
+version = "0.19.0"
2095
+source = "registry+https://github.com/rust-lang/crates.io-index"
2096
+checksum = "e3df7a55202e6cd6739d82ae3399c8e0c7e1402859b30e4cb780e61525d9486e"
2097
+dependencies = [
2098
+ "dyn-stack",
2099
+ "gemm-common 0.19.0",
2100
+ "gemm-f32 0.19.0",
2101
+ "half",
2102
+ "num-complex",
2103
+ "num-traits",
2104
+ "paste",
2105
+ "raw-cpuid",
2106
+ "rayon",
2107
+ "seq-macro",
2108
+]
2109
+
2110
+[[package]]
2111
+name = "gemm-f32"
2112
+version = "0.18.2"
2113
+source = "registry+https://github.com/rust-lang/crates.io-index"
2114
+checksum = "bc8d3d4385393304f407392f754cd2dc4b315d05063f62cf09f47b58de276864"
2115
+dependencies = [
2116
+ "dyn-stack",
2117
+ "gemm-common 0.18.2",
2118
+ "num-complex",
2119
+ "num-traits",
2120
+ "paste",
2121
+ "raw-cpuid",
2122
+ "seq-macro",
2123
+]
2124
+
2125
+[[package]]
2126
+name = "gemm-f32"
2127
+version = "0.19.0"
2128
+source = "registry+https://github.com/rust-lang/crates.io-index"
2129
+checksum = "02e0b8c9da1fbec6e3e3ab2ce6bc259ef18eb5f6f0d3e4edf54b75f9fd41a81c"
2130
+dependencies = [
2131
+ "dyn-stack",
2132
+ "gemm-common 0.19.0",
2133
+ "num-complex",
2134
+ "num-traits",
2135
+ "paste",
2136
+ "raw-cpuid",
2137
+ "seq-macro",
2138
+]
2139
+
2140
+[[package]]
2141
+name = "gemm-f64"
2142
+version = "0.18.2"
2143
+source = "registry+https://github.com/rust-lang/crates.io-index"
2144
+checksum = "35b2a4f76ce4b8b16eadc11ccf2e083252d8237c1b589558a49b0183545015bd"
2145
+dependencies = [
2146
+ "dyn-stack",
2147
+ "gemm-common 0.18.2",
2148
+ "num-complex",
2149
+ "num-traits",
2150
+ "paste",
2151
+ "raw-cpuid",
2152
+ "seq-macro",
2153
+]
2154
+
2155
+[[package]]
2156
+name = "gemm-f64"
2157
+version = "0.19.0"
2158
+source = "registry+https://github.com/rust-lang/crates.io-index"
2159
+checksum = "056131e8f2a521bfab322f804ccd652520c79700d81209e9d9275bbdecaadc6a"
2160
+dependencies = [
2161
+ "dyn-stack",
2162
+ "gemm-common 0.19.0",
2163
+ "num-complex",
2164
+ "num-traits",
2165
+ "paste",
2166
+ "raw-cpuid",
2167
+ "seq-macro",
2168
+]
2169
+
2170
+[[package]]
2171
+name = "generator"
2172
+version = "0.7.5"
2173
+source = "registry+https://github.com/rust-lang/crates.io-index"
2174
+checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e"
2175
+dependencies = [
2176
+ "cc",
2177
+ "libc",
2178
+ "log",
2179
+ "rustversion",
2180
+ "windows 0.48.0",
2181
+]
2182
+
2183
+[[package]]
2184
+name = "generic-array"
2185
+version = "0.14.7"
2186
+source = "registry+https://github.com/rust-lang/crates.io-index"
2187
+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
2188
+dependencies = [
2189
+ "typenum",
2190
+ "version_check",
2191
+]
2192
+
2193
+[[package]]
2194
+name = "getopts"
2195
+version = "0.2.24"
2196
+source = "registry+https://github.com/rust-lang/crates.io-index"
2197
+checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df"
2198
+dependencies = [
2199
+ "unicode-width 0.2.2",
2200
+]
2201
+
2202
+[[package]]
2203
+name = "getrandom"
2204
+version = "0.2.17"
2205
+source = "registry+https://github.com/rust-lang/crates.io-index"
2206
+checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
2207
+dependencies = [
2208
+ "cfg-if",
2209
+ "js-sys",
2210
+ "libc",
2211
+ "wasi",
2212
+ "wasm-bindgen",
2213
+]
2214
+
2215
+[[package]]
2216
+name = "getrandom"
2217
+version = "0.3.4"
2218
+source = "registry+https://github.com/rust-lang/crates.io-index"
2219
+checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
2220
+dependencies = [
2221
+ "cfg-if",
2222
+ "js-sys",
2223
+ "libc",
2224
+ "r-efi 5.3.0",
2225
+ "wasip2",
2226
+ "wasm-bindgen",
2227
+]
2228
+
2229
+[[package]]
2230
+name = "getrandom"
2231
+version = "0.4.2"
2232
+source = "registry+https://github.com/rust-lang/crates.io-index"
2233
+checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
2234
+dependencies = [
2235
+ "cfg-if",
2236
+ "libc",
2237
+ "r-efi 6.0.0",
2238
+ "wasip2",
2239
+ "wasip3",
2240
+]
2241
+
2242
+[[package]]
2243
+name = "gif"
2244
+version = "0.14.1"
2245
+source = "registry+https://github.com/rust-lang/crates.io-index"
2246
+checksum = "f5df2ba84018d80c213569363bdcd0c64e6933c67fe4c1d60ecf822971a3c35e"
2247
+dependencies = [
2248
+ "color_quant",
2249
+ "weezl",
2250
+]
2251
+
2252
+[[package]]
2253
+name = "gimli"
2254
+version = "0.32.3"
2255
+source = "registry+https://github.com/rust-lang/crates.io-index"
2256
+checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
2257
+
2258
+[[package]]
2259
+name = "glob"
2260
+version = "0.3.3"
2261
+source = "registry+https://github.com/rust-lang/crates.io-index"
2262
+checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
2263
+
2264
+[[package]]
2265
+name = "goblin"
2266
+version = "0.8.2"
2267
+source = "registry+https://github.com/rust-lang/crates.io-index"
2268
+checksum = "1b363a30c165f666402fe6a3024d3bec7ebc898f96a4a23bd1c99f8dbf3f4f47"
2269
+dependencies = [
2270
+ "log",
2271
+ "plain",
2272
+ "scroll",
2273
+]
2274
+
2275
+[[package]]
2276
+name = "h2"
2277
+version = "0.4.13"
2278
+source = "registry+https://github.com/rust-lang/crates.io-index"
2279
+checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54"
2280
+dependencies = [
2281
+ "atomic-waker",
2282
+ "bytes",
2283
+ "fnv",
2284
+ "futures-core",
2285
+ "futures-sink",
2286
+ "http",
2287
+ "indexmap 2.13.1",
2288
+ "slab",
2289
+ "tokio",
2290
+ "tokio-util",
2291
+ "tracing",
2292
+]
2293
+
2294
+[[package]]
2295
+name = "half"
2296
+version = "2.7.1"
2297
+source = "registry+https://github.com/rust-lang/crates.io-index"
2298
+checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"
2299
+dependencies = [
2300
+ "bytemuck",
2301
+ "cfg-if",
2302
+ "crunchy",
2303
+ "num-traits",
2304
+ "rand 0.9.2",
2305
+ "rand_distr 0.5.1",
2306
+ "zerocopy",
2307
+]
2308
+
2309
+[[package]]
2310
+name = "hashbrown"
2311
+version = "0.12.3"
2312
+source = "registry+https://github.com/rust-lang/crates.io-index"
2313
+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
2314
+
2315
+[[package]]
2316
+name = "hashbrown"
2317
+version = "0.14.5"
2318
+source = "registry+https://github.com/rust-lang/crates.io-index"
2319
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
2320
+
2321
+[[package]]
2322
+name = "hashbrown"
2323
+version = "0.15.5"
2324
+source = "registry+https://github.com/rust-lang/crates.io-index"
2325
+checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
2326
+dependencies = [
2327
+ "allocator-api2",
2328
+ "equivalent",
2329
+ "foldhash 0.1.5",
2330
+]
2331
+
2332
+[[package]]
2333
+name = "hashbrown"
2334
+version = "0.16.1"
2335
+source = "registry+https://github.com/rust-lang/crates.io-index"
2336
+checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
2337
+dependencies = [
2338
+ "allocator-api2",
2339
+ "equivalent",
2340
+ "foldhash 0.2.0",
2341
+ "serde",
2342
+ "serde_core",
2343
+]
2344
+
2345
+[[package]]
2346
+name = "heck"
2347
+version = "0.3.3"
2348
+source = "registry+https://github.com/rust-lang/crates.io-index"
2349
+checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
2350
+dependencies = [
2351
+ "unicode-segmentation",
2352
+]
2353
+
2354
+[[package]]
2355
+name = "heck"
2356
+version = "0.5.0"
2357
+source = "registry+https://github.com/rust-lang/crates.io-index"
2358
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
2359
+
2360
+[[package]]
2361
+name = "hermit-abi"
2362
+version = "0.1.19"
2363
+source = "registry+https://github.com/rust-lang/crates.io-index"
2364
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
2365
+dependencies = [
2366
+ "libc",
2367
+]
2368
+
2369
+[[package]]
2370
+name = "hermit-abi"
2371
+version = "0.5.2"
2372
+source = "registry+https://github.com/rust-lang/crates.io-index"
2373
+checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
2374
+
2375
+[[package]]
2376
+name = "hex"
2377
+version = "0.4.3"
2378
+source = "registry+https://github.com/rust-lang/crates.io-index"
2379
+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
2380
+
2381
+[[package]]
2382
+name = "hf-hub"
2383
+version = "0.4.3"
2384
+source = "registry+https://github.com/rust-lang/crates.io-index"
2385
+checksum = "629d8f3bbeda9d148036d6b0de0a3ab947abd08ce90626327fc3547a49d59d97"
2386
+dependencies = [
2387
+ "dirs",
2388
+ "futures",
2389
+ "http",
2390
+ "indicatif 0.17.11",
2391
+ "libc",
2392
+ "log",
2393
+ "num_cpus",
2394
+ "rand 0.9.2",
2395
+ "reqwest 0.12.28",
2396
+ "serde",
2397
+ "serde_json",
2398
+ "thiserror 2.0.18",
2399
+ "tokio",
2400
+ "ureq",
2401
+ "windows-sys 0.60.2",
2402
+]
2403
+
2404
+[[package]]
2405
+name = "home"
2406
+version = "0.5.12"
2407
+source = "registry+https://github.com/rust-lang/crates.io-index"
2408
+checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d"
2409
+dependencies = [
2410
+ "windows-sys 0.61.2",
2411
+]
2412
+
2413
+[[package]]
2414
+name = "hound"
2415
+version = "3.5.1"
2416
+source = "registry+https://github.com/rust-lang/crates.io-index"
2417
+checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f"
2418
+
2419
+[[package]]
2420
+name = "html2text"
2421
+version = "0.16.7"
2422
+source = "registry+https://github.com/rust-lang/crates.io-index"
2423
+checksum = "12d23156ea4dbe6b37ad48fab2da56ff27b0f6192fb5db210c44eb07bfe6e787"
2424
+dependencies = [
2425
+ "html5ever 0.38.0",
2426
+ "tendril 0.5.0",
2427
+ "thiserror 2.0.18",
2428
+ "unicode-width 0.2.2",
2429
+]
2430
+
2431
+[[package]]
2432
+name = "html5ever"
2433
+version = "0.36.1"
2434
+source = "registry+https://github.com/rust-lang/crates.io-index"
2435
+checksum = "6452c4751a24e1b99c3260d505eaeee76a050573e61f30ac2c924ddc7236f01e"
2436
+dependencies = [
2437
+ "log",
2438
+ "markup5ever 0.36.1",
2439
+]
2440
+
2441
+[[package]]
2442
+name = "html5ever"
2443
+version = "0.38.0"
2444
+source = "registry+https://github.com/rust-lang/crates.io-index"
2445
+checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2"
2446
+dependencies = [
2447
+ "log",
2448
+ "markup5ever 0.38.0",
2449
+]
2450
+
2451
+[[package]]
2452
+name = "http"
2453
+version = "1.4.0"
2454
+source = "registry+https://github.com/rust-lang/crates.io-index"
2455
+checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
2456
+dependencies = [
2457
+ "bytes",
2458
+ "itoa",
2459
+]
2460
+
2461
+[[package]]
2462
+name = "http-body"
2463
+version = "1.0.1"
2464
+source = "registry+https://github.com/rust-lang/crates.io-index"
2465
+checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
2466
+dependencies = [
2467
+ "bytes",
2468
+ "http",
2469
+]
2470
+
2471
+[[package]]
2472
+name = "http-body-util"
2473
+version = "0.1.3"
2474
+source = "registry+https://github.com/rust-lang/crates.io-index"
2475
+checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"
2476
+dependencies = [
2477
+ "bytes",
2478
+ "futures-core",
2479
+ "http",
2480
+ "http-body",
2481
+ "pin-project-lite",
2482
+]
2483
+
2484
+[[package]]
2485
+name = "httparse"
2486
+version = "1.10.1"
2487
+source = "registry+https://github.com/rust-lang/crates.io-index"
2488
+checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
2489
+
2490
+[[package]]
2491
+name = "hyper"
2492
+version = "1.9.0"
2493
+source = "registry+https://github.com/rust-lang/crates.io-index"
2494
+checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca"
2495
+dependencies = [
2496
+ "atomic-waker",
2497
+ "bytes",
2498
+ "futures-channel",
2499
+ "futures-core",
2500
+ "h2",
2501
+ "http",
2502
+ "http-body",
2503
+ "httparse",
2504
+ "itoa",
2505
+ "pin-project-lite",
2506
+ "smallvec 1.15.1",
2507
+ "tokio",
2508
+ "want",
2509
+]
2510
+
2511
+[[package]]
2512
+name = "hyper-rustls"
2513
+version = "0.27.7"
2514
+source = "registry+https://github.com/rust-lang/crates.io-index"
2515
+checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58"
2516
+dependencies = [
2517
+ "http",
2518
+ "hyper",
2519
+ "hyper-util",
2520
+ "rustls",
2521
+ "rustls-pki-types",
2522
+ "tokio",
2523
+ "tokio-rustls",
2524
+ "tower-service",
2525
+ "webpki-roots 1.0.6",
2526
+]
2527
+
2528
+[[package]]
2529
+name = "hyper-util"
2530
+version = "0.1.20"
2531
+source = "registry+https://github.com/rust-lang/crates.io-index"
2532
+checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"
2533
+dependencies = [
2534
+ "base64 0.22.1",
2535
+ "bytes",
2536
+ "futures-channel",
2537
+ "futures-util",
2538
+ "http",
2539
+ "http-body",
2540
+ "hyper",
2541
+ "ipnet",
2542
+ "libc",
2543
+ "percent-encoding",
2544
+ "pin-project-lite",
2545
+ "socket2",
2546
+ "system-configuration",
2547
+ "tokio",
2548
+ "tower-service",
2549
+ "tracing",
2550
+ "windows-registry",
2551
+]
2552
+
2553
+[[package]]
2554
+name = "iana-time-zone"
2555
+version = "0.1.65"
2556
+source = "registry+https://github.com/rust-lang/crates.io-index"
2557
+checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
2558
+dependencies = [
2559
+ "android_system_properties",
2560
+ "core-foundation-sys",
2561
+ "iana-time-zone-haiku",
2562
+ "js-sys",
2563
+ "log",
2564
+ "wasm-bindgen",
2565
+ "windows-core 0.62.2",
2566
+]
2567
+
2568
+[[package]]
2569
+name = "iana-time-zone-haiku"
2570
+version = "0.1.2"
2571
+source = "registry+https://github.com/rust-lang/crates.io-index"
2572
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
2573
+dependencies = [
2574
+ "cc",
2575
+]
2576
+
2577
+[[package]]
2578
+name = "icu_collections"
2579
+version = "2.2.0"
2580
+source = "registry+https://github.com/rust-lang/crates.io-index"
2581
+checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c"
2582
+dependencies = [
2583
+ "displaydoc",
2584
+ "potential_utf",
2585
+ "utf8_iter",
2586
+ "yoke 0.8.2",
2587
+ "zerofrom",
2588
+ "zerovec",
2589
+]
2590
+
2591
+[[package]]
2592
+name = "icu_locale_core"
2593
+version = "2.2.0"
2594
+source = "registry+https://github.com/rust-lang/crates.io-index"
2595
+checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29"
2596
+dependencies = [
2597
+ "displaydoc",
2598
+ "litemap",
2599
+ "tinystr",
2600
+ "writeable",
2601
+ "zerovec",
2602
+]
2603
+
2604
+[[package]]
2605
+name = "icu_normalizer"
2606
+version = "2.2.0"
2607
+source = "registry+https://github.com/rust-lang/crates.io-index"
2608
+checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4"
2609
+dependencies = [
2610
+ "icu_collections",
2611
+ "icu_normalizer_data",
2612
+ "icu_properties",
2613
+ "icu_provider",
2614
+ "smallvec 1.15.1",
2615
+ "zerovec",
2616
+]
2617
+
2618
+[[package]]
2619
+name = "icu_normalizer_data"
2620
+version = "2.2.0"
2621
+source = "registry+https://github.com/rust-lang/crates.io-index"
2622
+checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38"
2623
+
2624
+[[package]]
2625
+name = "icu_properties"
2626
+version = "2.2.0"
2627
+source = "registry+https://github.com/rust-lang/crates.io-index"
2628
+checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de"
2629
+dependencies = [
2630
+ "icu_collections",
2631
+ "icu_locale_core",
2632
+ "icu_properties_data",
2633
+ "icu_provider",
2634
+ "zerotrie",
2635
+ "zerovec",
2636
+]
2637
+
2638
+[[package]]
2639
+name = "icu_properties_data"
2640
+version = "2.2.0"
2641
+source = "registry+https://github.com/rust-lang/crates.io-index"
2642
+checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14"
2643
+
2644
+[[package]]
2645
+name = "icu_provider"
2646
+version = "2.2.0"
2647
+source = "registry+https://github.com/rust-lang/crates.io-index"
2648
+checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421"
2649
+dependencies = [
2650
+ "displaydoc",
2651
+ "icu_locale_core",
2652
+ "writeable",
2653
+ "yoke 0.8.2",
2654
+ "zerofrom",
2655
+ "zerotrie",
2656
+ "zerovec",
2657
+]
2658
+
2659
+[[package]]
2660
+name = "id-arena"
2661
+version = "2.3.0"
2662
+source = "registry+https://github.com/rust-lang/crates.io-index"
2663
+checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
2664
+
2665
+[[package]]
2666
+name = "ident_case"
2667
+version = "1.0.1"
2668
+source = "registry+https://github.com/rust-lang/crates.io-index"
2669
+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
2670
+
2671
+[[package]]
2672
+name = "idna"
2673
+version = "1.1.0"
2674
+source = "registry+https://github.com/rust-lang/crates.io-index"
2675
+checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
2676
+dependencies = [
2677
+ "idna_adapter",
2678
+ "smallvec 1.15.1",
2679
+ "utf8_iter",
2680
+]
2681
+
2682
+[[package]]
2683
+name = "idna_adapter"
2684
+version = "1.2.1"
2685
+source = "registry+https://github.com/rust-lang/crates.io-index"
2686
+checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
2687
+dependencies = [
2688
+ "icu_normalizer",
2689
+ "icu_properties",
2690
+]
2691
+
2692
+[[package]]
2693
+name = "image"
2694
+version = "0.25.10"
2695
+source = "registry+https://github.com/rust-lang/crates.io-index"
2696
+checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104"
2697
+dependencies = [
2698
+ "bytemuck",
2699
+ "byteorder-lite",
2700
+ "color_quant",
2701
+ "exr",
2702
+ "gif",
2703
+ "image-webp",
2704
+ "moxcms",
2705
+ "num-traits",
2706
+ "png",
2707
+ "qoi",
2708
+ "ravif",
2709
+ "rayon",
2710
+ "rgb",
2711
+ "tiff",
2712
+ "zune-core",
2713
+ "zune-jpeg",
2714
+]
2715
+
2716
+[[package]]
2717
+name = "image-webp"
2718
+version = "0.2.4"
2719
+source = "registry+https://github.com/rust-lang/crates.io-index"
2720
+checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3"
2721
+dependencies = [
2722
+ "byteorder-lite",
2723
+ "quick-error",
2724
+]
2725
+
2726
+[[package]]
2727
+name = "imgref"
2728
+version = "1.12.0"
2729
+source = "registry+https://github.com/rust-lang/crates.io-index"
2730
+checksum = "e7c5cedc30da3a610cac6b4ba17597bdf7152cf974e8aab3afb3d54455e371c8"
2731
+
2732
+[[package]]
2733
+name = "indexmap"
2734
+version = "1.9.3"
2735
+source = "registry+https://github.com/rust-lang/crates.io-index"
2736
+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
2737
+dependencies = [
2738
+ "autocfg",
2739
+ "hashbrown 0.12.3",
2740
+ "serde",
2741
+]
2742
+
2743
+[[package]]
2744
+name = "indexmap"
2745
+version = "2.13.1"
2746
+source = "registry+https://github.com/rust-lang/crates.io-index"
2747
+checksum = "45a8a2b9cb3e0b0c1803dbb0758ffac5de2f425b23c28f518faabd9d805342ff"
2748
+dependencies = [
2749
+ "equivalent",
2750
+ "hashbrown 0.16.1",
2751
+ "serde",
2752
+ "serde_core",
2753
+]
2754
+
2755
+[[package]]
2756
+name = "indicatif"
2757
+version = "0.17.11"
2758
+source = "registry+https://github.com/rust-lang/crates.io-index"
2759
+checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235"
2760
+dependencies = [
2761
+ "console 0.15.11",
2762
+ "number_prefix",
2763
+ "portable-atomic",
2764
+ "unicode-width 0.2.2",
2765
+ "web-time",
2766
+]
2767
+
2768
+[[package]]
2769
+name = "indicatif"
2770
+version = "0.18.4"
2771
+source = "registry+https://github.com/rust-lang/crates.io-index"
2772
+checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb"
2773
+dependencies = [
2774
+ "console 0.16.3",
2775
+ "portable-atomic",
2776
+ "rayon",
2777
+ "unicode-width 0.2.2",
2778
+ "unit-prefix",
2779
+ "web-time",
2780
+]
2781
+
2782
+[[package]]
2783
+name = "interpolate_name"
2784
+version = "0.2.4"
2785
+source = "registry+https://github.com/rust-lang/crates.io-index"
2786
+checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
2787
+dependencies = [
2788
+ "proc-macro2",
2789
+ "quote",
2790
+ "syn 2.0.117",
2791
+]
2792
+
2793
+[[package]]
2794
+name = "interprocess"
2795
+version = "2.4.0"
2796
+source = "registry+https://github.com/rust-lang/crates.io-index"
2797
+checksum = "6be5e5c847dbdb44564bd85294740d031f4f8aeb3464e5375ef7141f7538db69"
2798
+dependencies = [
2799
+ "doctest-file",
2800
+ "libc",
2801
+ "recvmsg",
2802
+ "widestring",
2803
+ "windows-sys 0.52.0",
2804
+]
2805
+
2806
+[[package]]
2807
+name = "ipnet"
2808
+version = "2.12.0"
2809
+source = "registry+https://github.com/rust-lang/crates.io-index"
2810
+checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
2811
+
2812
+[[package]]
2813
+name = "iri-string"
2814
+version = "0.7.12"
2815
+source = "registry+https://github.com/rust-lang/crates.io-index"
2816
+checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20"
2817
+dependencies = [
2818
+ "memchr",
2819
+ "serde",
2820
+]
2821
+
2822
+[[package]]
2823
+name = "is_terminal_polyfill"
2824
+version = "1.70.2"
2825
+source = "registry+https://github.com/rust-lang/crates.io-index"
2826
+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
2827
+
2828
+[[package]]
2829
+name = "itertools"
2830
+version = "0.14.0"
2831
+source = "registry+https://github.com/rust-lang/crates.io-index"
2832
+checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
2833
+dependencies = [
2834
+ "either",
2835
+]
2836
+
2837
+[[package]]
2838
+name = "itoa"
2839
+version = "1.0.18"
2840
+source = "registry+https://github.com/rust-lang/crates.io-index"
2841
+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
2842
+
2843
+[[package]]
2844
+name = "jni"
2845
+version = "0.21.1"
2846
+source = "registry+https://github.com/rust-lang/crates.io-index"
2847
+checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"
2848
+dependencies = [
2849
+ "cesu8",
2850
+ "cfg-if",
2851
+ "combine",
2852
+ "jni-sys 0.3.1",
2853
+ "log",
2854
+ "thiserror 1.0.69",
2855
+ "walkdir",
2856
+ "windows-sys 0.45.0",
2857
+]
2858
+
2859
+[[package]]
2860
+name = "jni-sys"
2861
+version = "0.3.1"
2862
+source = "registry+https://github.com/rust-lang/crates.io-index"
2863
+checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258"
2864
+dependencies = [
2865
+ "jni-sys 0.4.1",
2866
+]
2867
+
2868
+[[package]]
2869
+name = "jni-sys"
2870
+version = "0.4.1"
2871
+source = "registry+https://github.com/rust-lang/crates.io-index"
2872
+checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2"
2873
+dependencies = [
2874
+ "jni-sys-macros",
2875
+]
2876
+
2877
+[[package]]
2878
+name = "jni-sys-macros"
2879
+version = "0.4.1"
2880
+source = "registry+https://github.com/rust-lang/crates.io-index"
2881
+checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264"
2882
+dependencies = [
2883
+ "quote",
2884
+ "syn 2.0.117",
2885
+]
2886
+
2887
+[[package]]
2888
+name = "jobserver"
2889
+version = "0.1.34"
2890
+source = "registry+https://github.com/rust-lang/crates.io-index"
2891
+checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
2892
+dependencies = [
2893
+ "getrandom 0.3.4",
2894
+ "libc",
2895
+]
2896
+
2897
+[[package]]
2898
+name = "js-sys"
2899
+version = "0.3.94"
2900
+source = "registry+https://github.com/rust-lang/crates.io-index"
2901
+checksum = "2e04e2ef80ce82e13552136fabeef8a5ed1f985a96805761cbb9a2c34e7664d9"
2902
+dependencies = [
2903
+ "cfg-if",
2904
+ "futures-util",
2905
+ "once_cell",
2906
+ "wasm-bindgen",
2907
+]
2908
+
2909
+[[package]]
2910
+name = "lazy_static"
2911
+version = "1.5.0"
2912
+source = "registry+https://github.com/rust-lang/crates.io-index"
2913
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
2914
+
2915
+[[package]]
2916
+name = "leb128fmt"
2917
+version = "0.1.0"
2918
+source = "registry+https://github.com/rust-lang/crates.io-index"
2919
+checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
2920
+
2921
+[[package]]
2922
+name = "lebe"
2923
+version = "0.5.3"
2924
+source = "registry+https://github.com/rust-lang/crates.io-index"
2925
+checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8"
2926
+
2927
+[[package]]
2928
+name = "libc"
2929
+version = "0.2.184"
2930
+source = "registry+https://github.com/rust-lang/crates.io-index"
2931
+checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af"
2932
+
2933
+[[package]]
2934
+name = "libfuzzer-sys"
2935
+version = "0.4.12"
2936
+source = "registry+https://github.com/rust-lang/crates.io-index"
2937
+checksum = "f12a681b7dd8ce12bff52488013ba614b869148d54dd79836ab85aafdd53f08d"
2938
+dependencies = [
2939
+ "arbitrary",
2940
+ "cc",
2941
+]
2942
+
2943
+[[package]]
2944
+name = "libloading"
2945
+version = "0.8.9"
2946
+source = "registry+https://github.com/rust-lang/crates.io-index"
2947
+checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
2948
+dependencies = [
2949
+ "cfg-if",
2950
+ "windows-link 0.2.1",
2951
+]
2952
+
2953
+[[package]]
2954
+name = "libm"
2955
+version = "0.2.16"
2956
+source = "registry+https://github.com/rust-lang/crates.io-index"
2957
+checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
2958
+
2959
+[[package]]
2960
+name = "libredox"
2961
+version = "0.1.15"
2962
+source = "registry+https://github.com/rust-lang/crates.io-index"
2963
+checksum = "7ddbf48fd451246b1f8c2610bd3b4ac0cc6e149d89832867093ab69a17194f08"
2964
+dependencies = [
2965
+ "libc",
2966
+]
2967
+
2968
+[[package]]
2969
+name = "linux-raw-sys"
2970
+version = "0.12.1"
2971
+source = "registry+https://github.com/rust-lang/crates.io-index"
2972
+checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
2973
+
2974
+[[package]]
2975
+name = "litemap"
2976
+version = "0.8.2"
2977
+source = "registry+https://github.com/rust-lang/crates.io-index"
2978
+checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
2979
+
2980
+[[package]]
2981
+name = "llguidance"
2982
+version = "1.7.0"
2983
+source = "registry+https://github.com/rust-lang/crates.io-index"
2984
+checksum = "586ccb282d83fe337ddad2e28bb11bb258a462caa80e117fc76a6c73dac919e4"
2985
+dependencies = [
2986
+ "anyhow",
2987
+ "derivre",
2988
+ "indexmap 2.13.1",
2989
+ "regex-syntax",
2990
+ "serde",
2991
+ "serde_json",
2992
+ "toktrie",
2993
+]
2994
+
2995
+[[package]]
2996
+name = "lock_api"
2997
+version = "0.4.14"
2998
+source = "registry+https://github.com/rust-lang/crates.io-index"
2999
+checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
3000
+dependencies = [
3001
+ "scopeguard",
3002
+]
3003
+
3004
+[[package]]
3005
+name = "log"
3006
+version = "0.4.29"
3007
+source = "registry+https://github.com/rust-lang/crates.io-index"
3008
+checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
3009
+
3010
+[[package]]
3011
+name = "loom"
3012
+version = "0.5.6"
3013
+source = "registry+https://github.com/rust-lang/crates.io-index"
3014
+checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5"
3015
+dependencies = [
3016
+ "cfg-if",
3017
+ "generator",
3018
+ "scoped-tls",
3019
+ "serde",
3020
+ "serde_json",
3021
+ "tracing",
3022
+ "tracing-subscriber",
3023
+]
3024
+
3025
+[[package]]
3026
+name = "loop9"
3027
+version = "0.1.5"
3028
+source = "registry+https://github.com/rust-lang/crates.io-index"
3029
+checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"
3030
+dependencies = [
3031
+ "imgref",
3032
+]
3033
+
3034
+[[package]]
3035
+name = "lrtable"
3036
+version = "0.14.1"
3037
+source = "registry+https://github.com/rust-lang/crates.io-index"
3038
+checksum = "b15ad6a43e5cff4ac046d51281d2256a36d1440065eab53ccce9362b48db5b42"
3039
+dependencies = [
3040
+ "cfgrammar",
3041
+ "fnv",
3042
+ "num-traits",
3043
+ "sparsevec",
3044
+ "vob",
3045
+]
3046
+
3047
+[[package]]
3048
+name = "lru-slab"
3049
+version = "0.1.2"
3050
+source = "registry+https://github.com/rust-lang/crates.io-index"
3051
+checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
3052
+
3053
+[[package]]
3054
+name = "mac"
3055
+version = "0.1.1"
3056
+source = "registry+https://github.com/rust-lang/crates.io-index"
3057
+checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
3058
+
3059
+[[package]]
3060
+name = "macro_rules_attribute"
3061
+version = "0.2.2"
3062
+source = "registry+https://github.com/rust-lang/crates.io-index"
3063
+checksum = "65049d7923698040cd0b1ddcced9b0eb14dd22c5f86ae59c3740eab64a676520"
3064
+dependencies = [
3065
+ "macro_rules_attribute-proc_macro",
3066
+ "paste",
3067
+]
3068
+
3069
+[[package]]
3070
+name = "macro_rules_attribute-proc_macro"
3071
+version = "0.2.2"
3072
+source = "registry+https://github.com/rust-lang/crates.io-index"
3073
+checksum = "670fdfda89751bc4a84ac13eaa63e205cf0fd22b4c9a5fbfa085b63c1f1d3a30"
3074
+
3075
+[[package]]
3076
+name = "malloc_buf"
3077
+version = "0.0.6"
3078
+source = "registry+https://github.com/rust-lang/crates.io-index"
3079
+checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
3080
+dependencies = [
3081
+ "libc",
3082
+]
3083
+
3084
+[[package]]
3085
+name = "markup5ever"
3086
+version = "0.36.1"
3087
+source = "registry+https://github.com/rust-lang/crates.io-index"
3088
+checksum = "6c3294c4d74d0742910f8c7b466f44dda9eb2d5742c1e430138df290a1e8451c"
3089
+dependencies = [
3090
+ "log",
3091
+ "tendril 0.4.3",
3092
+ "web_atoms",
3093
+]
3094
+
3095
+[[package]]
3096
+name = "markup5ever"
3097
+version = "0.38.0"
3098
+source = "registry+https://github.com/rust-lang/crates.io-index"
3099
+checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862"
3100
+dependencies = [
3101
+ "log",
3102
+ "tendril 0.5.0",
3103
+ "web_atoms",
3104
+]
3105
+
3106
+[[package]]
3107
+name = "matchers"
3108
+version = "0.2.0"
3109
+source = "registry+https://github.com/rust-lang/crates.io-index"
3110
+checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
3111
+dependencies = [
3112
+ "regex-automata",
3113
+]
3114
+
3115
+[[package]]
3116
+name = "matrixmultiply"
3117
+version = "0.3.10"
3118
+source = "registry+https://github.com/rust-lang/crates.io-index"
3119
+checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08"
3120
+dependencies = [
3121
+ "autocfg",
3122
+ "rawpointer",
3123
+]
3124
+
3125
+[[package]]
3126
+name = "maybe-rayon"
3127
+version = "0.1.1"
3128
+source = "registry+https://github.com/rust-lang/crates.io-index"
3129
+checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
3130
+dependencies = [
3131
+ "cfg-if",
3132
+ "rayon",
3133
+]
3134
+
3135
+[[package]]
3136
+name = "md-5"
3137
+version = "0.10.6"
3138
+source = "registry+https://github.com/rust-lang/crates.io-index"
3139
+checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
3140
+dependencies = [
3141
+ "cfg-if",
3142
+ "digest",
3143
+]
3144
+
3145
+[[package]]
3146
+name = "memchr"
3147
+version = "2.8.0"
3148
+source = "registry+https://github.com/rust-lang/crates.io-index"
3149
+checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
3150
+
3151
+[[package]]
3152
+name = "memmap2"
3153
+version = "0.9.10"
3154
+source = "registry+https://github.com/rust-lang/crates.io-index"
3155
+checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3"
3156
+dependencies = [
3157
+ "libc",
3158
+ "stable_deref_trait",
3159
+]
3160
+
3161
+[[package]]
3162
+name = "memo-map"
3163
+version = "0.3.3"
3164
+source = "registry+https://github.com/rust-lang/crates.io-index"
3165
+checksum = "38d1115007560874e373613744c6fba374c17688327a71c1476d1a5954cc857b"
3166
+
3167
+[[package]]
3168
+name = "metal"
3169
+version = "0.29.0"
3170
+source = "registry+https://github.com/rust-lang/crates.io-index"
3171
+checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21"
3172
+dependencies = [
3173
+ "bitflags 2.11.0",
3174
+ "block",
3175
+ "core-graphics-types",
3176
+ "foreign-types",
3177
+ "log",
3178
+ "objc",
3179
+ "paste",
3180
+]
3181
+
3182
+[[package]]
3183
+name = "mime"
3184
+version = "0.3.17"
3185
+source = "registry+https://github.com/rust-lang/crates.io-index"
3186
+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
3187
+
3188
+[[package]]
3189
+name = "mime_guess"
3190
+version = "2.0.5"
3191
+source = "registry+https://github.com/rust-lang/crates.io-index"
3192
+checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
3193
+dependencies = [
3194
+ "mime",
3195
+ "unicase",
3196
+]
3197
+
3198
+[[package]]
3199
+name = "minijinja"
3200
+version = "2.19.0"
3201
+source = "registry+https://github.com/rust-lang/crates.io-index"
3202
+checksum = "805bfd7352166bae857ee569628b52bcd85a1cecf7810861ebceb1686b72b75d"
3203
+dependencies = [
3204
+ "memo-map",
3205
+ "serde",
3206
+ "serde_json",
3207
+]
3208
+
3209
+[[package]]
3210
+name = "minijinja-contrib"
3211
+version = "2.19.0"
3212
+source = "registry+https://github.com/rust-lang/crates.io-index"
3213
+checksum = "45092d80391870622fcf3bd82f5d2af18f99533ea60debb4bc9db0c76f0e809a"
3214
+dependencies = [
3215
+ "minijinja",
3216
+ "serde",
3217
+]
3218
+
3219
+[[package]]
3220
+name = "minimal-lexical"
3221
+version = "0.2.1"
3222
+source = "registry+https://github.com/rust-lang/crates.io-index"
3223
+checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
3224
+
3225
+[[package]]
3226
+name = "miniz_oxide"
3227
+version = "0.8.9"
3228
+source = "registry+https://github.com/rust-lang/crates.io-index"
3229
+checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
3230
+dependencies = [
3231
+ "adler2",
3232
+ "simd-adler32",
3233
+]
3234
+
3235
+[[package]]
3236
+name = "mio"
3237
+version = "0.8.11"
3238
+source = "registry+https://github.com/rust-lang/crates.io-index"
3239
+checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
3240
+dependencies = [
3241
+ "libc",
3242
+ "log",
3243
+ "wasi",
3244
+ "windows-sys 0.48.0",
3245
+]
3246
+
3247
+[[package]]
3248
+name = "mio"
3249
+version = "1.2.0"
3250
+source = "registry+https://github.com/rust-lang/crates.io-index"
3251
+checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
3252
+dependencies = [
3253
+ "libc",
3254
+ "wasi",
3255
+ "windows-sys 0.61.2",
3256
+]
3257
+
3258
+[[package]]
3259
+name = "mistralrs"
3260
+version = "0.8.1"
3261
+source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#4541811996402560f67d93d434885320d9c8516b"
3262
+dependencies = [
3263
+ "anyhow",
3264
+ "candle-core",
3265
+ "candle-nn",
3266
+ "clap 4.6.0",
3267
+ "either",
3268
+ "futures",
3269
+ "image",
3270
+ "indexmap 2.13.1",
3271
+ "mistralrs-core",
3272
+ "mistralrs-macros",
3273
+ "rand 0.9.2",
3274
+ "reqwest 0.13.2",
3275
+ "schemars 1.2.1",
3276
+ "serde",
3277
+ "serde_json",
3278
+ "thiserror 2.0.18",
3279
+ "tokio",
3280
+ "tracing",
3281
+ "tracing-subscriber",
3282
+ "walkdir",
3283
+]
3284
+
3285
+[[package]]
3286
+name = "mistralrs-audio"
3287
+version = "0.8.1"
3288
+source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#4541811996402560f67d93d434885320d9c8516b"
3289
+dependencies = [
3290
+ "anyhow",
3291
+ "apodize",
3292
+ "hound",
3293
+ "symphonia",
3294
+]
3295
+
3296
+[[package]]
3297
+name = "mistralrs-core"
3298
+version = "0.8.1"
3299
+source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#4541811996402560f67d93d434885320d9c8516b"
3300
+dependencies = [
3301
+ "ahash",
3302
+ "akin",
3303
+ "anyhow",
3304
+ "apodize",
3305
+ "as-any",
3306
+ "async-trait",
3307
+ "base64 0.22.1",
3308
+ "bm25",
3309
+ "bytemuck",
3310
+ "bytemuck_derive",
3311
+ "candle-core",
3312
+ "candle-metal-kernels",
3313
+ "candle-nn",
3314
+ "cfgrammar",
3315
+ "chrono",
3316
+ "clap 4.6.0",
3317
+ "csv",
3318
+ "derive-new",
3319
+ "derive_more",
3320
+ "dirs",
3321
+ "either",
3322
+ "float8",
3323
+ "futures",
3324
+ "galil-seiferas",
3325
+ "half",
3326
+ "hashbrown 0.16.1",
3327
+ "hf-hub",
3328
+ "hound",
3329
+ "html2text",
3330
+ "http",
3331
+ "image",
3332
+ "indexmap 2.13.1",
3333
+ "indicatif 0.18.4",
3334
+ "interprocess",
3335
+ "itertools",
3336
+ "libc",
3337
+ "llguidance",
3338
+ "lrtable",
3339
+ "minijinja",
3340
+ "minijinja-contrib",
3341
+ "mistralrs-audio",
3342
+ "mistralrs-mcp",
3343
+ "mistralrs-paged-attn",
3344
+ "mistralrs-quant",
3345
+ "mistralrs-vision",
3346
+ "num-traits",
3347
+ "objc",
3348
+ "objc2-metal",
3349
+ "openai-harmony",
3350
+ "ordered-float",
3351
+ "parking_lot",
3352
+ "radix_trie",
3353
+ "rand 0.9.2",
3354
+ "rand_distr 0.5.1",
3355
+ "rand_isaac",
3356
+ "rayon",
3357
+ "regex",
3358
+ "regex-automata",
3359
+ "reqwest 0.13.2",
3360
+ "rubato",
3361
+ "rust-mcp-schema",
3362
+ "rustc-hash 2.1.2",
3363
+ "rustfft",
3364
+ "safetensors 0.7.0",
3365
+ "schemars 1.2.1",
3366
+ "scraper",
3367
+ "serde",
3368
+ "serde-big-array",
3369
+ "serde-saphyr",
3370
+ "serde_json",
3371
+ "serde_plain",
3372
+ "statrs",
3373
+ "strum",
3374
+ "symphonia",
3375
+ "sysinfo",
3376
+ "thiserror 2.0.18",
3377
+ "tokenizers 0.21.4",
3378
+ "tokio",
3379
+ "tokio-rayon",
3380
+ "tokio-tungstenite",
3381
+ "toktrie",
3382
+ "toktrie_hf_tokenizers",
3383
+ "toml",
3384
+ "tqdm",
3385
+ "tracing",
3386
+ "tracing-subscriber",
3387
+ "urlencoding",
3388
+ "uuid 1.23.0",
3389
+ "variantly",
3390
+ "vob",
3391
+]
3392
+
3393
+[[package]]
3394
+name = "mistralrs-macros"
3395
+version = "0.8.1"
3396
+source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#4541811996402560f67d93d434885320d9c8516b"
3397
+dependencies = [
3398
+ "darling 0.23.0",
3399
+ "proc-macro2",
3400
+ "quote",
3401
+ "syn 2.0.117",
3402
+]
3403
+
3404
+[[package]]
3405
+name = "mistralrs-mcp"
3406
+version = "0.8.1"
3407
+source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#4541811996402560f67d93d434885320d9c8516b"
3408
+dependencies = [
3409
+ "anyhow",
3410
+ "async-trait",
3411
+ "futures-util",
3412
+ "http",
3413
+ "reqwest 0.13.2",
3414
+ "rust-mcp-schema",
3415
+ "serde",
3416
+ "serde_json",
3417
+ "tokio",
3418
+ "tokio-tungstenite",
3419
+ "tracing",
3420
+ "utoipa",
3421
+ "uuid 1.23.0",
3422
+]
3423
+
3424
+[[package]]
3425
+name = "mistralrs-paged-attn"
3426
+version = "0.8.1"
3427
+source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#4541811996402560f67d93d434885320d9c8516b"
3428
+dependencies = [
3429
+ "anyhow",
3430
+ "candle-core",
3431
+ "candle-metal-kernels",
3432
+ "dispatch2",
3433
+ "float8",
3434
+ "half",
3435
+ "objc2-foundation",
3436
+ "objc2-metal",
3437
+ "thiserror 2.0.18",
3438
+]
3439
+
3440
+[[package]]
3441
+name = "mistralrs-quant"
3442
+version = "0.8.1"
3443
+source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#4541811996402560f67d93d434885320d9c8516b"
3444
+dependencies = [
3445
+ "byteorder",
3446
+ "candle-core",
3447
+ "candle-metal-kernels",
3448
+ "candle-nn",
3449
+ "dispatch2",
3450
+ "float8",
3451
+ "half",
3452
+ "hf-hub",
3453
+ "lazy_static",
3454
+ "memmap2",
3455
+ "objc2-foundation",
3456
+ "objc2-metal",
3457
+ "paste",
3458
+ "rayon",
3459
+ "regex",
3460
+ "safetensors 0.7.0",
3461
+ "serde",
3462
+ "serde_json",
3463
+ "thiserror 2.0.18",
3464
+ "tokio",
3465
+ "tracing",
3466
+ "yoke 0.8.2",
3467
+]
3468
+
3469
+[[package]]
3470
+name = "mistralrs-vision"
3471
+version = "0.8.1"
3472
+source = "git+https://github.com/setoelkahfi/mistral.rs?branch=fix%2Fall-platform-fixes#4541811996402560f67d93d434885320d9c8516b"
3473
+dependencies = [
3474
+ "candle-core",
3475
+ "image",
3476
+ "rayon",
3477
+]
3478
+
3479
+[[package]]
3480
+name = "monostate"
3481
+version = "0.1.18"
3482
+source = "registry+https://github.com/rust-lang/crates.io-index"
3483
+checksum = "3341a273f6c9d5bef1908f17b7267bbab0e95c9bf69a0d4dcf8e9e1b2c76ef67"
3484
+dependencies = [
3485
+ "monostate-impl",
3486
+ "serde",
3487
+ "serde_core",
3488
+]
3489
+
3490
+[[package]]
3491
+name = "monostate-impl"
3492
+version = "0.1.18"
3493
+source = "registry+https://github.com/rust-lang/crates.io-index"
3494
+checksum = "e4db6d5580af57bf992f59068d4ea26fd518574ff48d7639b255a36f9de6e7e9"
3495
+dependencies = [
3496
+ "proc-macro2",
3497
+ "quote",
3498
+ "syn 2.0.117",
3499
+]
3500
+
3501
+[[package]]
3502
+name = "moxcms"
3503
+version = "0.8.1"
3504
+source = "registry+https://github.com/rust-lang/crates.io-index"
3505
+checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b"
3506
+dependencies = [
3507
+ "num-traits",
3508
+ "pxfm",
3509
+]
3510
+
3511
+[[package]]
3512
+name = "nalgebra"
3513
+version = "0.33.3"
3514
+source = "registry+https://github.com/rust-lang/crates.io-index"
3515
+checksum = "9d43ddcacf343185dfd6de2ee786d9e8b1c2301622afab66b6c73baf9882abfd"
3516
+dependencies = [
3517
+ "approx",
3518
+ "matrixmultiply",
3519
+ "num-complex",
3520
+ "num-rational",
3521
+ "num-traits",
3522
+ "rand 0.8.5",
3523
+ "rand_distr 0.4.3",
3524
+ "simba",
3525
+ "typenum",
3526
+]
3527
+
3528
+[[package]]
3529
+name = "new_debug_unreachable"
3530
+version = "1.0.6"
3531
+source = "registry+https://github.com/rust-lang/crates.io-index"
3532
+checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
3533
+
3534
+[[package]]
3535
+name = "nibble_vec"
3536
+version = "0.1.0"
3537
+source = "registry+https://github.com/rust-lang/crates.io-index"
3538
+checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43"
3539
+dependencies = [
3540
+ "smallvec 1.15.1",
3541
+]
3542
+
3543
+[[package]]
3544
+name = "nohash-hasher"
3545
+version = "0.2.0"
3546
+source = "registry+https://github.com/rust-lang/crates.io-index"
3547
+checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
3548
+
3549
+[[package]]
3550
+name = "nom"
3551
+version = "7.1.3"
3552
+source = "registry+https://github.com/rust-lang/crates.io-index"
3553
+checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
3554
+dependencies = [
3555
+ "memchr",
3556
+ "minimal-lexical",
3557
+]
3558
+
3559
+[[package]]
3560
+name = "nom"
3561
+version = "8.0.0"
3562
+source = "registry+https://github.com/rust-lang/crates.io-index"
3563
+checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405"
3564
+dependencies = [
3565
+ "memchr",
3566
+]
3567
+
3568
+[[package]]
3569
+name = "noop_proc_macro"
3570
+version = "0.3.0"
3571
+source = "registry+https://github.com/rust-lang/crates.io-index"
3572
+checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
3573
+
3574
+[[package]]
3575
+name = "ntapi"
3576
+version = "0.4.3"
3577
+source = "registry+https://github.com/rust-lang/crates.io-index"
3578
+checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae"
3579
+dependencies = [
3580
+ "winapi",
3581
+]
3582
+
3583
+[[package]]
3584
+name = "nu-ansi-term"
3585
+version = "0.50.3"
3586
+source = "registry+https://github.com/rust-lang/crates.io-index"
3587
+checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
3588
+dependencies = [
3589
+ "windows-sys 0.61.2",
3590
+]
3591
+
3592
+[[package]]
3593
+name = "num"
3594
+version = "0.4.3"
3595
+source = "registry+https://github.com/rust-lang/crates.io-index"
3596
+checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23"
3597
+dependencies = [
3598
+ "num-bigint",
3599
+ "num-complex",
3600
+ "num-integer",
3601
+ "num-iter",
3602
+ "num-rational",
3603
+ "num-traits",
3604
+]
3605
+
3606
+[[package]]
3607
+name = "num-bigint"
3608
+version = "0.4.6"
3609
+source = "registry+https://github.com/rust-lang/crates.io-index"
3610
+checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
3611
+dependencies = [
3612
+ "num-integer",
3613
+ "num-traits",
3614
+]
3615
+
3616
+[[package]]
3617
+name = "num-complex"
3618
+version = "0.4.6"
3619
+source = "registry+https://github.com/rust-lang/crates.io-index"
3620
+checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
3621
+dependencies = [
3622
+ "bytemuck",
3623
+ "num-traits",
3624
+]
3625
+
3626
+[[package]]
3627
+name = "num-conv"
3628
+version = "0.2.1"
3629
+source = "registry+https://github.com/rust-lang/crates.io-index"
3630
+checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967"
3631
+
3632
+[[package]]
3633
+name = "num-derive"
3634
+version = "0.4.2"
3635
+source = "registry+https://github.com/rust-lang/crates.io-index"
3636
+checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
3637
+dependencies = [
3638
+ "proc-macro2",
3639
+ "quote",
3640
+ "syn 2.0.117",
3641
+]
3642
+
3643
+[[package]]
3644
+name = "num-integer"
3645
+version = "0.1.46"
3646
+source = "registry+https://github.com/rust-lang/crates.io-index"
3647
+checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
3648
+dependencies = [
3649
+ "num-traits",
3650
+]
3651
+
3652
+[[package]]
3653
+name = "num-iter"
3654
+version = "0.1.45"
3655
+source = "registry+https://github.com/rust-lang/crates.io-index"
3656
+checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
3657
+dependencies = [
3658
+ "autocfg",
3659
+ "num-integer",
3660
+ "num-traits",
3661
+]
3662
+
3663
+[[package]]
3664
+name = "num-rational"
3665
+version = "0.4.2"
3666
+source = "registry+https://github.com/rust-lang/crates.io-index"
3667
+checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
3668
+dependencies = [
3669
+ "num-bigint",
3670
+ "num-integer",
3671
+ "num-traits",
3672
+]
3673
+
3674
+[[package]]
3675
+name = "num-traits"
3676
+version = "0.2.19"
3677
+source = "registry+https://github.com/rust-lang/crates.io-index"
3678
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
3679
+dependencies = [
3680
+ "autocfg",
3681
+ "libm",
3682
+]
3683
+
3684
+[[package]]
3685
+name = "num_cpus"
3686
+version = "1.17.0"
3687
+source = "registry+https://github.com/rust-lang/crates.io-index"
3688
+checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b"
3689
+dependencies = [
3690
+ "hermit-abi 0.5.2",
3691
+ "libc",
3692
+]
3693
+
3694
+[[package]]
3695
+name = "number_prefix"
3696
+version = "0.4.0"
3697
+source = "registry+https://github.com/rust-lang/crates.io-index"
3698
+checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
3699
+
3700
+[[package]]
3701
+name = "objc"
3702
+version = "0.2.7"
3703
+source = "registry+https://github.com/rust-lang/crates.io-index"
3704
+checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1"
3705
+dependencies = [
3706
+ "malloc_buf",
3707
+]
3708
+
3709
+[[package]]
3710
+name = "objc2"
3711
+version = "0.6.4"
3712
+source = "registry+https://github.com/rust-lang/crates.io-index"
3713
+checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f"
3714
+dependencies = [
3715
+ "objc2-encode",
3716
+]
3717
+
3718
+[[package]]
3719
+name = "objc2-core-foundation"
3720
+version = "0.3.2"
3721
+source = "registry+https://github.com/rust-lang/crates.io-index"
3722
+checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
3723
+dependencies = [
3724
+ "bitflags 2.11.0",
3725
+ "dispatch2",
3726
+ "objc2",
3727
+]
3728
+
3729
+[[package]]
3730
+name = "objc2-encode"
3731
+version = "4.1.0"
3732
+source = "registry+https://github.com/rust-lang/crates.io-index"
3733
+checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"
3734
+
3735
+[[package]]
3736
+name = "objc2-foundation"
3737
+version = "0.3.2"
3738
+source = "registry+https://github.com/rust-lang/crates.io-index"
3739
+checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"
3740
+dependencies = [
3741
+ "bitflags 2.11.0",
3742
+ "block2",
3743
+ "libc",
3744
+ "objc2",
3745
+ "objc2-core-foundation",
3746
+]
3747
+
3748
+[[package]]
3749
+name = "objc2-io-kit"
3750
+version = "0.3.2"
3751
+source = "registry+https://github.com/rust-lang/crates.io-index"
3752
+checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15"
3753
+dependencies = [
3754
+ "libc",
3755
+ "objc2-core-foundation",
3756
+]
3757
+
3758
+[[package]]
3759
+name = "objc2-metal"
3760
+version = "0.3.2"
3761
+source = "registry+https://github.com/rust-lang/crates.io-index"
3762
+checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794"
3763
+dependencies = [
3764
+ "bitflags 2.11.0",
3765
+ "block2",
3766
+ "dispatch2",
3767
+ "objc2",
3768
+ "objc2-core-foundation",
3769
+ "objc2-foundation",
3770
+]
3771
+
3772
+[[package]]
3773
+name = "object"
3774
+version = "0.37.3"
3775
+source = "registry+https://github.com/rust-lang/crates.io-index"
3776
+checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
3777
+dependencies = [
3778
+ "memchr",
3779
+]
3780
+
3781
+[[package]]
3782
+name = "once_cell"
3783
+version = "1.21.4"
3784
+source = "registry+https://github.com/rust-lang/crates.io-index"
3785
+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
3786
+
3787
+[[package]]
3788
+name = "once_cell_polyfill"
3789
+version = "1.70.2"
3790
+source = "registry+https://github.com/rust-lang/crates.io-index"
3791
+checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
3792
+
3793
+[[package]]
3794
+name = "onde"
3795
+version = "0.1.0"
3796
+dependencies = [
3797
+ "anyhow",
3798
+ "cc",
3799
+ "hf-hub",
3800
+ "home",
3801
+ "log",
3802
+ "mistralrs",
3803
+ "mistralrs-core",
3804
+ "serde",
3805
+ "thiserror 2.0.18",
3806
+ "tokio",
3807
+ "tsync",
3808
+ "uniffi",
3809
+]
3810
+
3811
+[[package]]
3812
+name = "onde_inference_dart"
3813
+version = "0.1.0"
3814
+dependencies = [
3815
+ "flutter_rust_bridge",
3816
+ "log",
3817
+ "onde",
3818
+ "thiserror 2.0.18",
3819
+ "tokio",
3820
+]
3821
+
3822
+[[package]]
3823
+name = "onig"
3824
+version = "6.5.1"
3825
+source = "registry+https://github.com/rust-lang/crates.io-index"
3826
+checksum = "336b9c63443aceef14bea841b899035ae3abe89b7c486aaf4c5bd8aafedac3f0"
3827
+dependencies = [
3828
+ "bitflags 2.11.0",
3829
+ "libc",
3830
+ "once_cell",
3831
+ "onig_sys",
3832
+]
3833
+
3834
+[[package]]
3835
+name = "onig_sys"
3836
+version = "69.9.1"
3837
+source = "registry+https://github.com/rust-lang/crates.io-index"
3838
+checksum = "c7f86c6eef3d6df15f23bcfb6af487cbd2fed4e5581d58d5bf1f5f8b7f6727dc"
3839
+dependencies = [
3840
+ "cc",
3841
+ "pkg-config",
3842
+]
3843
+
3844
+[[package]]
3845
+name = "openai-harmony"
3846
+version = "0.0.8"
3847
+source = "registry+https://github.com/rust-lang/crates.io-index"
3848
+checksum = "e77e82af451fc95deeb728a40b84db8ee82d341e136c268de415123a560b9b72"
3849
+dependencies = [
3850
+ "anyhow",
3851
+ "base64 0.22.1",
3852
+ "bstr",
3853
+ "clap 4.6.0",
3854
+ "fancy-regex 0.13.0",
3855
+ "futures",
3856
+ "image",
3857
+ "regex",
3858
+ "reqwest 0.12.28",
3859
+ "rustc-hash 1.1.0",
3860
+ "serde",
3861
+ "serde_json",
3862
+ "serde_with",
3863
+ "sha1",
3864
+ "sha2",
3865
+ "thiserror 2.0.18",
3866
+]
3867
+
3868
+[[package]]
3869
+name = "openssl-probe"
3870
+version = "0.2.1"
3871
+source = "registry+https://github.com/rust-lang/crates.io-index"
3872
+checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
3873
+
3874
+[[package]]
3875
+name = "option-ext"
3876
+version = "0.2.0"
3877
+source = "registry+https://github.com/rust-lang/crates.io-index"
3878
+checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
3879
+
3880
+[[package]]
3881
+name = "ordered-float"
3882
+version = "5.3.0"
3883
+source = "registry+https://github.com/rust-lang/crates.io-index"
3884
+checksum = "b7d950ca161dc355eaf28f82b11345ed76c6e1f6eb1f4f4479e0323b9e2fbd0e"
3885
+dependencies = [
3886
+ "num-traits",
3887
+]
3888
+
3889
+[[package]]
3890
+name = "oslog"
3891
+version = "0.2.0"
3892
+source = "registry+https://github.com/rust-lang/crates.io-index"
3893
+checksum = "80d2043d1f61d77cb2f4b1f7b7b2295f40507f5f8e9d1c8bf10a1ca5f97a3969"
3894
+dependencies = [
3895
+ "cc",
3896
+ "dashmap",
3897
+ "log",
3898
+]
3899
+
3900
+[[package]]
3901
+name = "packedvec"
3902
+version = "1.2.5"
3903
+source = "registry+https://github.com/rust-lang/crates.io-index"
3904
+checksum = "a69e0a534dd2e6aefce319af62a0aa0066a76bdfcec0201dfe02df226bc9ec70"
3905
+dependencies = [
3906
+ "num-traits",
3907
+]
3908
+
3909
+[[package]]
3910
+name = "parking_lot"
3911
+version = "0.12.5"
3912
+source = "registry+https://github.com/rust-lang/crates.io-index"
3913
+checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
3914
+dependencies = [
3915
+ "lock_api",
3916
+ "parking_lot_core",
3917
+]
3918
+
3919
+[[package]]
3920
+name = "parking_lot_core"
3921
+version = "0.9.12"
3922
+source = "registry+https://github.com/rust-lang/crates.io-index"
3923
+checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
3924
+dependencies = [
3925
+ "cfg-if",
3926
+ "libc",
3927
+ "redox_syscall",
3928
+ "smallvec 1.15.1",
3929
+ "windows-link 0.2.1",
3930
+]
3931
+
3932
+[[package]]
3933
+name = "paste"
3934
+version = "1.0.15"
3935
+source = "registry+https://github.com/rust-lang/crates.io-index"
3936
+checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
3937
+
3938
+[[package]]
3939
+name = "pastey"
3940
+version = "0.1.1"
3941
+source = "registry+https://github.com/rust-lang/crates.io-index"
3942
+checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec"
3943
+
3944
+[[package]]
3945
+name = "percent-encoding"
3946
+version = "2.3.2"
3947
+source = "registry+https://github.com/rust-lang/crates.io-index"
3948
+checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
3949
+
3950
+[[package]]
3951
+name = "phf"
3952
+version = "0.13.1"
3953
+source = "registry+https://github.com/rust-lang/crates.io-index"
3954
+checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"
3955
+dependencies = [
3956
+ "phf_macros",
3957
+ "phf_shared",
3958
+ "serde",
3959
+]
3960
+
3961
+[[package]]
3962
+name = "phf_codegen"
3963
+version = "0.13.1"
3964
+source = "registry+https://github.com/rust-lang/crates.io-index"
3965
+checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1"
3966
+dependencies = [
3967
+ "phf_generator",
3968
+ "phf_shared",
3969
+]
3970
+
3971
+[[package]]
3972
+name = "phf_generator"
3973
+version = "0.13.1"
3974
+source = "registry+https://github.com/rust-lang/crates.io-index"
3975
+checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"
3976
+dependencies = [
3977
+ "fastrand",
3978
+ "phf_shared",
3979
+]
3980
+
3981
+[[package]]
3982
+name = "phf_macros"
3983
+version = "0.13.1"
3984
+source = "registry+https://github.com/rust-lang/crates.io-index"
3985
+checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef"
3986
+dependencies = [
3987
+ "phf_generator",
3988
+ "phf_shared",
3989
+ "proc-macro2",
3990
+ "quote",
3991
+ "syn 2.0.117",
3992
+]
3993
+
3994
+[[package]]
3995
+name = "phf_shared"
3996
+version = "0.13.1"
3997
+source = "registry+https://github.com/rust-lang/crates.io-index"
3998
+checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
3999
+dependencies = [
4000
+ "siphasher",
4001
+]
4002
+
4003
+[[package]]
4004
+name = "pin-project-lite"
4005
+version = "0.2.17"
4006
+source = "registry+https://github.com/rust-lang/crates.io-index"
4007
+checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
4008
+
4009
+[[package]]
4010
+name = "pkg-config"
4011
+version = "0.3.32"
4012
+source = "registry+https://github.com/rust-lang/crates.io-index"
4013
+checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
4014
+
4015
+[[package]]
4016
+name = "plain"
4017
+version = "0.2.3"
4018
+source = "registry+https://github.com/rust-lang/crates.io-index"
4019
+checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
4020
+
4021
+[[package]]
4022
+name = "png"
4023
+version = "0.18.1"
4024
+source = "registry+https://github.com/rust-lang/crates.io-index"
4025
+checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"
4026
+dependencies = [
4027
+ "bitflags 2.11.0",
4028
+ "crc32fast",
4029
+ "fdeflate",
4030
+ "flate2",
4031
+ "miniz_oxide",
4032
+]
4033
+
4034
+[[package]]
4035
+name = "portable-atomic"
4036
+version = "1.13.1"
4037
+source = "registry+https://github.com/rust-lang/crates.io-index"
4038
+checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
4039
+
4040
+[[package]]
4041
+name = "potential_utf"
4042
+version = "0.1.5"
4043
+source = "registry+https://github.com/rust-lang/crates.io-index"
4044
+checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564"
4045
+dependencies = [
4046
+ "zerovec",
4047
+]
4048
+
4049
+[[package]]
4050
+name = "powerfmt"
4051
+version = "0.2.0"
4052
+source = "registry+https://github.com/rust-lang/crates.io-index"
4053
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
4054
+
4055
+[[package]]
4056
+name = "ppv-lite86"
4057
+version = "0.2.21"
4058
+source = "registry+https://github.com/rust-lang/crates.io-index"
4059
+checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
4060
+dependencies = [
4061
+ "zerocopy",
4062
+]
4063
+
4064
+[[package]]
4065
+name = "precomputed-hash"
4066
+version = "0.1.1"
4067
+source = "registry+https://github.com/rust-lang/crates.io-index"
4068
+checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
4069
+
4070
+[[package]]
4071
+name = "prettyplease"
4072
+version = "0.2.37"
4073
+source = "registry+https://github.com/rust-lang/crates.io-index"
4074
+checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
4075
+dependencies = [
4076
+ "proc-macro2",
4077
+ "syn 2.0.117",
4078
+]
4079
+
4080
+[[package]]
4081
+name = "primal-check"
4082
+version = "0.3.4"
4083
+source = "registry+https://github.com/rust-lang/crates.io-index"
4084
+checksum = "dc0d895b311e3af9902528fbb8f928688abbd95872819320517cc24ca6b2bd08"
4085
+dependencies = [
4086
+ "num-integer",
4087
+]
4088
+
4089
+[[package]]
4090
+name = "proc-macro-error"
4091
+version = "1.0.4"
4092
+source = "registry+https://github.com/rust-lang/crates.io-index"
4093
+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
4094
+dependencies = [
4095
+ "proc-macro-error-attr",
4096
+ "proc-macro2",
4097
+ "quote",
4098
+ "syn 1.0.109",
4099
+ "version_check",
4100
+]
4101
+
4102
+[[package]]
4103
+name = "proc-macro-error-attr"
4104
+version = "1.0.4"
4105
+source = "registry+https://github.com/rust-lang/crates.io-index"
4106
+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
4107
+dependencies = [
4108
+ "proc-macro2",
4109
+ "quote",
4110
+ "version_check",
4111
+]
4112
+
4113
+[[package]]
4114
+name = "proc-macro2"
4115
+version = "1.0.106"
4116
+source = "registry+https://github.com/rust-lang/crates.io-index"
4117
+checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
4118
+dependencies = [
4119
+ "unicode-ident",
4120
+]
4121
+
4122
+[[package]]
4123
+name = "profiling"
4124
+version = "1.0.17"
4125
+source = "registry+https://github.com/rust-lang/crates.io-index"
4126
+checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773"
4127
+dependencies = [
4128
+ "profiling-procmacros",
4129
+]
4130
+
4131
+[[package]]
4132
+name = "profiling-procmacros"
4133
+version = "1.0.17"
4134
+source = "registry+https://github.com/rust-lang/crates.io-index"
4135
+checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b"
4136
+dependencies = [
4137
+ "quote",
4138
+ "syn 2.0.117",
4139
+]
4140
+
4141
+[[package]]
4142
+name = "pulp"
4143
+version = "0.21.5"
4144
+source = "registry+https://github.com/rust-lang/crates.io-index"
4145
+checksum = "96b86df24f0a7ddd5e4b95c94fc9ed8a98f1ca94d3b01bdce2824097e7835907"
4146
+dependencies = [
4147
+ "bytemuck",
4148
+ "cfg-if",
4149
+ "libm",
4150
+ "num-complex",
4151
+ "reborrow",
4152
+ "version_check",
4153
+]
4154
+
4155
+[[package]]
4156
+name = "pulp"
4157
+version = "0.22.2"
4158
+source = "registry+https://github.com/rust-lang/crates.io-index"
4159
+checksum = "2e205bb30d5b916c55e584c22201771bcf2bad9aabd5d4127f38387140c38632"
4160
+dependencies = [
4161
+ "bytemuck",
4162
+ "cfg-if",
4163
+ "libm",
4164
+ "num-complex",
4165
+ "paste",
4166
+ "pulp-wasm-simd-flag",
4167
+ "raw-cpuid",
4168
+ "reborrow",
4169
+ "version_check",
4170
+]
4171
+
4172
+[[package]]
4173
+name = "pulp-wasm-simd-flag"
4174
+version = "0.1.0"
4175
+source = "registry+https://github.com/rust-lang/crates.io-index"
4176
+checksum = "40e24eee682d89fb193496edf918a7f407d30175b2e785fe057e4392dfd182e0"
4177
+
4178
+[[package]]
4179
+name = "pxfm"
4180
+version = "0.1.28"
4181
+source = "registry+https://github.com/rust-lang/crates.io-index"
4182
+checksum = "b5a041e753da8b807c9255f28de81879c78c876392ff2469cde94799b2896b9d"
4183
+
4184
+[[package]]
4185
+name = "qoi"
4186
+version = "0.4.1"
4187
+source = "registry+https://github.com/rust-lang/crates.io-index"
4188
+checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"
4189
+dependencies = [
4190
+ "bytemuck",
4191
+]
4192
+
4193
+[[package]]
4194
+name = "quick-error"
4195
+version = "2.0.1"
4196
+source = "registry+https://github.com/rust-lang/crates.io-index"
4197
+checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
4198
+
4199
+[[package]]
4200
+name = "quinn"
4201
+version = "0.11.9"
4202
+source = "registry+https://github.com/rust-lang/crates.io-index"
4203
+checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20"
4204
+dependencies = [
4205
+ "bytes",
4206
+ "cfg_aliases",
4207
+ "pin-project-lite",
4208
+ "quinn-proto",
4209
+ "quinn-udp",
4210
+ "rustc-hash 2.1.2",
4211
+ "rustls",
4212
+ "socket2",
4213
+ "thiserror 2.0.18",
4214
+ "tokio",
4215
+ "tracing",
4216
+ "web-time",
4217
+]
4218
+
4219
+[[package]]
4220
+name = "quinn-proto"
4221
+version = "0.11.14"
4222
+source = "registry+https://github.com/rust-lang/crates.io-index"
4223
+checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098"
4224
+dependencies = [
4225
+ "aws-lc-rs",
4226
+ "bytes",
4227
+ "getrandom 0.3.4",
4228
+ "lru-slab",
4229
+ "rand 0.9.2",
4230
+ "ring",
4231
+ "rustc-hash 2.1.2",
4232
+ "rustls",
4233
+ "rustls-pki-types",
4234
+ "slab",
4235
+ "thiserror 2.0.18",
4236
+ "tinyvec",
4237
+ "tracing",
4238
+ "web-time",
4239
+]
4240
+
4241
+[[package]]
4242
+name = "quinn-udp"
4243
+version = "0.5.14"
4244
+source = "registry+https://github.com/rust-lang/crates.io-index"
4245
+checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd"
4246
+dependencies = [
4247
+ "cfg_aliases",
4248
+ "libc",
4249
+ "once_cell",
4250
+ "socket2",
4251
+ "tracing",
4252
+ "windows-sys 0.60.2",
4253
+]
4254
+
4255
+[[package]]
4256
+name = "quote"
4257
+version = "1.0.45"
4258
+source = "registry+https://github.com/rust-lang/crates.io-index"
4259
+checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
4260
+dependencies = [
4261
+ "proc-macro2",
4262
+]
4263
+
4264
+[[package]]
4265
+name = "r-efi"
4266
+version = "5.3.0"
4267
+source = "registry+https://github.com/rust-lang/crates.io-index"
4268
+checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
4269
+
4270
+[[package]]
4271
+name = "r-efi"
4272
+version = "6.0.0"
4273
+source = "registry+https://github.com/rust-lang/crates.io-index"
4274
+checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
4275
+
4276
+[[package]]
4277
+name = "radix_trie"
4278
+version = "0.3.0"
4279
+source = "registry+https://github.com/rust-lang/crates.io-index"
4280
+checksum = "3b4431027dcd37fc2a73ef740b5f233aa805897935b8bce0195e41bbf9a3289a"
4281
+dependencies = [
4282
+ "endian-type",
4283
+ "nibble_vec",
4284
+]
4285
+
4286
+[[package]]
4287
+name = "rand"
4288
+version = "0.8.5"
4289
+source = "registry+https://github.com/rust-lang/crates.io-index"
4290
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
4291
+dependencies = [
4292
+ "libc",
4293
+ "rand_chacha 0.3.1",
4294
+ "rand_core 0.6.4",
4295
+]
4296
+
4297
+[[package]]
4298
+name = "rand"
4299
+version = "0.9.2"
4300
+source = "registry+https://github.com/rust-lang/crates.io-index"
4301
+checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
4302
+dependencies = [
4303
+ "rand_chacha 0.9.0",
4304
+ "rand_core 0.9.5",
4305
+]
4306
+
4307
+[[package]]
4308
+name = "rand_chacha"
4309
+version = "0.3.1"
4310
+source = "registry+https://github.com/rust-lang/crates.io-index"
4311
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
4312
+dependencies = [
4313
+ "ppv-lite86",
4314
+ "rand_core 0.6.4",
4315
+]
4316
+
4317
+[[package]]
4318
+name = "rand_chacha"
4319
+version = "0.9.0"
4320
+source = "registry+https://github.com/rust-lang/crates.io-index"
4321
+checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
4322
+dependencies = [
4323
+ "ppv-lite86",
4324
+ "rand_core 0.9.5",
4325
+]
4326
+
4327
+[[package]]
4328
+name = "rand_core"
4329
+version = "0.6.4"
4330
+source = "registry+https://github.com/rust-lang/crates.io-index"
4331
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
4332
+dependencies = [
4333
+ "getrandom 0.2.17",
4334
+]
4335
+
4336
+[[package]]
4337
+name = "rand_core"
4338
+version = "0.9.5"
4339
+source = "registry+https://github.com/rust-lang/crates.io-index"
4340
+checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
4341
+dependencies = [
4342
+ "getrandom 0.3.4",
4343
+]
4344
+
4345
+[[package]]
4346
+name = "rand_distr"
4347
+version = "0.4.3"
4348
+source = "registry+https://github.com/rust-lang/crates.io-index"
4349
+checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31"
4350
+dependencies = [
4351
+ "num-traits",
4352
+ "rand 0.8.5",
4353
+]
4354
+
4355
+[[package]]
4356
+name = "rand_distr"
4357
+version = "0.5.1"
4358
+source = "registry+https://github.com/rust-lang/crates.io-index"
4359
+checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463"
4360
+dependencies = [
4361
+ "num-traits",
4362
+ "rand 0.9.2",
4363
+]
4364
+
4365
+[[package]]
4366
+name = "rand_isaac"
4367
+version = "0.4.0"
4368
+source = "registry+https://github.com/rust-lang/crates.io-index"
4369
+checksum = "3382fc9f0aad4f2e2a56b53d9133c8c810b4dbf21e7e370e24346161a5b2c7bd"
4370
+dependencies = [
4371
+ "rand_core 0.9.5",
4372
+]
4373
+
4374
+[[package]]
4375
+name = "rav1e"
4376
+version = "0.8.1"
4377
+source = "registry+https://github.com/rust-lang/crates.io-index"
4378
+checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b"
4379
+dependencies = [
4380
+ "aligned-vec",
4381
+ "arbitrary",
4382
+ "arg_enum_proc_macro",
4383
+ "arrayvec",
4384
+ "av-scenechange",
4385
+ "av1-grain",
4386
+ "bitstream-io",
4387
+ "built",
4388
+ "cfg-if",
4389
+ "interpolate_name",
4390
+ "itertools",
4391
+ "libc",
4392
+ "libfuzzer-sys",
4393
+ "log",
4394
+ "maybe-rayon",
4395
+ "new_debug_unreachable",
4396
+ "noop_proc_macro",
4397
+ "num-derive",
4398
+ "num-traits",
4399
+ "paste",
4400
+ "profiling",
4401
+ "rand 0.9.2",
4402
+ "rand_chacha 0.9.0",
4403
+ "simd_helpers",
4404
+ "thiserror 2.0.18",
4405
+ "v_frame",
4406
+ "wasm-bindgen",
4407
+]
4408
+
4409
+[[package]]
4410
+name = "ravif"
4411
+version = "0.13.0"
4412
+source = "registry+https://github.com/rust-lang/crates.io-index"
4413
+checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45"
4414
+dependencies = [
4415
+ "avif-serialize",
4416
+ "imgref",
4417
+ "loop9",
4418
+ "quick-error",
4419
+ "rav1e",
4420
+ "rayon",
4421
+ "rgb",
4422
+]
4423
+
4424
+[[package]]
4425
+name = "raw-cpuid"
4426
+version = "11.6.0"
4427
+source = "registry+https://github.com/rust-lang/crates.io-index"
4428
+checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186"
4429
+dependencies = [
4430
+ "bitflags 2.11.0",
4431
+]
4432
+
4433
+[[package]]
4434
+name = "rawpointer"
4435
+version = "0.2.1"
4436
+source = "registry+https://github.com/rust-lang/crates.io-index"
4437
+checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
4438
+
4439
+[[package]]
4440
+name = "rayon"
4441
+version = "1.11.0"
4442
+source = "registry+https://github.com/rust-lang/crates.io-index"
4443
+checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
4444
+dependencies = [
4445
+ "either",
4446
+ "rayon-core",
4447
+]
4448
+
4449
+[[package]]
4450
+name = "rayon-cond"
4451
+version = "0.4.0"
4452
+source = "registry+https://github.com/rust-lang/crates.io-index"
4453
+checksum = "2964d0cf57a3e7a06e8183d14a8b527195c706b7983549cd5462d5aa3747438f"
4454
+dependencies = [
4455
+ "either",
4456
+ "itertools",
4457
+ "rayon",
4458
+]
4459
+
4460
+[[package]]
4461
+name = "rayon-core"
4462
+version = "1.13.0"
4463
+source = "registry+https://github.com/rust-lang/crates.io-index"
4464
+checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
4465
+dependencies = [
4466
+ "crossbeam-deque",
4467
+ "crossbeam-utils",
4468
+]
4469
+
4470
+[[package]]
4471
+name = "realfft"
4472
+version = "3.5.0"
4473
+source = "registry+https://github.com/rust-lang/crates.io-index"
4474
+checksum = "f821338fddb99d089116342c46e9f1fbf3828dba077674613e734e01d6ea8677"
4475
+dependencies = [
4476
+ "rustfft",
4477
+]
4478
+
4479
+[[package]]
4480
+name = "reborrow"
4481
+version = "0.5.5"
4482
+source = "registry+https://github.com/rust-lang/crates.io-index"
4483
+checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430"
4484
+
4485
+[[package]]
4486
+name = "recvmsg"
4487
+version = "1.0.0"
4488
+source = "registry+https://github.com/rust-lang/crates.io-index"
4489
+checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175"
4490
+
4491
+[[package]]
4492
+name = "redox_syscall"
4493
+version = "0.5.18"
4494
+source = "registry+https://github.com/rust-lang/crates.io-index"
4495
+checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
4496
+dependencies = [
4497
+ "bitflags 2.11.0",
4498
+]
4499
+
4500
+[[package]]
4501
+name = "redox_users"
4502
+version = "0.5.2"
4503
+source = "registry+https://github.com/rust-lang/crates.io-index"
4504
+checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
4505
+dependencies = [
4506
+ "getrandom 0.2.17",
4507
+ "libredox",
4508
+ "thiserror 2.0.18",
4509
+]
4510
+
4511
+[[package]]
4512
+name = "ref-cast"
4513
+version = "1.0.25"
4514
+source = "registry+https://github.com/rust-lang/crates.io-index"
4515
+checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d"
4516
+dependencies = [
4517
+ "ref-cast-impl",
4518
+]
4519
+
4520
+[[package]]
4521
+name = "ref-cast-impl"
4522
+version = "1.0.25"
4523
+source = "registry+https://github.com/rust-lang/crates.io-index"
4524
+checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da"
4525
+dependencies = [
4526
+ "proc-macro2",
4527
+ "quote",
4528
+ "syn 2.0.117",
4529
+]
4530
+
4531
+[[package]]
4532
+name = "regex"
4533
+version = "1.12.3"
4534
+source = "registry+https://github.com/rust-lang/crates.io-index"
4535
+checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
4536
+dependencies = [
4537
+ "aho-corasick",
4538
+ "memchr",
4539
+ "regex-automata",
4540
+ "regex-syntax",
4541
+]
4542
+
4543
+[[package]]
4544
+name = "regex-automata"
4545
+version = "0.4.14"
4546
+source = "registry+https://github.com/rust-lang/crates.io-index"
4547
+checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
4548
+dependencies = [
4549
+ "aho-corasick",
4550
+ "memchr",
4551
+ "regex-syntax",
4552
+]
4553
+
4554
+[[package]]
4555
+name = "regex-syntax"
4556
+version = "0.8.10"
4557
+source = "registry+https://github.com/rust-lang/crates.io-index"
4558
+checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
4559
+
4560
+[[package]]
4561
+name = "reqwest"
4562
+version = "0.12.28"
4563
+source = "registry+https://github.com/rust-lang/crates.io-index"
4564
+checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"
4565
+dependencies = [
4566
+ "base64 0.22.1",
4567
+ "bytes",
4568
+ "encoding_rs",
4569
+ "futures-channel",
4570
+ "futures-core",
4571
+ "futures-util",
4572
+ "h2",
4573
+ "http",
4574
+ "http-body",
4575
+ "http-body-util",
4576
+ "hyper",
4577
+ "hyper-rustls",
4578
+ "hyper-util",
4579
+ "js-sys",
4580
+ "log",
4581
+ "mime",
4582
+ "mime_guess",
4583
+ "percent-encoding",
4584
+ "pin-project-lite",
4585
+ "quinn",
4586
+ "rustls",
4587
+ "rustls-pki-types",
4588
+ "serde",
4589
+ "serde_json",
4590
+ "serde_urlencoded",
4591
+ "sync_wrapper",
4592
+ "tokio",
4593
+ "tokio-rustls",
4594
+ "tokio-util",
4595
+ "tower",
4596
+ "tower-http",
4597
+ "tower-service",
4598
+ "url",
4599
+ "wasm-bindgen",
4600
+ "wasm-bindgen-futures",
4601
+ "wasm-streams 0.4.2",
4602
+ "web-sys",
4603
+ "webpki-roots 1.0.6",
4604
+]
4605
+
4606
+[[package]]
4607
+name = "reqwest"
4608
+version = "0.13.2"
4609
+source = "registry+https://github.com/rust-lang/crates.io-index"
4610
+checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801"
4611
+dependencies = [
4612
+ "base64 0.22.1",
4613
+ "bytes",
4614
+ "encoding_rs",
4615
+ "futures-channel",
4616
+ "futures-core",
4617
+ "futures-util",
4618
+ "h2",
4619
+ "http",
4620
+ "http-body",
4621
+ "http-body-util",
4622
+ "hyper",
4623
+ "hyper-rustls",
4624
+ "hyper-util",
4625
+ "js-sys",
4626
+ "log",
4627
+ "mime",
4628
+ "percent-encoding",
4629
+ "pin-project-lite",
4630
+ "quinn",
4631
+ "rustls",
4632
+ "rustls-pki-types",
4633
+ "rustls-platform-verifier",
4634
+ "serde",
4635
+ "serde_json",
4636
+ "sync_wrapper",
4637
+ "tokio",
4638
+ "tokio-rustls",
4639
+ "tokio-util",
4640
+ "tower",
4641
+ "tower-http",
4642
+ "tower-service",
4643
+ "url",
4644
+ "wasm-bindgen",
4645
+ "wasm-bindgen-futures",
4646
+ "wasm-streams 0.5.0",
4647
+ "web-sys",
4648
+]
4649
+
4650
+[[package]]
4651
+name = "rgb"
4652
+version = "0.8.53"
4653
+source = "registry+https://github.com/rust-lang/crates.io-index"
4654
+checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4"
4655
+
4656
+[[package]]
4657
+name = "ring"
4658
+version = "0.17.14"
4659
+source = "registry+https://github.com/rust-lang/crates.io-index"
4660
+checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
4661
+dependencies = [
4662
+ "cc",
4663
+ "cfg-if",
4664
+ "getrandom 0.2.17",
4665
+ "libc",
4666
+ "untrusted",
4667
+ "windows-sys 0.52.0",
4668
+]
4669
+
4670
+[[package]]
4671
+name = "rubato"
4672
+version = "0.16.2"
4673
+source = "registry+https://github.com/rust-lang/crates.io-index"
4674
+checksum = "5258099699851cfd0082aeb645feb9c084d9a5e1f1b8d5372086b989fc5e56a1"
4675
+dependencies = [
4676
+ "num-complex",
4677
+ "num-integer",
4678
+ "num-traits",
4679
+ "realfft",
4680
+]
4681
+
4682
+[[package]]
4683
+name = "rust-mcp-schema"
4684
+version = "0.9.6"
4685
+source = "registry+https://github.com/rust-lang/crates.io-index"
4686
+checksum = "b1209aa7fb74fccafe6b2a649b15581fb328343427d85def865b0ad233fe1f74"
4687
+dependencies = [
4688
+ "serde",
4689
+ "serde_json",
4690
+]
4691
+
4692
+[[package]]
4693
+name = "rust-stemmers"
4694
+version = "1.2.0"
4695
+source = "registry+https://github.com/rust-lang/crates.io-index"
4696
+checksum = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54"
4697
+dependencies = [
4698
+ "serde",
4699
+ "serde_derive",
4700
+]
4701
+
4702
+[[package]]
4703
+name = "rustc-demangle"
4704
+version = "0.1.27"
4705
+source = "registry+https://github.com/rust-lang/crates.io-index"
4706
+checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d"
4707
+
4708
+[[package]]
4709
+name = "rustc-hash"
4710
+version = "1.1.0"
4711
+source = "registry+https://github.com/rust-lang/crates.io-index"
4712
+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
4713
+
4714
+[[package]]
4715
+name = "rustc-hash"
4716
+version = "2.1.2"
4717
+source = "registry+https://github.com/rust-lang/crates.io-index"
4718
+checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
4719
+
4720
+[[package]]
4721
+name = "rustc_version"
4722
+version = "0.4.1"
4723
+source = "registry+https://github.com/rust-lang/crates.io-index"
4724
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
4725
+dependencies = [
4726
+ "semver",
4727
+]
4728
+
4729
+[[package]]
4730
+name = "rustfft"
4731
+version = "6.4.1"
4732
+source = "registry+https://github.com/rust-lang/crates.io-index"
4733
+checksum = "21db5f9893e91f41798c88680037dba611ca6674703c1a18601b01a72c8adb89"
4734
+dependencies = [
4735
+ "num-complex",
4736
+ "num-integer",
4737
+ "num-traits",
4738
+ "primal-check",
4739
+ "strength_reduce",
4740
+ "transpose",
4741
+]
4742
+
4743
+[[package]]
4744
+name = "rustix"
4745
+version = "1.1.4"
4746
+source = "registry+https://github.com/rust-lang/crates.io-index"
4747
+checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
4748
+dependencies = [
4749
+ "bitflags 2.11.0",
4750
+ "errno",
4751
+ "libc",
4752
+ "linux-raw-sys",
4753
+ "windows-sys 0.61.2",
4754
+]
4755
+
4756
+[[package]]
4757
+name = "rustls"
4758
+version = "0.23.37"
4759
+source = "registry+https://github.com/rust-lang/crates.io-index"
4760
+checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4"
4761
+dependencies = [
4762
+ "aws-lc-rs",
4763
+ "log",
4764
+ "once_cell",
4765
+ "ring",
4766
+ "rustls-pki-types",
4767
+ "rustls-webpki",
4768
+ "subtle",
4769
+ "zeroize",
4770
+]
4771
+
4772
+[[package]]
4773
+name = "rustls-native-certs"
4774
+version = "0.8.3"
4775
+source = "registry+https://github.com/rust-lang/crates.io-index"
4776
+checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63"
4777
+dependencies = [
4778
+ "openssl-probe",
4779
+ "rustls-pki-types",
4780
+ "schannel",
4781
+ "security-framework",
4782
+]
4783
+
4784
+[[package]]
4785
+name = "rustls-pki-types"
4786
+version = "1.14.0"
4787
+source = "registry+https://github.com/rust-lang/crates.io-index"
4788
+checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd"
4789
+dependencies = [
4790
+ "web-time",
4791
+ "zeroize",
4792
+]
4793
+
4794
+[[package]]
4795
+name = "rustls-platform-verifier"
4796
+version = "0.6.2"
4797
+source = "registry+https://github.com/rust-lang/crates.io-index"
4798
+checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784"
4799
+dependencies = [
4800
+ "core-foundation 0.10.1",
4801
+ "core-foundation-sys",
4802
+ "jni",
4803
+ "log",
4804
+ "once_cell",
4805
+ "rustls",
4806
+ "rustls-native-certs",
4807
+ "rustls-platform-verifier-android",
4808
+ "rustls-webpki",
4809
+ "security-framework",
4810
+ "security-framework-sys",
4811
+ "webpki-root-certs",
4812
+ "windows-sys 0.61.2",
4813
+]
4814
+
4815
+[[package]]
4816
+name = "rustls-platform-verifier-android"
4817
+version = "0.1.1"
4818
+source = "registry+https://github.com/rust-lang/crates.io-index"
4819
+checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f"
4820
+
4821
+[[package]]
4822
+name = "rustls-webpki"
4823
+version = "0.103.10"
4824
+source = "registry+https://github.com/rust-lang/crates.io-index"
4825
+checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef"
4826
+dependencies = [
4827
+ "aws-lc-rs",
4828
+ "ring",
4829
+ "rustls-pki-types",
4830
+ "untrusted",
4831
+]
4832
+
4833
+[[package]]
4834
+name = "rustversion"
4835
+version = "1.0.22"
4836
+source = "registry+https://github.com/rust-lang/crates.io-index"
4837
+checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
4838
+
4839
+[[package]]
4840
+name = "ryu"
4841
+version = "1.0.23"
4842
+source = "registry+https://github.com/rust-lang/crates.io-index"
4843
+checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
4844
+
4845
+[[package]]
4846
+name = "safe_arch"
4847
+version = "0.7.4"
4848
+source = "registry+https://github.com/rust-lang/crates.io-index"
4849
+checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323"
4850
+dependencies = [
4851
+ "bytemuck",
4852
+]
4853
+
4854
+[[package]]
4855
+name = "safetensors"
4856
+version = "0.4.5"
4857
+source = "registry+https://github.com/rust-lang/crates.io-index"
4858
+checksum = "44560c11236a6130a46ce36c836a62936dc81ebf8c36a37947423571be0e55b6"
4859
+dependencies = [
4860
+ "serde",
4861
+ "serde_json",
4862
+]
4863
+
4864
+[[package]]
4865
+name = "safetensors"
4866
+version = "0.7.0"
4867
+source = "registry+https://github.com/rust-lang/crates.io-index"
4868
+checksum = "675656c1eabb620b921efea4f9199f97fc86e36dd6ffd1fbbe48d0f59a4987f5"
4869
+dependencies = [
4870
+ "hashbrown 0.16.1",
4871
+ "serde",
4872
+ "serde_json",
4873
+]
4874
+
4875
+[[package]]
4876
+name = "same-file"
4877
+version = "1.0.6"
4878
+source = "registry+https://github.com/rust-lang/crates.io-index"
4879
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
4880
+dependencies = [
4881
+ "winapi-util",
4882
+]
4883
+
4884
+[[package]]
4885
+name = "saphyr-parser-bw"
4886
+version = "0.0.605"
4887
+source = "registry+https://github.com/rust-lang/crates.io-index"
4888
+checksum = "5e1aee7486406df3541b5a657204a11be97175a467d77bc98e6d94a66289fb80"
4889
+dependencies = [
4890
+ "arraydeque",
4891
+ "smallvec 2.0.0-alpha.12",
4892
+ "thiserror 2.0.18",
4893
+]
4894
+
4895
+[[package]]
4896
+name = "schannel"
4897
+version = "0.1.29"
4898
+source = "registry+https://github.com/rust-lang/crates.io-index"
4899
+checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939"
4900
+dependencies = [
4901
+ "windows-sys 0.61.2",
4902
+]
4903
+
4904
+[[package]]
4905
+name = "schemars"
4906
+version = "0.9.0"
4907
+source = "registry+https://github.com/rust-lang/crates.io-index"
4908
+checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f"
4909
+dependencies = [
4910
+ "dyn-clone",
4911
+ "ref-cast",
4912
+ "serde",
4913
+ "serde_json",
4914
+]
4915
+
4916
+[[package]]
4917
+name = "schemars"
4918
+version = "1.2.1"
4919
+source = "registry+https://github.com/rust-lang/crates.io-index"
4920
+checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc"
4921
+dependencies = [
4922
+ "dyn-clone",
4923
+ "ref-cast",
4924
+ "schemars_derive",
4925
+ "serde",
4926
+ "serde_json",
4927
+]
4928
+
4929
+[[package]]
4930
+name = "schemars_derive"
4931
+version = "1.2.1"
4932
+source = "registry+https://github.com/rust-lang/crates.io-index"
4933
+checksum = "7d115b50f4aaeea07e79c1912f645c7513d81715d0420f8bc77a18c6260b307f"
4934
+dependencies = [
4935
+ "proc-macro2",
4936
+ "quote",
4937
+ "serde_derive_internals",
4938
+ "syn 2.0.117",
4939
+]
4940
+
4941
+[[package]]
4942
+name = "scoped-tls"
4943
+version = "1.0.1"
4944
+source = "registry+https://github.com/rust-lang/crates.io-index"
4945
+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
4946
+
4947
+[[package]]
4948
+name = "scopeguard"
4949
+version = "1.2.0"
4950
+source = "registry+https://github.com/rust-lang/crates.io-index"
4951
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
4952
+
4953
+[[package]]
4954
+name = "scraper"
4955
+version = "0.25.0"
4956
+source = "registry+https://github.com/rust-lang/crates.io-index"
4957
+checksum = "93cecd86d6259499c844440546d02f55f3e17bd286e529e48d1f9f67e92315cb"
4958
+dependencies = [
4959
+ "cssparser",
4960
+ "ego-tree",
4961
+ "getopts",
4962
+ "html5ever 0.36.1",
4963
+ "precomputed-hash",
4964
+ "selectors",
4965
+ "tendril 0.4.3",
4966
+]
4967
+
4968
+[[package]]
4969
+name = "scroll"
4970
+version = "0.12.0"
4971
+source = "registry+https://github.com/rust-lang/crates.io-index"
4972
+checksum = "6ab8598aa408498679922eff7fa985c25d58a90771bd6be794434c5277eab1a6"
4973
+dependencies = [
4974
+ "scroll_derive",
4975
+]
4976
+
4977
+[[package]]
4978
+name = "scroll_derive"
4979
+version = "0.12.1"
4980
+source = "registry+https://github.com/rust-lang/crates.io-index"
4981
+checksum = "1783eabc414609e28a5ba76aee5ddd52199f7107a0b24c2e9746a1ecc34a683d"
4982
+dependencies = [
4983
+ "proc-macro2",
4984
+ "quote",
4985
+ "syn 2.0.117",
4986
+]
4987
+
4988
+[[package]]
4989
+name = "security-framework"
4990
+version = "3.7.0"
4991
+source = "registry+https://github.com/rust-lang/crates.io-index"
4992
+checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d"
4993
+dependencies = [
4994
+ "bitflags 2.11.0",
4995
+ "core-foundation 0.10.1",
4996
+ "core-foundation-sys",
4997
+ "libc",
4998
+ "security-framework-sys",
4999
+]
This file is too large to show in full.
sdk/dart/rust/Cargo.toml
new
+15
@@ -0,0 +1,15 @@
1
+[package]
2
+name = "onde_inference_dart"
3
+version = "0.1.0"
4
+edition = "2021"
5
+publish = false
6
+
7
+[lib]
8
+crate-type = ["cdylib", "staticlib"]
9
+
10
+[dependencies]
11
+flutter_rust_bridge = "=2.12.0"
12
+onde = { path = "../../../" }
13
+tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
14
+thiserror = "2"
15
+log = "0.4"
sdk/dart/rust/src/api.rs
new
+512
@@ -0,0 +1,512 @@
1
+//! Flutter Rust Bridge v2 API for the Onde Inference Dart SDK.
2
+//!
3
+//! This module declares mirror types (re-declared plain Rust structs/enums
4
+//! without UniFFI derives) and an `OndeChatEngine` opaque wrapper so that
5
+//! `flutter_rust_bridge_codegen generate` can produce clean Dart bindings.
6
+//!
7
+//! All `onde::inference` types are imported with an `Onde*` alias to avoid
8
+//! name collisions with the bridge mirrors defined below.
9
+
10
+use crate::frb_generated::StreamSink;
11
+use flutter_rust_bridge::frb;
12
+use onde::inference::{
13
+ ChatEngine, ChatMessage as OndeChatMessage, ChatRole as OndeChatRole,
14
+ EngineInfo as OndeEngineInfo, EngineStatus as OndeEngineStatus,
15
+ GgufModelConfig as OndeGgufModelConfig, InferenceError, InferenceResult as OndeInferenceResult,
16
+ SamplingConfig as OndeSamplingConfig, StreamChunk as OndeStreamChunk,
17
+};
18
+
19
+// ── Mirror: ChatRole ──────────────────────────────────────────────────────────
20
+
21
+/// Role of a participant in a chat conversation.
22
+#[derive(Debug, Clone, PartialEq, Eq)]
23
+pub enum ChatRole {
24
+ System,
25
+ User,
26
+ Assistant,
27
+}
28
+
29
+impl From<OndeChatRole> for ChatRole {
30
+ fn from(r: OndeChatRole) -> Self {
31
+ match r {
32
+ OndeChatRole::System => ChatRole::System,
33
+ OndeChatRole::User => ChatRole::User,
34
+ OndeChatRole::Assistant => ChatRole::Assistant,
35
+ }
36
+ }
37
+}
38
+
39
+impl From<ChatRole> for OndeChatRole {
40
+ fn from(r: ChatRole) -> Self {
41
+ match r {
42
+ ChatRole::System => OndeChatRole::System,
43
+ ChatRole::User => OndeChatRole::User,
44
+ ChatRole::Assistant => OndeChatRole::Assistant,
45
+ }
46
+ }
47
+}
48
+
49
+// ── Mirror: ChatMessage ───────────────────────────────────────────────────────
50
+
51
+/// A single message in a conversation.
52
+#[derive(Debug, Clone)]
53
+pub struct ChatMessage {
54
+ pub role: ChatRole,
55
+ pub content: String,
56
+}
57
+
58
+impl From<OndeChatMessage> for ChatMessage {
59
+ fn from(m: OndeChatMessage) -> Self {
60
+ Self {
61
+ role: m.role.into(),
62
+ content: m.content,
63
+ }
64
+ }
65
+}
66
+
67
+impl From<ChatMessage> for OndeChatMessage {
68
+ fn from(m: ChatMessage) -> Self {
69
+ Self {
70
+ role: m.role.into(),
71
+ content: m.content,
72
+ }
73
+ }
74
+}
75
+
76
+// ── Mirror: SamplingConfig ────────────────────────────────────────────────────
77
+
78
+/// Sampling parameters for text generation. All fields are optional — `None`
79
+/// means "use the engine default".
80
+#[derive(Debug, Clone)]
81
+pub struct SamplingConfig {
82
+ pub temperature: Option<f64>,
83
+ pub top_p: Option<f64>,
84
+ pub top_k: Option<u64>,
85
+ pub min_p: Option<f64>,
86
+ pub max_tokens: Option<u64>,
87
+ pub frequency_penalty: Option<f32>,
88
+ pub presence_penalty: Option<f32>,
89
+}
90
+
91
+impl From<OndeSamplingConfig> for SamplingConfig {
92
+ fn from(s: OndeSamplingConfig) -> Self {
93
+ Self {
94
+ temperature: s.temperature,
95
+ top_p: s.top_p,
96
+ top_k: s.top_k,
97
+ min_p: s.min_p,
98
+ max_tokens: s.max_tokens,
99
+ frequency_penalty: s.frequency_penalty,
100
+ presence_penalty: s.presence_penalty,
101
+ }
102
+ }
103
+}
104
+
105
+impl From<SamplingConfig> for OndeSamplingConfig {
106
+ fn from(s: SamplingConfig) -> Self {
107
+ Self {
108
+ temperature: s.temperature,
109
+ top_p: s.top_p,
110
+ top_k: s.top_k,
111
+ min_p: s.min_p,
112
+ max_tokens: s.max_tokens,
113
+ frequency_penalty: s.frequency_penalty,
114
+ presence_penalty: s.presence_penalty,
115
+ }
116
+ }
117
+}
118
+
119
+// ── Mirror: GgufModelConfig ───────────────────────────────────────────────────
120
+
121
+/// Configuration for loading a pre-quantised GGUF model.
122
+#[derive(Debug, Clone)]
123
+pub struct GgufModelConfig {
124
+ /// HuggingFace repository ID, e.g. `"bartowski/Qwen2.5-1.5B-Instruct-GGUF"`.
125
+ pub model_id: String,
126
+ /// GGUF filename(s) within the repository.
127
+ pub files: Vec<String>,
128
+ /// Optional explicit tokenizer model ID (required on Android).
129
+ pub tok_model_id: Option<String>,
130
+ /// Human-friendly display name, e.g. `"Qwen 2.5 1.5B"`.
131
+ pub display_name: String,
132
+ /// Approximate memory footprint, e.g. `"~941 MB (GGUF Q4_K_M)"`.
133
+ pub approx_memory: String,
134
+}
135
+
136
+impl From<OndeGgufModelConfig> for GgufModelConfig {
137
+ fn from(c: OndeGgufModelConfig) -> Self {
138
+ Self {
139
+ model_id: c.model_id,
140
+ files: c.files,
141
+ tok_model_id: c.tok_model_id,
142
+ display_name: c.display_name,
143
+ approx_memory: c.approx_memory,
144
+ }
145
+ }
146
+}
147
+
148
+impl From<GgufModelConfig> for OndeGgufModelConfig {
149
+ fn from(c: GgufModelConfig) -> Self {
150
+ Self {
151
+ model_id: c.model_id,
152
+ files: c.files,
153
+ tok_model_id: c.tok_model_id,
154
+ display_name: c.display_name,
155
+ approx_memory: c.approx_memory,
156
+ }
157
+ }
158
+}
159
+
160
+// ── Mirror: InferenceResult ───────────────────────────────────────────────────
161
+
162
+/// The result of a completed inference request.
163
+#[derive(Debug, Clone)]
164
+pub struct InferenceResult {
165
+ /// The generated assistant reply text.
166
+ pub text: String,
167
+ /// Wall-clock inference duration in seconds.
168
+ pub duration_secs: f64,
169
+ /// Human-readable duration string, e.g. `"4.5s"` or `"2m 3.1s"`.
170
+ pub duration_display: String,
171
+ /// Finish reason reported by the model, e.g. `"stop"` or `"length"`.
172
+ pub finish_reason: String,
173
+}
174
+
175
+impl From<OndeInferenceResult> for InferenceResult {
176
+ fn from(r: OndeInferenceResult) -> Self {
177
+ Self {
178
+ text: r.text,
179
+ duration_secs: r.duration_secs,
180
+ duration_display: r.duration_display,
181
+ finish_reason: r.finish_reason,
182
+ }
183
+ }
184
+}
185
+
186
+// ── Mirror: StreamChunk ───────────────────────────────────────────────────────
187
+
188
+/// A single streaming token chunk emitted during inference.
189
+#[derive(Debug, Clone)]
190
+pub struct StreamChunk {
191
+ /// The token text delta (may be empty on the final chunk).
192
+ pub delta: String,
193
+ /// `true` when this is the last chunk in the stream.
194
+ pub done: bool,
195
+ /// Finish reason (set only on the final chunk).
196
+ pub finish_reason: Option<String>,
197
+}
198
+
199
+impl From<OndeStreamChunk> for StreamChunk {
200
+ fn from(c: OndeStreamChunk) -> Self {
201
+ Self {
202
+ delta: c.delta,
203
+ done: c.done,
204
+ finish_reason: c.finish_reason,
205
+ }
206
+ }
207
+}
208
+
209
+// ── Mirror: EngineStatus ──────────────────────────────────────────────────────
210
+
211
+/// Lifecycle status of the inference engine.
212
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
213
+pub enum EngineStatus {
214
+ Unloaded,
215
+ Loading,
216
+ Ready,
217
+ Generating,
218
+ Error,
219
+}
220
+
221
+impl From<OndeEngineStatus> for EngineStatus {
222
+ fn from(s: OndeEngineStatus) -> Self {
223
+ match s {
224
+ OndeEngineStatus::Unloaded => EngineStatus::Unloaded,
225
+ OndeEngineStatus::Loading => EngineStatus::Loading,
226
+ OndeEngineStatus::Ready => EngineStatus::Ready,
227
+ OndeEngineStatus::Generating => EngineStatus::Generating,
228
+ OndeEngineStatus::Error => EngineStatus::Error,
229
+ }
230
+ }
231
+}
232
+
233
+// ── Mirror: EngineInfo ────────────────────────────────────────────────────────
234
+
235
+/// A point-in-time snapshot of the engine's state.
236
+#[derive(Debug, Clone)]
237
+pub struct EngineInfo {
238
+ pub status: EngineStatus,
239
+ /// Display name of the currently loaded model, if any.
240
+ pub model_name: Option<String>,
241
+ /// Approximate memory footprint of the loaded model, if any.
242
+ pub approx_memory: Option<String>,
243
+ /// Number of conversation turns in the current history.
244
+ pub history_length: u64,
245
+}
246
+
247
+impl From<OndeEngineInfo> for EngineInfo {
248
+ fn from(i: OndeEngineInfo) -> Self {
249
+ Self {
250
+ status: i.status.into(),
251
+ model_name: i.model_name,
252
+ approx_memory: i.approx_memory,
253
+ history_length: i.history_length,
254
+ }
255
+ }
256
+}
257
+
258
+// ── Error type ────────────────────────────────────────────────────────────────
259
+
260
+/// Bridge error type mapping from [`onde::inference::InferenceError`].
261
+#[derive(Debug, thiserror::Error)]
262
+pub enum OndeError {
263
+ #[error("No model loaded — call load_gguf_model first")]
264
+ NoModelLoaded,
265
+
266
+ #[error("Model already loaded: {model_name}")]
267
+ AlreadyLoaded { model_name: String },
268
+
269
+ #[error("Failed to build model: {reason}")]
270
+ ModelBuild { reason: String },
271
+
272
+ #[error("Inference failed: {reason}")]
273
+ Inference { reason: String },
274
+
275
+ #[error("Operation was cancelled")]
276
+ Cancelled,
277
+
278
+ #[error("{reason}")]
279
+ Other { reason: String },
280
+}
281
+
282
+impl From<InferenceError> for OndeError {
283
+ fn from(e: InferenceError) -> Self {
284
+ match e {
285
+ InferenceError::NoModelLoaded => OndeError::NoModelLoaded,
286
+ InferenceError::AlreadyLoaded { model_name } => OndeError::AlreadyLoaded { model_name },
287
+ InferenceError::ModelBuild { reason } => OndeError::ModelBuild { reason },
288
+ InferenceError::Inference { reason } => OndeError::Inference { reason },
289
+ InferenceError::Cancelled => OndeError::Cancelled,
290
+ InferenceError::Other { reason } => OndeError::Other { reason },
291
+ }
292
+ }
293
+}
294
+
295
+// ── OndeChatEngine ────────────────────────────────────────────────────────────
296
+
297
+/// Opaque wrapper around `onde::inference::ChatEngine`.
298
+///
299
+/// Dart/Flutter receives this as an opaque `RustOpaque<OndeChatEngine>` handle.
300
+/// All methods delegate directly to the inner `ChatEngine`.
301
+pub struct OndeChatEngine {
302
+ inner: ChatEngine,
303
+}
304
+
305
+impl OndeChatEngine {
306
+ // ── Construction ──────────────────────────────────────────────────────
307
+
308
+ /// Create a new engine with no model loaded.
309
+ #[frb(sync)]
310
+ pub fn new() -> OndeChatEngine {
311
+ OndeChatEngine {
312
+ inner: ChatEngine::new(),
313
+ }
314
+ }
315
+
316
+ // ── Model lifecycle ───────────────────────────────────────────────────
317
+
318
+ /// Load a GGUF model into the engine.
319
+ ///
320
+ /// Returns the load duration in seconds on success.
321
+ pub async fn load_gguf_model(
322
+ &self,
323
+ config: GgufModelConfig,
324
+ system_prompt: Option<String>,
325
+ sampling: Option<SamplingConfig>,
326
+ ) -> Result<f64, OndeError> {
327
+ let elapsed = self
328
+ .inner
329
+ .load_gguf_model(config.into(), system_prompt, sampling.map(Into::into))
330
+ .await
331
+ .map_err(OndeError::from)?;
332
+ Ok(elapsed.as_secs_f64())
333
+ }
334
+
335
+ /// Unload the current model and release its memory.
336
+ ///
337
+ /// Returns the display name of the model that was unloaded, or `None`
338
+ /// if no model was loaded.
339
+ pub async fn unload_model(&self) -> Option<String> {
340
+ self.inner.unload_model().await
341
+ }
342
+
343
+ /// Returns `true` if a model is currently loaded and ready.
344
+ pub async fn is_loaded(&self) -> bool {
345
+ self.inner.is_loaded().await
346
+ }
347
+
348
+ /// Returns a point-in-time snapshot of the engine's state.
349
+ pub async fn info(&self) -> EngineInfo {
350
+ self.inner.info().await.into()
351
+ }
352
+
353
+ // ── Configuration ─────────────────────────────────────────────────────
354
+
355
+ /// Set or replace the system prompt.
356
+ ///
357
+ /// The prompt is prepended to every inference request and is **not**
358
+ /// stored in the conversation history.
359
+ pub async fn set_system_prompt(&self, prompt: String) {
360
+ self.inner.set_system_prompt(prompt).await;
361
+ }
362
+
363
+ /// Clear the current system prompt.
364
+ pub async fn clear_system_prompt(&self) {
365
+ self.inner.clear_system_prompt().await;
366
+ }
367
+
368
+ /// Replace the sampling configuration used for all subsequent inference.
369
+ pub async fn set_sampling(&self, sampling: SamplingConfig) {
370
+ self.inner.set_sampling(sampling.into()).await;
371
+ }
372
+
373
+ // ── Conversation history ──────────────────────────────────────────────
374
+
375
+ /// Returns a clone of the full conversation history.
376
+ pub async fn history(&self) -> Vec<ChatMessage> {
377
+ self.inner
378
+ .history()
379
+ .await
380
+ .into_iter()
381
+ .map(ChatMessage::from)
382
+ .collect()
383
+ }
384
+
385
+ /// Clear the conversation history while keeping the model loaded.
386
+ ///
387
+ /// Returns the number of turns that were removed.
388
+ pub async fn clear_history(&self) -> u64 {
389
+ self.inner.clear_history().await as u64
390
+ }
391
+
392
+ /// Append a message to history without running inference.
393
+ ///
394
+ /// Useful for restoring a saved conversation or injecting context.
395
+ pub async fn push_history(&self, message: ChatMessage) {
396
+ self.inner.push_history(message.into()).await;
397
+ }
398
+
399
+ // ── Non-streaming inference ───────────────────────────────────────────
400
+
401
+ /// Send a user message and receive a complete assistant reply.
402
+ ///
403
+ /// Both the user message and assistant reply are appended to the
404
+ /// conversation history on success.
405
+ pub async fn send_message(&self, message: String) -> Result<InferenceResult, OndeError> {
406
+ self.inner
407
+ .send_message(message)
408
+ .await
409
+ .map(InferenceResult::from)
410
+ .map_err(OndeError::from)
411
+ }
412
+
413
+ /// One-shot generation from an explicit message list.
414
+ ///
415
+ /// Does **not** modify the conversation history.
416
+ pub async fn generate(
417
+ &self,
418
+ messages: Vec<ChatMessage>,
419
+ sampling: Option<SamplingConfig>,
420
+ ) -> Result<InferenceResult, OndeError> {
421
+ let onde_messages: Vec<OndeChatMessage> =
422
+ messages.into_iter().map(OndeChatMessage::from).collect();
423
+ self.inner
424
+ .generate(onde_messages, sampling.map(Into::into))
425
+ .await
426
+ .map(InferenceResult::from)
427
+ .map_err(OndeError::from)
428
+ }
429
+
430
+ // ── Streaming inference ───────────────────────────────────────────────
431
+
432
+ /// Stream a reply token-by-token.
433
+ ///
434
+ /// Each [`StreamChunk`] carries a `delta` string. The final chunk has
435
+ /// `done == true`. The `sink` is closed automatically when the stream
436
+ /// ends or if the receiver is dropped.
437
+ pub async fn stream_message(
438
+ &self,
439
+ message: String,
440
+ sink: StreamSink<StreamChunk>,
441
+ ) -> Result<(), OndeError> {
442
+ let mut rx = self
443
+ .inner
444
+ .stream_message(message)
445
+ .await
446
+ .map_err(OndeError::from)?;
447
+
448
+ while let Some(chunk) = rx.recv().await {
449
+ let bridge_chunk = StreamChunk::from(chunk);
450
+ let done = bridge_chunk.done;
451
+ let _ = sink.add(bridge_chunk);
452
+ if done {
453
+ break;
454
+ }
455
+ }
456
+
457
+ Ok(())
458
+ }
459
+}
460
+
461
+// ── Free functions ────────────────────────────────────────────────────────────
462
+
463
+/// Return the platform-appropriate default `GgufModelConfig`.
464
+///
465
+/// Selects the 1.5B model on iOS / tvOS / Android and the 3B model on
466
+/// macOS / Windows / Linux.
467
+#[frb(sync)]
468
+pub fn default_model_config() -> GgufModelConfig {
469
+ OndeGgufModelConfig::platform_default().into()
470
+}
471
+
472
+/// `GgufModelConfig` for Qwen 2.5 1.5B Instruct Q4_K_M (~941 MB).
473
+#[frb(sync)]
474
+pub fn qwen25_1_5b_config() -> GgufModelConfig {
475
+ OndeGgufModelConfig::qwen25_1_5b().into()
476
+}
477
+
478
+/// `GgufModelConfig` for Qwen 2.5 3B Instruct Q4_K_M (~1.93 GB).
479
+#[frb(sync)]
480
+pub fn qwen25_3b_config() -> GgufModelConfig {
481
+ OndeGgufModelConfig::qwen25_3b().into()
482
+}
483
+
484
+/// `GgufModelConfig` for Qwen 2.5 Coder 1.5B Instruct Q4_K_M (~941 MB).
485
+#[frb(sync)]
486
+pub fn qwen25_coder_1_5b_config() -> GgufModelConfig {
487
+ OndeGgufModelConfig::qwen25_coder_1_5b().into()
488
+}
489
+
490
+/// `GgufModelConfig` for Qwen 2.5 Coder 3B Instruct Q4_K_M (~1.93 GB).
491
+#[frb(sync)]
492
+pub fn qwen25_coder_3b_config() -> GgufModelConfig {
493
+ OndeGgufModelConfig::qwen25_coder_3b().into()
494
+}
495
+
496
+/// Default sampling config: `temperature=0.7`, `top_p=0.95`, `max_tokens=512`.
497
+#[frb(sync)]
498
+pub fn default_sampling_config() -> SamplingConfig {
499
+ OndeSamplingConfig::default().into()
500
+}
501
+
502
+/// Deterministic sampling config: `temperature=0.0`, greedy, `max_tokens=512`.
503
+#[frb(sync)]
504
+pub fn deterministic_sampling_config() -> SamplingConfig {
505
+ OndeSamplingConfig::deterministic().into()
506
+}
507
+
508
+/// Mobile sampling config: `temperature=0.7`, `top_p=0.95`, `max_tokens=128`.
509
+#[frb(sync)]
510
+pub fn mobile_sampling_config() -> SamplingConfig {
511
+ OndeSamplingConfig::mobile().into()
512
+}
sdk/dart/rust/src/frb_generated.rs
new
+2047
@@ -0,0 +1,2047 @@
1
+// This file is automatically generated, so please do not edit it.
2
+// @generated by `flutter_rust_bridge`@ 2.12.0.
3
+
4
+#![allow(
5
+ non_camel_case_types,
6
+ unused,
7
+ non_snake_case,
8
+ clippy::needless_return,
9
+ clippy::redundant_closure_call,
10
+ clippy::redundant_closure,
11
+ clippy::useless_conversion,
12
+ clippy::unit_arg,
13
+ clippy::unused_unit,
14
+ clippy::double_parens,
15
+ clippy::let_and_return,
16
+ clippy::too_many_arguments,
17
+ clippy::match_single_binding,
18
+ clippy::clone_on_copy,
19
+ clippy::let_unit_value,
20
+ clippy::deref_addrof,
21
+ clippy::explicit_auto_deref,
22
+ clippy::borrow_deref_ref,
23
+ clippy::uninlined_format_args,
24
+ clippy::needless_borrow
25
+)]
26
+
27
+// Section: imports
28
+
29
+use crate::api::*;
30
+use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt};
31
+use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
32
+use flutter_rust_bridge::{Handler, IntoIntoDart};
33
+
34
+// Section: boilerplate
35
+
36
+flutter_rust_bridge::frb_generated_boilerplate!(
37
+ default_stream_sink_codec = SseCodec,
38
+ default_rust_opaque = RustOpaqueMoi,
39
+ default_rust_auto_opaque = RustAutoOpaqueMoi,
40
+);
41
+pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.12.0";
42
+pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -2058074152;
43
+
44
+// Section: executor
45
+
46
+flutter_rust_bridge::frb_generated_default_handler!();
47
+
48
+// Section: wire_funcs
49
+
50
+fn wire__crate__api__OndeChatEngine_clear_history_impl(
51
+ port_: flutter_rust_bridge::for_generated::MessagePort,
52
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
53
+ rust_vec_len_: i32,
54
+ data_len_: i32,
55
+) {
56
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
57
+ flutter_rust_bridge::for_generated::TaskInfo {
58
+ debug_name: "OndeChatEngine_clear_history",
59
+ port: Some(port_),
60
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
61
+ },
62
+ move || {
63
+ let message = unsafe {
64
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
65
+ ptr_,
66
+ rust_vec_len_,
67
+ data_len_,
68
+ )
69
+ };
70
+ let mut deserializer =
71
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
72
+ let api_that = <RustOpaqueMoi<
73
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
74
+ >>::sse_decode(&mut deserializer);
75
+ deserializer.end();
76
+ move |context| async move {
77
+ transform_result_sse::<_, ()>(
78
+ (move || async move {
79
+ let mut api_that_guard = None;
80
+ let decode_indices_ =
81
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
82
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
83
+ &api_that, 0, false,
84
+ )],
85
+ );
86
+ for i in decode_indices_ {
87
+ match i {
88
+ 0 => {
89
+ api_that_guard =
90
+ Some(api_that.lockable_decode_async_ref().await)
91
+ }
92
+ _ => unreachable!(),
93
+ }
94
+ }
95
+ let api_that_guard = api_that_guard.unwrap();
96
+ let output_ok = Result::<_, ()>::Ok(
97
+ crate::api::OndeChatEngine::clear_history(&*api_that_guard).await,
98
+ )?;
99
+ Ok(output_ok)
100
+ })()
101
+ .await,
102
+ )
103
+ }
104
+ },
105
+ )
106
+}
107
+fn wire__crate__api__OndeChatEngine_clear_system_prompt_impl(
108
+ port_: flutter_rust_bridge::for_generated::MessagePort,
109
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
110
+ rust_vec_len_: i32,
111
+ data_len_: i32,
112
+) {
113
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
114
+ flutter_rust_bridge::for_generated::TaskInfo {
115
+ debug_name: "OndeChatEngine_clear_system_prompt",
116
+ port: Some(port_),
117
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
118
+ },
119
+ move || {
120
+ let message = unsafe {
121
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
122
+ ptr_,
123
+ rust_vec_len_,
124
+ data_len_,
125
+ )
126
+ };
127
+ let mut deserializer =
128
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
129
+ let api_that = <RustOpaqueMoi<
130
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
131
+ >>::sse_decode(&mut deserializer);
132
+ deserializer.end();
133
+ move |context| async move {
134
+ transform_result_sse::<_, ()>(
135
+ (move || async move {
136
+ let mut api_that_guard = None;
137
+ let decode_indices_ =
138
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
139
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
140
+ &api_that, 0, false,
141
+ )],
142
+ );
143
+ for i in decode_indices_ {
144
+ match i {
145
+ 0 => {
146
+ api_that_guard =
147
+ Some(api_that.lockable_decode_async_ref().await)
148
+ }
149
+ _ => unreachable!(),
150
+ }
151
+ }
152
+ let api_that_guard = api_that_guard.unwrap();
153
+ let output_ok = Result::<_, ()>::Ok({
154
+ crate::api::OndeChatEngine::clear_system_prompt(&*api_that_guard).await;
155
+ })?;
156
+ Ok(output_ok)
157
+ })()
158
+ .await,
159
+ )
160
+ }
161
+ },
162
+ )
163
+}
164
+fn wire__crate__api__OndeChatEngine_generate_impl(
165
+ port_: flutter_rust_bridge::for_generated::MessagePort,
166
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
167
+ rust_vec_len_: i32,
168
+ data_len_: i32,
169
+) {
170
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
171
+ flutter_rust_bridge::for_generated::TaskInfo {
172
+ debug_name: "OndeChatEngine_generate",
173
+ port: Some(port_),
174
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
175
+ },
176
+ move || {
177
+ let message = unsafe {
178
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
179
+ ptr_,
180
+ rust_vec_len_,
181
+ data_len_,
182
+ )
183
+ };
184
+ let mut deserializer =
185
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
186
+ let api_that = <RustOpaqueMoi<
187
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
188
+ >>::sse_decode(&mut deserializer);
189
+ let api_messages = <Vec<crate::api::ChatMessage>>::sse_decode(&mut deserializer);
190
+ let api_sampling = <Option<crate::api::SamplingConfig>>::sse_decode(&mut deserializer);
191
+ deserializer.end();
192
+ move |context| async move {
193
+ transform_result_sse::<_, crate::api::OndeError>(
194
+ (move || async move {
195
+ let mut api_that_guard = None;
196
+ let decode_indices_ =
197
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
198
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
199
+ &api_that, 0, false,
200
+ )],
201
+ );
202
+ for i in decode_indices_ {
203
+ match i {
204
+ 0 => {
205
+ api_that_guard =
206
+ Some(api_that.lockable_decode_async_ref().await)
207
+ }
208
+ _ => unreachable!(),
209
+ }
210
+ }
211
+ let api_that_guard = api_that_guard.unwrap();
212
+ let output_ok = crate::api::OndeChatEngine::generate(
213
+ &*api_that_guard,
214
+ api_messages,
215
+ api_sampling,
216
+ )
217
+ .await?;
218
+ Ok(output_ok)
219
+ })()
220
+ .await,
221
+ )
222
+ }
223
+ },
224
+ )
225
+}
226
+fn wire__crate__api__OndeChatEngine_history_impl(
227
+ port_: flutter_rust_bridge::for_generated::MessagePort,
228
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
229
+ rust_vec_len_: i32,
230
+ data_len_: i32,
231
+) {
232
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
233
+ flutter_rust_bridge::for_generated::TaskInfo {
234
+ debug_name: "OndeChatEngine_history",
235
+ port: Some(port_),
236
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
237
+ },
238
+ move || {
239
+ let message = unsafe {
240
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
241
+ ptr_,
242
+ rust_vec_len_,
243
+ data_len_,
244
+ )
245
+ };
246
+ let mut deserializer =
247
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
248
+ let api_that = <RustOpaqueMoi<
249
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
250
+ >>::sse_decode(&mut deserializer);
251
+ deserializer.end();
252
+ move |context| async move {
253
+ transform_result_sse::<_, ()>(
254
+ (move || async move {
255
+ let mut api_that_guard = None;
256
+ let decode_indices_ =
257
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
258
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
259
+ &api_that, 0, false,
260
+ )],
261
+ );
262
+ for i in decode_indices_ {
263
+ match i {
264
+ 0 => {
265
+ api_that_guard =
266
+ Some(api_that.lockable_decode_async_ref().await)
267
+ }
268
+ _ => unreachable!(),
269
+ }
270
+ }
271
+ let api_that_guard = api_that_guard.unwrap();
272
+ let output_ok = Result::<_, ()>::Ok(
273
+ crate::api::OndeChatEngine::history(&*api_that_guard).await,
274
+ )?;
275
+ Ok(output_ok)
276
+ })()
277
+ .await,
278
+ )
279
+ }
280
+ },
281
+ )
282
+}
283
+fn wire__crate__api__OndeChatEngine_info_impl(
284
+ port_: flutter_rust_bridge::for_generated::MessagePort,
285
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
286
+ rust_vec_len_: i32,
287
+ data_len_: i32,
288
+) {
289
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
290
+ flutter_rust_bridge::for_generated::TaskInfo {
291
+ debug_name: "OndeChatEngine_info",
292
+ port: Some(port_),
293
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
294
+ },
295
+ move || {
296
+ let message = unsafe {
297
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
298
+ ptr_,
299
+ rust_vec_len_,
300
+ data_len_,
301
+ )
302
+ };
303
+ let mut deserializer =
304
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
305
+ let api_that = <RustOpaqueMoi<
306
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
307
+ >>::sse_decode(&mut deserializer);
308
+ deserializer.end();
309
+ move |context| async move {
310
+ transform_result_sse::<_, ()>(
311
+ (move || async move {
312
+ let mut api_that_guard = None;
313
+ let decode_indices_ =
314
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
315
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
316
+ &api_that, 0, false,
317
+ )],
318
+ );
319
+ for i in decode_indices_ {
320
+ match i {
321
+ 0 => {
322
+ api_that_guard =
323
+ Some(api_that.lockable_decode_async_ref().await)
324
+ }
325
+ _ => unreachable!(),
326
+ }
327
+ }
328
+ let api_that_guard = api_that_guard.unwrap();
329
+ let output_ok = Result::<_, ()>::Ok(
330
+ crate::api::OndeChatEngine::info(&*api_that_guard).await,
331
+ )?;
332
+ Ok(output_ok)
333
+ })()
334
+ .await,
335
+ )
336
+ }
337
+ },
338
+ )
339
+}
340
+fn wire__crate__api__OndeChatEngine_is_loaded_impl(
341
+ port_: flutter_rust_bridge::for_generated::MessagePort,
342
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
343
+ rust_vec_len_: i32,
344
+ data_len_: i32,
345
+) {
346
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
347
+ flutter_rust_bridge::for_generated::TaskInfo {
348
+ debug_name: "OndeChatEngine_is_loaded",
349
+ port: Some(port_),
350
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
351
+ },
352
+ move || {
353
+ let message = unsafe {
354
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
355
+ ptr_,
356
+ rust_vec_len_,
357
+ data_len_,
358
+ )
359
+ };
360
+ let mut deserializer =
361
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
362
+ let api_that = <RustOpaqueMoi<
363
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
364
+ >>::sse_decode(&mut deserializer);
365
+ deserializer.end();
366
+ move |context| async move {
367
+ transform_result_sse::<_, ()>(
368
+ (move || async move {
369
+ let mut api_that_guard = None;
370
+ let decode_indices_ =
371
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
372
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
373
+ &api_that, 0, false,
374
+ )],
375
+ );
376
+ for i in decode_indices_ {
377
+ match i {
378
+ 0 => {
379
+ api_that_guard =
380
+ Some(api_that.lockable_decode_async_ref().await)
381
+ }
382
+ _ => unreachable!(),
383
+ }
384
+ }
385
+ let api_that_guard = api_that_guard.unwrap();
386
+ let output_ok = Result::<_, ()>::Ok(
387
+ crate::api::OndeChatEngine::is_loaded(&*api_that_guard).await,
388
+ )?;
389
+ Ok(output_ok)
390
+ })()
391
+ .await,
392
+ )
393
+ }
394
+ },
395
+ )
396
+}
397
+fn wire__crate__api__OndeChatEngine_load_gguf_model_impl(
398
+ port_: flutter_rust_bridge::for_generated::MessagePort,
399
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
400
+ rust_vec_len_: i32,
401
+ data_len_: i32,
402
+) {
403
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
404
+ flutter_rust_bridge::for_generated::TaskInfo {
405
+ debug_name: "OndeChatEngine_load_gguf_model",
406
+ port: Some(port_),
407
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
408
+ },
409
+ move || {
410
+ let message = unsafe {
411
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
412
+ ptr_,
413
+ rust_vec_len_,
414
+ data_len_,
415
+ )
416
+ };
417
+ let mut deserializer =
418
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
419
+ let api_that = <RustOpaqueMoi<
420
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
421
+ >>::sse_decode(&mut deserializer);
422
+ let api_config = <crate::api::GgufModelConfig>::sse_decode(&mut deserializer);
423
+ let api_system_prompt = <Option<String>>::sse_decode(&mut deserializer);
424
+ let api_sampling = <Option<crate::api::SamplingConfig>>::sse_decode(&mut deserializer);
425
+ deserializer.end();
426
+ move |context| async move {
427
+ transform_result_sse::<_, crate::api::OndeError>(
428
+ (move || async move {
429
+ let mut api_that_guard = None;
430
+ let decode_indices_ =
431
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
432
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
433
+ &api_that, 0, false,
434
+ )],
435
+ );
436
+ for i in decode_indices_ {
437
+ match i {
438
+ 0 => {
439
+ api_that_guard =
440
+ Some(api_that.lockable_decode_async_ref().await)
441
+ }
442
+ _ => unreachable!(),
443
+ }
444
+ }
445
+ let api_that_guard = api_that_guard.unwrap();
446
+ let output_ok = crate::api::OndeChatEngine::load_gguf_model(
447
+ &*api_that_guard,
448
+ api_config,
449
+ api_system_prompt,
450
+ api_sampling,
451
+ )
452
+ .await?;
453
+ Ok(output_ok)
454
+ })()
455
+ .await,
456
+ )
457
+ }
458
+ },
459
+ )
460
+}
461
+fn wire__crate__api__OndeChatEngine_new_impl(
462
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
463
+ rust_vec_len_: i32,
464
+ data_len_: i32,
465
+) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
466
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
467
+ flutter_rust_bridge::for_generated::TaskInfo {
468
+ debug_name: "OndeChatEngine_new",
469
+ port: None,
470
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
471
+ },
472
+ move || {
473
+ let message = unsafe {
474
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
475
+ ptr_,
476
+ rust_vec_len_,
477
+ data_len_,
478
+ )
479
+ };
480
+ let mut deserializer =
481
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
482
+ deserializer.end();
483
+ transform_result_sse::<_, ()>((move || {
484
+ let output_ok = Result::<_, ()>::Ok(crate::api::OndeChatEngine::new())?;
485
+ Ok(output_ok)
486
+ })())
487
+ },
488
+ )
489
+}
490
+fn wire__crate__api__OndeChatEngine_push_history_impl(
491
+ port_: flutter_rust_bridge::for_generated::MessagePort,
492
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
493
+ rust_vec_len_: i32,
494
+ data_len_: i32,
495
+) {
496
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
497
+ flutter_rust_bridge::for_generated::TaskInfo {
498
+ debug_name: "OndeChatEngine_push_history",
499
+ port: Some(port_),
500
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
501
+ },
502
+ move || {
503
+ let message = unsafe {
504
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
505
+ ptr_,
506
+ rust_vec_len_,
507
+ data_len_,
508
+ )
509
+ };
510
+ let mut deserializer =
511
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
512
+ let api_that = <RustOpaqueMoi<
513
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
514
+ >>::sse_decode(&mut deserializer);
515
+ let api_message = <crate::api::ChatMessage>::sse_decode(&mut deserializer);
516
+ deserializer.end();
517
+ move |context| async move {
518
+ transform_result_sse::<_, ()>(
519
+ (move || async move {
520
+ let mut api_that_guard = None;
521
+ let decode_indices_ =
522
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
523
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
524
+ &api_that, 0, false,
525
+ )],
526
+ );
527
+ for i in decode_indices_ {
528
+ match i {
529
+ 0 => {
530
+ api_that_guard =
531
+ Some(api_that.lockable_decode_async_ref().await)
532
+ }
533
+ _ => unreachable!(),
534
+ }
535
+ }
536
+ let api_that_guard = api_that_guard.unwrap();
537
+ let output_ok = Result::<_, ()>::Ok({
538
+ crate::api::OndeChatEngine::push_history(&*api_that_guard, api_message)
539
+ .await;
540
+ })?;
541
+ Ok(output_ok)
542
+ })()
543
+ .await,
544
+ )
545
+ }
546
+ },
547
+ )
548
+}
549
+fn wire__crate__api__OndeChatEngine_send_message_impl(
550
+ port_: flutter_rust_bridge::for_generated::MessagePort,
551
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
552
+ rust_vec_len_: i32,
553
+ data_len_: i32,
554
+) {
555
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
556
+ flutter_rust_bridge::for_generated::TaskInfo {
557
+ debug_name: "OndeChatEngine_send_message",
558
+ port: Some(port_),
559
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
560
+ },
561
+ move || {
562
+ let message = unsafe {
563
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
564
+ ptr_,
565
+ rust_vec_len_,
566
+ data_len_,
567
+ )
568
+ };
569
+ let mut deserializer =
570
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
571
+ let api_that = <RustOpaqueMoi<
572
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
573
+ >>::sse_decode(&mut deserializer);
574
+ let api_message = <String>::sse_decode(&mut deserializer);
575
+ deserializer.end();
576
+ move |context| async move {
577
+ transform_result_sse::<_, crate::api::OndeError>(
578
+ (move || async move {
579
+ let mut api_that_guard = None;
580
+ let decode_indices_ =
581
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
582
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
583
+ &api_that, 0, false,
584
+ )],
585
+ );
586
+ for i in decode_indices_ {
587
+ match i {
588
+ 0 => {
589
+ api_that_guard =
590
+ Some(api_that.lockable_decode_async_ref().await)
591
+ }
592
+ _ => unreachable!(),
593
+ }
594
+ }
595
+ let api_that_guard = api_that_guard.unwrap();
596
+ let output_ok =
597
+ crate::api::OndeChatEngine::send_message(&*api_that_guard, api_message)
598
+ .await?;
599
+ Ok(output_ok)
600
+ })()
601
+ .await,
602
+ )
603
+ }
604
+ },
605
+ )
606
+}
607
+fn wire__crate__api__OndeChatEngine_set_sampling_impl(
608
+ port_: flutter_rust_bridge::for_generated::MessagePort,
609
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
610
+ rust_vec_len_: i32,
611
+ data_len_: i32,
612
+) {
613
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
614
+ flutter_rust_bridge::for_generated::TaskInfo {
615
+ debug_name: "OndeChatEngine_set_sampling",
616
+ port: Some(port_),
617
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
618
+ },
619
+ move || {
620
+ let message = unsafe {
621
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
622
+ ptr_,
623
+ rust_vec_len_,
624
+ data_len_,
625
+ )
626
+ };
627
+ let mut deserializer =
628
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
629
+ let api_that = <RustOpaqueMoi<
630
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
631
+ >>::sse_decode(&mut deserializer);
632
+ let api_sampling = <crate::api::SamplingConfig>::sse_decode(&mut deserializer);
633
+ deserializer.end();
634
+ move |context| async move {
635
+ transform_result_sse::<_, ()>(
636
+ (move || async move {
637
+ let mut api_that_guard = None;
638
+ let decode_indices_ =
639
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
640
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
641
+ &api_that, 0, false,
642
+ )],
643
+ );
644
+ for i in decode_indices_ {
645
+ match i {
646
+ 0 => {
647
+ api_that_guard =
648
+ Some(api_that.lockable_decode_async_ref().await)
649
+ }
650
+ _ => unreachable!(),
651
+ }
652
+ }
653
+ let api_that_guard = api_that_guard.unwrap();
654
+ let output_ok = Result::<_, ()>::Ok({
655
+ crate::api::OndeChatEngine::set_sampling(
656
+ &*api_that_guard,
657
+ api_sampling,
658
+ )
659
+ .await;
660
+ })?;
661
+ Ok(output_ok)
662
+ })()
663
+ .await,
664
+ )
665
+ }
666
+ },
667
+ )
668
+}
669
+fn wire__crate__api__OndeChatEngine_set_system_prompt_impl(
670
+ port_: flutter_rust_bridge::for_generated::MessagePort,
671
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
672
+ rust_vec_len_: i32,
673
+ data_len_: i32,
674
+) {
675
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
676
+ flutter_rust_bridge::for_generated::TaskInfo {
677
+ debug_name: "OndeChatEngine_set_system_prompt",
678
+ port: Some(port_),
679
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
680
+ },
681
+ move || {
682
+ let message = unsafe {
683
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
684
+ ptr_,
685
+ rust_vec_len_,
686
+ data_len_,
687
+ )
688
+ };
689
+ let mut deserializer =
690
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
691
+ let api_that = <RustOpaqueMoi<
692
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
693
+ >>::sse_decode(&mut deserializer);
694
+ let api_prompt = <String>::sse_decode(&mut deserializer);
695
+ deserializer.end();
696
+ move |context| async move {
697
+ transform_result_sse::<_, ()>(
698
+ (move || async move {
699
+ let mut api_that_guard = None;
700
+ let decode_indices_ =
701
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
702
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
703
+ &api_that, 0, false,
704
+ )],
705
+ );
706
+ for i in decode_indices_ {
707
+ match i {
708
+ 0 => {
709
+ api_that_guard =
710
+ Some(api_that.lockable_decode_async_ref().await)
711
+ }
712
+ _ => unreachable!(),
713
+ }
714
+ }
715
+ let api_that_guard = api_that_guard.unwrap();
716
+ let output_ok = Result::<_, ()>::Ok({
717
+ crate::api::OndeChatEngine::set_system_prompt(
718
+ &*api_that_guard,
719
+ api_prompt,
720
+ )
721
+ .await;
722
+ })?;
723
+ Ok(output_ok)
724
+ })()
725
+ .await,
726
+ )
727
+ }
728
+ },
729
+ )
730
+}
731
+fn wire__crate__api__OndeChatEngine_stream_message_impl(
732
+ port_: flutter_rust_bridge::for_generated::MessagePort,
733
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
734
+ rust_vec_len_: i32,
735
+ data_len_: i32,
736
+) {
737
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
738
+ flutter_rust_bridge::for_generated::TaskInfo {
739
+ debug_name: "OndeChatEngine_stream_message",
740
+ port: Some(port_),
741
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
742
+ },
743
+ move || {
744
+ let message = unsafe {
745
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
746
+ ptr_,
747
+ rust_vec_len_,
748
+ data_len_,
749
+ )
750
+ };
751
+ let mut deserializer =
752
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
753
+ let api_that = <RustOpaqueMoi<
754
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
755
+ >>::sse_decode(&mut deserializer);
756
+ let api_message = <String>::sse_decode(&mut deserializer);
757
+ let api_sink = <StreamSink<
758
+ crate::api::StreamChunk,
759
+ flutter_rust_bridge::for_generated::SseCodec,
760
+ >>::sse_decode(&mut deserializer);
761
+ deserializer.end();
762
+ move |context| async move {
763
+ transform_result_sse::<_, crate::api::OndeError>(
764
+ (move || async move {
765
+ let mut api_that_guard = None;
766
+ let decode_indices_ =
767
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
768
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
769
+ &api_that, 0, false,
770
+ )],
771
+ );
772
+ for i in decode_indices_ {
773
+ match i {
774
+ 0 => {
775
+ api_that_guard =
776
+ Some(api_that.lockable_decode_async_ref().await)
777
+ }
778
+ _ => unreachable!(),
779
+ }
780
+ }
781
+ let api_that_guard = api_that_guard.unwrap();
782
+ let output_ok = crate::api::OndeChatEngine::stream_message(
783
+ &*api_that_guard,
784
+ api_message,
785
+ api_sink,
786
+ )
787
+ .await?;
788
+ Ok(output_ok)
789
+ })()
790
+ .await,
791
+ )
792
+ }
793
+ },
794
+ )
795
+}
796
+fn wire__crate__api__OndeChatEngine_unload_model_impl(
797
+ port_: flutter_rust_bridge::for_generated::MessagePort,
798
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
799
+ rust_vec_len_: i32,
800
+ data_len_: i32,
801
+) {
802
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::SseCodec, _, _, _>(
803
+ flutter_rust_bridge::for_generated::TaskInfo {
804
+ debug_name: "OndeChatEngine_unload_model",
805
+ port: Some(port_),
806
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
807
+ },
808
+ move || {
809
+ let message = unsafe {
810
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
811
+ ptr_,
812
+ rust_vec_len_,
813
+ data_len_,
814
+ )
815
+ };
816
+ let mut deserializer =
817
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
818
+ let api_that = <RustOpaqueMoi<
819
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
820
+ >>::sse_decode(&mut deserializer);
821
+ deserializer.end();
822
+ move |context| async move {
823
+ transform_result_sse::<_, ()>(
824
+ (move || async move {
825
+ let mut api_that_guard = None;
826
+ let decode_indices_ =
827
+ flutter_rust_bridge::for_generated::lockable_compute_decode_order(
828
+ vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
829
+ &api_that, 0, false,
830
+ )],
831
+ );
832
+ for i in decode_indices_ {
833
+ match i {
834
+ 0 => {
835
+ api_that_guard =
836
+ Some(api_that.lockable_decode_async_ref().await)
837
+ }
838
+ _ => unreachable!(),
839
+ }
840
+ }
841
+ let api_that_guard = api_that_guard.unwrap();
842
+ let output_ok = Result::<_, ()>::Ok(
843
+ crate::api::OndeChatEngine::unload_model(&*api_that_guard).await,
844
+ )?;
845
+ Ok(output_ok)
846
+ })()
847
+ .await,
848
+ )
849
+ }
850
+ },
851
+ )
852
+}
853
+fn wire__crate__api__default_model_config_impl(
854
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
855
+ rust_vec_len_: i32,
856
+ data_len_: i32,
857
+) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
858
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
859
+ flutter_rust_bridge::for_generated::TaskInfo {
860
+ debug_name: "default_model_config",
861
+ port: None,
862
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
863
+ },
864
+ move || {
865
+ let message = unsafe {
866
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
867
+ ptr_,
868
+ rust_vec_len_,
869
+ data_len_,
870
+ )
871
+ };
872
+ let mut deserializer =
873
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
874
+ deserializer.end();
875
+ transform_result_sse::<_, ()>((move || {
876
+ let output_ok = Result::<_, ()>::Ok(crate::api::default_model_config())?;
877
+ Ok(output_ok)
878
+ })())
879
+ },
880
+ )
881
+}
882
+fn wire__crate__api__default_sampling_config_impl(
883
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
884
+ rust_vec_len_: i32,
885
+ data_len_: i32,
886
+) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
887
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
888
+ flutter_rust_bridge::for_generated::TaskInfo {
889
+ debug_name: "default_sampling_config",
890
+ port: None,
891
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
892
+ },
893
+ move || {
894
+ let message = unsafe {
895
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
896
+ ptr_,
897
+ rust_vec_len_,
898
+ data_len_,
899
+ )
900
+ };
901
+ let mut deserializer =
902
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
903
+ deserializer.end();
904
+ transform_result_sse::<_, ()>((move || {
905
+ let output_ok = Result::<_, ()>::Ok(crate::api::default_sampling_config())?;
906
+ Ok(output_ok)
907
+ })())
908
+ },
909
+ )
910
+}
911
+fn wire__crate__api__deterministic_sampling_config_impl(
912
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
913
+ rust_vec_len_: i32,
914
+ data_len_: i32,
915
+) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
916
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
917
+ flutter_rust_bridge::for_generated::TaskInfo {
918
+ debug_name: "deterministic_sampling_config",
919
+ port: None,
920
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
921
+ },
922
+ move || {
923
+ let message = unsafe {
924
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
925
+ ptr_,
926
+ rust_vec_len_,
927
+ data_len_,
928
+ )
929
+ };
930
+ let mut deserializer =
931
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
932
+ deserializer.end();
933
+ transform_result_sse::<_, ()>((move || {
934
+ let output_ok = Result::<_, ()>::Ok(crate::api::deterministic_sampling_config())?;
935
+ Ok(output_ok)
936
+ })())
937
+ },
938
+ )
939
+}
940
+fn wire__crate__api__mobile_sampling_config_impl(
941
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
942
+ rust_vec_len_: i32,
943
+ data_len_: i32,
944
+) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
945
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
946
+ flutter_rust_bridge::for_generated::TaskInfo {
947
+ debug_name: "mobile_sampling_config",
948
+ port: None,
949
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
950
+ },
951
+ move || {
952
+ let message = unsafe {
953
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
954
+ ptr_,
955
+ rust_vec_len_,
956
+ data_len_,
957
+ )
958
+ };
959
+ let mut deserializer =
960
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
961
+ deserializer.end();
962
+ transform_result_sse::<_, ()>((move || {
963
+ let output_ok = Result::<_, ()>::Ok(crate::api::mobile_sampling_config())?;
964
+ Ok(output_ok)
965
+ })())
966
+ },
967
+ )
968
+}
969
+fn wire__crate__api__qwen25_1_5b_config_impl(
970
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
971
+ rust_vec_len_: i32,
972
+ data_len_: i32,
973
+) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
974
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
975
+ flutter_rust_bridge::for_generated::TaskInfo {
976
+ debug_name: "qwen25_1_5b_config",
977
+ port: None,
978
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
979
+ },
980
+ move || {
981
+ let message = unsafe {
982
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
983
+ ptr_,
984
+ rust_vec_len_,
985
+ data_len_,
986
+ )
987
+ };
988
+ let mut deserializer =
989
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
990
+ deserializer.end();
991
+ transform_result_sse::<_, ()>((move || {
992
+ let output_ok = Result::<_, ()>::Ok(crate::api::qwen25_1_5b_config())?;
993
+ Ok(output_ok)
994
+ })())
995
+ },
996
+ )
997
+}
998
+fn wire__crate__api__qwen25_3b_config_impl(
999
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
1000
+ rust_vec_len_: i32,
1001
+ data_len_: i32,
1002
+) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
1003
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
1004
+ flutter_rust_bridge::for_generated::TaskInfo {
1005
+ debug_name: "qwen25_3b_config",
1006
+ port: None,
1007
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
1008
+ },
1009
+ move || {
1010
+ let message = unsafe {
1011
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
1012
+ ptr_,
1013
+ rust_vec_len_,
1014
+ data_len_,
1015
+ )
1016
+ };
1017
+ let mut deserializer =
1018
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
1019
+ deserializer.end();
1020
+ transform_result_sse::<_, ()>((move || {
1021
+ let output_ok = Result::<_, ()>::Ok(crate::api::qwen25_3b_config())?;
1022
+ Ok(output_ok)
1023
+ })())
1024
+ },
1025
+ )
1026
+}
1027
+fn wire__crate__api__qwen25_coder_1_5b_config_impl(
1028
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
1029
+ rust_vec_len_: i32,
1030
+ data_len_: i32,
1031
+) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
1032
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
1033
+ flutter_rust_bridge::for_generated::TaskInfo {
1034
+ debug_name: "qwen25_coder_1_5b_config",
1035
+ port: None,
1036
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
1037
+ },
1038
+ move || {
1039
+ let message = unsafe {
1040
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
1041
+ ptr_,
1042
+ rust_vec_len_,
1043
+ data_len_,
1044
+ )
1045
+ };
1046
+ let mut deserializer =
1047
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
1048
+ deserializer.end();
1049
+ transform_result_sse::<_, ()>((move || {
1050
+ let output_ok = Result::<_, ()>::Ok(crate::api::qwen25_coder_1_5b_config())?;
1051
+ Ok(output_ok)
1052
+ })())
1053
+ },
1054
+ )
1055
+}
1056
+fn wire__crate__api__qwen25_coder_3b_config_impl(
1057
+ ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
1058
+ rust_vec_len_: i32,
1059
+ data_len_: i32,
1060
+) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
1061
+ FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec, _>(
1062
+ flutter_rust_bridge::for_generated::TaskInfo {
1063
+ debug_name: "qwen25_coder_3b_config",
1064
+ port: None,
1065
+ mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
1066
+ },
1067
+ move || {
1068
+ let message = unsafe {
1069
+ flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(
1070
+ ptr_,
1071
+ rust_vec_len_,
1072
+ data_len_,
1073
+ )
1074
+ };
1075
+ let mut deserializer =
1076
+ flutter_rust_bridge::for_generated::SseDeserializer::new(message);
1077
+ deserializer.end();
1078
+ transform_result_sse::<_, ()>((move || {
1079
+ let output_ok = Result::<_, ()>::Ok(crate::api::qwen25_coder_3b_config())?;
1080
+ Ok(output_ok)
1081
+ })())
1082
+ },
1083
+ )
1084
+}
1085
+
1086
+// Section: related_funcs
1087
+
1088
+flutter_rust_bridge::frb_generated_moi_arc_impl_value!(
1089
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>
1090
+);
1091
+
1092
+// Section: dart2rust
1093
+
1094
+impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error {
1095
+ // Codec=Sse (Serialization based), see doc to use other codecs
1096
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1097
+ let mut inner = <String>::sse_decode(deserializer);
1098
+ return flutter_rust_bridge::for_generated::anyhow::anyhow!("{}", inner);
1099
+ }
1100
+}
1101
+
1102
+impl SseDecode for OndeChatEngine {
1103
+ // Codec=Sse (Serialization based), see doc to use other codecs
1104
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1105
+ let mut inner = <RustOpaqueMoi<
1106
+ flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>,
1107
+ >>::sse_decode(deserializer);
1108
+ return flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(inner);
1109
+ }
1110
+}
1111
+
1112
+impl SseDecode
1113
+ for RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>>
1114
+{
1115
+ // Codec=Sse (Serialization based), see doc to use other codecs
1116
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1117
+ let mut inner = <usize>::sse_decode(deserializer);
1118
+ return decode_rust_opaque_moi(inner);
1119
+ }
1120
+}
1121
+
1122
+impl SseDecode
1123
+ for StreamSink<crate::api::StreamChunk, flutter_rust_bridge::for_generated::SseCodec>
1124
+{
1125
+ // Codec=Sse (Serialization based), see doc to use other codecs
1126
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1127
+ let mut inner = <String>::sse_decode(deserializer);
1128
+ return StreamSink::deserialize(inner);
1129
+ }
1130
+}
1131
+
1132
+impl SseDecode for String {
1133
+ // Codec=Sse (Serialization based), see doc to use other codecs
1134
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1135
+ let mut inner = <Vec<u8>>::sse_decode(deserializer);
1136
+ return String::from_utf8(inner).unwrap();
1137
+ }
1138
+}
1139
+
1140
+impl SseDecode for bool {
1141
+ // Codec=Sse (Serialization based), see doc to use other codecs
1142
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1143
+ deserializer.cursor.read_u8().unwrap() != 0
1144
+ }
1145
+}
1146
+
1147
+impl SseDecode for crate::api::ChatMessage {
1148
+ // Codec=Sse (Serialization based), see doc to use other codecs
1149
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1150
+ let mut var_role = <crate::api::ChatRole>::sse_decode(deserializer);
1151
+ let mut var_content = <String>::sse_decode(deserializer);
1152
+ return crate::api::ChatMessage {
1153
+ role: var_role,
1154
+ content: var_content,
1155
+ };
1156
+ }
1157
+}
1158
+
1159
+impl SseDecode for crate::api::ChatRole {
1160
+ // Codec=Sse (Serialization based), see doc to use other codecs
1161
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1162
+ let mut inner = <i32>::sse_decode(deserializer);
1163
+ return match inner {
1164
+ 0 => crate::api::ChatRole::System,
1165
+ 1 => crate::api::ChatRole::User,
1166
+ 2 => crate::api::ChatRole::Assistant,
1167
+ _ => unreachable!("Invalid variant for ChatRole: {}", inner),
1168
+ };
1169
+ }
1170
+}
1171
+
1172
+impl SseDecode for crate::api::EngineInfo {
1173
+ // Codec=Sse (Serialization based), see doc to use other codecs
1174
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1175
+ let mut var_status = <crate::api::EngineStatus>::sse_decode(deserializer);
1176
+ let mut var_modelName = <Option<String>>::sse_decode(deserializer);
1177
+ let mut var_approxMemory = <Option<String>>::sse_decode(deserializer);
1178
+ let mut var_historyLength = <u64>::sse_decode(deserializer);
1179
+ return crate::api::EngineInfo {
1180
+ status: var_status,
1181
+ model_name: var_modelName,
1182
+ approx_memory: var_approxMemory,
1183
+ history_length: var_historyLength,
1184
+ };
1185
+ }
1186
+}
1187
+
1188
+impl SseDecode for crate::api::EngineStatus {
1189
+ // Codec=Sse (Serialization based), see doc to use other codecs
1190
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1191
+ let mut inner = <i32>::sse_decode(deserializer);
1192
+ return match inner {
1193
+ 0 => crate::api::EngineStatus::Unloaded,
1194
+ 1 => crate::api::EngineStatus::Loading,
1195
+ 2 => crate::api::EngineStatus::Ready,
1196
+ 3 => crate::api::EngineStatus::Generating,
1197
+ 4 => crate::api::EngineStatus::Error,
1198
+ _ => unreachable!("Invalid variant for EngineStatus: {}", inner),
1199
+ };
1200
+ }
1201
+}
1202
+
1203
+impl SseDecode for f32 {
1204
+ // Codec=Sse (Serialization based), see doc to use other codecs
1205
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1206
+ deserializer.cursor.read_f32::<NativeEndian>().unwrap()
1207
+ }
1208
+}
1209
+
1210
+impl SseDecode for f64 {
1211
+ // Codec=Sse (Serialization based), see doc to use other codecs
1212
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1213
+ deserializer.cursor.read_f64::<NativeEndian>().unwrap()
1214
+ }
1215
+}
1216
+
1217
+impl SseDecode for crate::api::GgufModelConfig {
1218
+ // Codec=Sse (Serialization based), see doc to use other codecs
1219
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1220
+ let mut var_modelId = <String>::sse_decode(deserializer);
1221
+ let mut var_files = <Vec<String>>::sse_decode(deserializer);
1222
+ let mut var_tokModelId = <Option<String>>::sse_decode(deserializer);
1223
+ let mut var_displayName = <String>::sse_decode(deserializer);
1224
+ let mut var_approxMemory = <String>::sse_decode(deserializer);
1225
+ return crate::api::GgufModelConfig {
1226
+ model_id: var_modelId,
1227
+ files: var_files,
1228
+ tok_model_id: var_tokModelId,
1229
+ display_name: var_displayName,
1230
+ approx_memory: var_approxMemory,
1231
+ };
1232
+ }
1233
+}
1234
+
1235
+impl SseDecode for i32 {
1236
+ // Codec=Sse (Serialization based), see doc to use other codecs
1237
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1238
+ deserializer.cursor.read_i32::<NativeEndian>().unwrap()
1239
+ }
1240
+}
1241
+
1242
+impl SseDecode for crate::api::InferenceResult {
1243
+ // Codec=Sse (Serialization based), see doc to use other codecs
1244
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1245
+ let mut var_text = <String>::sse_decode(deserializer);
1246
+ let mut var_durationSecs = <f64>::sse_decode(deserializer);
1247
+ let mut var_durationDisplay = <String>::sse_decode(deserializer);
1248
+ let mut var_finishReason = <String>::sse_decode(deserializer);
1249
+ return crate::api::InferenceResult {
1250
+ text: var_text,
1251
+ duration_secs: var_durationSecs,
1252
+ duration_display: var_durationDisplay,
1253
+ finish_reason: var_finishReason,
1254
+ };
1255
+ }
1256
+}
1257
+
1258
+impl SseDecode for Vec<String> {
1259
+ // Codec=Sse (Serialization based), see doc to use other codecs
1260
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1261
+ let mut len_ = <i32>::sse_decode(deserializer);
1262
+ let mut ans_ = Vec::with_capacity(len_ as usize);
1263
+ for idx_ in 0..len_ {
1264
+ ans_.push(<String>::sse_decode(deserializer));
1265
+ }
1266
+ return ans_;
1267
+ }
1268
+}
1269
+
1270
+impl SseDecode for Vec<crate::api::ChatMessage> {
1271
+ // Codec=Sse (Serialization based), see doc to use other codecs
1272
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1273
+ let mut len_ = <i32>::sse_decode(deserializer);
1274
+ let mut ans_ = Vec::with_capacity(len_ as usize);
1275
+ for idx_ in 0..len_ {
1276
+ ans_.push(<crate::api::ChatMessage>::sse_decode(deserializer));
1277
+ }
1278
+ return ans_;
1279
+ }
1280
+}
1281
+
1282
+impl SseDecode for Vec<u8> {
1283
+ // Codec=Sse (Serialization based), see doc to use other codecs
1284
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1285
+ let mut len_ = <i32>::sse_decode(deserializer);
1286
+ let mut ans_ = Vec::with_capacity(len_ as usize);
1287
+ for idx_ in 0..len_ {
1288
+ ans_.push(<u8>::sse_decode(deserializer));
1289
+ }
1290
+ return ans_;
1291
+ }
1292
+}
1293
+
1294
+impl SseDecode for crate::api::OndeError {
1295
+ // Codec=Sse (Serialization based), see doc to use other codecs
1296
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1297
+ let mut tag_ = <i32>::sse_decode(deserializer);
1298
+ match tag_ {
1299
+ 0 => {
1300
+ return crate::api::OndeError::NoModelLoaded;
1301
+ }
1302
+ 1 => {
1303
+ let mut var_modelName = <String>::sse_decode(deserializer);
1304
+ return crate::api::OndeError::AlreadyLoaded {
1305
+ model_name: var_modelName,
1306
+ };
1307
+ }
1308
+ 2 => {
1309
+ let mut var_reason = <String>::sse_decode(deserializer);
1310
+ return crate::api::OndeError::ModelBuild { reason: var_reason };
1311
+ }
1312
+ 3 => {
1313
+ let mut var_reason = <String>::sse_decode(deserializer);
1314
+ return crate::api::OndeError::Inference { reason: var_reason };
1315
+ }
1316
+ 4 => {
1317
+ return crate::api::OndeError::Cancelled;
1318
+ }
1319
+ 5 => {
1320
+ let mut var_reason = <String>::sse_decode(deserializer);
1321
+ return crate::api::OndeError::Other { reason: var_reason };
1322
+ }
1323
+ _ => {
1324
+ unimplemented!("");
1325
+ }
1326
+ }
1327
+ }
1328
+}
1329
+
1330
+impl SseDecode for Option<String> {
1331
+ // Codec=Sse (Serialization based), see doc to use other codecs
1332
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1333
+ if (<bool>::sse_decode(deserializer)) {
1334
+ return Some(<String>::sse_decode(deserializer));
1335
+ } else {
1336
+ return None;
1337
+ }
1338
+ }
1339
+}
1340
+
1341
+impl SseDecode for Option<f32> {
1342
+ // Codec=Sse (Serialization based), see doc to use other codecs
1343
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1344
+ if (<bool>::sse_decode(deserializer)) {
1345
+ return Some(<f32>::sse_decode(deserializer));
1346
+ } else {
1347
+ return None;
1348
+ }
1349
+ }
1350
+}
1351
+
1352
+impl SseDecode for Option<f64> {
1353
+ // Codec=Sse (Serialization based), see doc to use other codecs
1354
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1355
+ if (<bool>::sse_decode(deserializer)) {
1356
+ return Some(<f64>::sse_decode(deserializer));
1357
+ } else {
1358
+ return None;
1359
+ }
1360
+ }
1361
+}
1362
+
1363
+impl SseDecode for Option<crate::api::SamplingConfig> {
1364
+ // Codec=Sse (Serialization based), see doc to use other codecs
1365
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1366
+ if (<bool>::sse_decode(deserializer)) {
1367
+ return Some(<crate::api::SamplingConfig>::sse_decode(deserializer));
1368
+ } else {
1369
+ return None;
1370
+ }
1371
+ }
1372
+}
1373
+
1374
+impl SseDecode for Option<u64> {
1375
+ // Codec=Sse (Serialization based), see doc to use other codecs
1376
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1377
+ if (<bool>::sse_decode(deserializer)) {
1378
+ return Some(<u64>::sse_decode(deserializer));
1379
+ } else {
1380
+ return None;
1381
+ }
1382
+ }
1383
+}
1384
+
1385
+impl SseDecode for crate::api::SamplingConfig {
1386
+ // Codec=Sse (Serialization based), see doc to use other codecs
1387
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1388
+ let mut var_temperature = <Option<f64>>::sse_decode(deserializer);
1389
+ let mut var_topP = <Option<f64>>::sse_decode(deserializer);
1390
+ let mut var_topK = <Option<u64>>::sse_decode(deserializer);
1391
+ let mut var_minP = <Option<f64>>::sse_decode(deserializer);
1392
+ let mut var_maxTokens = <Option<u64>>::sse_decode(deserializer);
1393
+ let mut var_frequencyPenalty = <Option<f32>>::sse_decode(deserializer);
1394
+ let mut var_presencePenalty = <Option<f32>>::sse_decode(deserializer);
1395
+ return crate::api::SamplingConfig {
1396
+ temperature: var_temperature,
1397
+ top_p: var_topP,
1398
+ top_k: var_topK,
1399
+ min_p: var_minP,
1400
+ max_tokens: var_maxTokens,
1401
+ frequency_penalty: var_frequencyPenalty,
1402
+ presence_penalty: var_presencePenalty,
1403
+ };
1404
+ }
1405
+}
1406
+
1407
+impl SseDecode for crate::api::StreamChunk {
1408
+ // Codec=Sse (Serialization based), see doc to use other codecs
1409
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1410
+ let mut var_delta = <String>::sse_decode(deserializer);
1411
+ let mut var_done = <bool>::sse_decode(deserializer);
1412
+ let mut var_finishReason = <Option<String>>::sse_decode(deserializer);
1413
+ return crate::api::StreamChunk {
1414
+ delta: var_delta,
1415
+ done: var_done,
1416
+ finish_reason: var_finishReason,
1417
+ };
1418
+ }
1419
+}
1420
+
1421
+impl SseDecode for u64 {
1422
+ // Codec=Sse (Serialization based), see doc to use other codecs
1423
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1424
+ deserializer.cursor.read_u64::<NativeEndian>().unwrap()
1425
+ }
1426
+}
1427
+
1428
+impl SseDecode for u8 {
1429
+ // Codec=Sse (Serialization based), see doc to use other codecs
1430
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1431
+ deserializer.cursor.read_u8().unwrap()
1432
+ }
1433
+}
1434
+
1435
+impl SseDecode for () {
1436
+ // Codec=Sse (Serialization based), see doc to use other codecs
1437
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {}
1438
+}
1439
+
1440
+impl SseDecode for usize {
1441
+ // Codec=Sse (Serialization based), see doc to use other codecs
1442
+ fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
1443
+ deserializer.cursor.read_u64::<NativeEndian>().unwrap() as _
1444
+ }
1445
+}
1446
+
1447
+fn pde_ffi_dispatcher_primary_impl(
1448
+ func_id: i32,
1449
+ port: flutter_rust_bridge::for_generated::MessagePort,
1450
+ ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
1451
+ rust_vec_len: i32,
1452
+ data_len: i32,
1453
+) {
1454
+ // Codec=Pde (Serialization + dispatch), see doc to use other codecs
1455
+ match func_id {
1456
+ 1 => wire__crate__api__OndeChatEngine_clear_history_impl(port, ptr, rust_vec_len, data_len),
1457
+ 2 => wire__crate__api__OndeChatEngine_clear_system_prompt_impl(
1458
+ port,
1459
+ ptr,
1460
+ rust_vec_len,
1461
+ data_len,
1462
+ ),
1463
+ 3 => wire__crate__api__OndeChatEngine_generate_impl(port, ptr, rust_vec_len, data_len),
1464
+ 4 => wire__crate__api__OndeChatEngine_history_impl(port, ptr, rust_vec_len, data_len),
1465
+ 5 => wire__crate__api__OndeChatEngine_info_impl(port, ptr, rust_vec_len, data_len),
1466
+ 6 => wire__crate__api__OndeChatEngine_is_loaded_impl(port, ptr, rust_vec_len, data_len),
1467
+ 7 => {
1468
+ wire__crate__api__OndeChatEngine_load_gguf_model_impl(port, ptr, rust_vec_len, data_len)
1469
+ }
1470
+ 9 => wire__crate__api__OndeChatEngine_push_history_impl(port, ptr, rust_vec_len, data_len),
1471
+ 10 => wire__crate__api__OndeChatEngine_send_message_impl(port, ptr, rust_vec_len, data_len),
1472
+ 11 => wire__crate__api__OndeChatEngine_set_sampling_impl(port, ptr, rust_vec_len, data_len),
1473
+ 12 => wire__crate__api__OndeChatEngine_set_system_prompt_impl(
1474
+ port,
1475
+ ptr,
1476
+ rust_vec_len,
1477
+ data_len,
1478
+ ),
1479
+ 13 => {
1480
+ wire__crate__api__OndeChatEngine_stream_message_impl(port, ptr, rust_vec_len, data_len)
1481
+ }
1482
+ 14 => wire__crate__api__OndeChatEngine_unload_model_impl(port, ptr, rust_vec_len, data_len),
1483
+ _ => unreachable!(),
1484
+ }
1485
+}
1486
+
1487
+fn pde_ffi_dispatcher_sync_impl(
1488
+ func_id: i32,
1489
+ ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
1490
+ rust_vec_len: i32,
1491
+ data_len: i32,
1492
+) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
1493
+ // Codec=Pde (Serialization + dispatch), see doc to use other codecs
1494
+ match func_id {
1495
+ 8 => wire__crate__api__OndeChatEngine_new_impl(ptr, rust_vec_len, data_len),
1496
+ 15 => wire__crate__api__default_model_config_impl(ptr, rust_vec_len, data_len),
1497
+ 16 => wire__crate__api__default_sampling_config_impl(ptr, rust_vec_len, data_len),
1498
+ 17 => wire__crate__api__deterministic_sampling_config_impl(ptr, rust_vec_len, data_len),
1499
+ 18 => wire__crate__api__mobile_sampling_config_impl(ptr, rust_vec_len, data_len),
1500
+ 19 => wire__crate__api__qwen25_1_5b_config_impl(ptr, rust_vec_len, data_len),
1501
+ 20 => wire__crate__api__qwen25_3b_config_impl(ptr, rust_vec_len, data_len),
1502
+ 21 => wire__crate__api__qwen25_coder_1_5b_config_impl(ptr, rust_vec_len, data_len),
1503
+ 22 => wire__crate__api__qwen25_coder_3b_config_impl(ptr, rust_vec_len, data_len),
1504
+ _ => unreachable!(),
1505
+ }
1506
+}
1507
+
1508
+// Section: rust2dart
1509
+
1510
+// Codec=Dco (DartCObject based), see doc to use other codecs
1511
+impl flutter_rust_bridge::IntoDart for FrbWrapper<OndeChatEngine> {
1512
+ fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
1513
+ flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, MoiArc<_>>(self.0)
1514
+ .into_dart()
1515
+ }
1516
+}
1517
+impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for FrbWrapper<OndeChatEngine> {}
1518
+
1519
+impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<OndeChatEngine>> for OndeChatEngine {
1520
+ fn into_into_dart(self) -> FrbWrapper<OndeChatEngine> {
1521
+ self.into()
1522
+ }
1523
+}
1524
+
1525
+// Codec=Dco (DartCObject based), see doc to use other codecs
1526
+impl flutter_rust_bridge::IntoDart for crate::api::ChatMessage {
1527
+ fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
1528
+ [
1529
+ self.role.into_into_dart().into_dart(),
1530
+ self.content.into_into_dart().into_dart(),
1531
+ ]
1532
+ .into_dart()
1533
+ }
1534
+}
1535
+impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::ChatMessage {}
1536
+impl flutter_rust_bridge::IntoIntoDart<crate::api::ChatMessage> for crate::api::ChatMessage {
1537
+ fn into_into_dart(self) -> crate::api::ChatMessage {
1538
+ self
1539
+ }
1540
+}
1541
+// Codec=Dco (DartCObject based), see doc to use other codecs
1542
+impl flutter_rust_bridge::IntoDart for crate::api::ChatRole {
1543
+ fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
1544
+ match self {
1545
+ Self::System => 0.into_dart(),
1546
+ Self::User => 1.into_dart(),
1547
+ Self::Assistant => 2.into_dart(),
1548
+ _ => unreachable!(),
1549
+ }
1550
+ }
1551
+}
1552
+impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::ChatRole {}
1553
+impl flutter_rust_bridge::IntoIntoDart<crate::api::ChatRole> for crate::api::ChatRole {
1554
+ fn into_into_dart(self) -> crate::api::ChatRole {
1555
+ self
1556
+ }
1557
+}
1558
+// Codec=Dco (DartCObject based), see doc to use other codecs
1559
+impl flutter_rust_bridge::IntoDart for crate::api::EngineInfo {
1560
+ fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
1561
+ [
1562
+ self.status.into_into_dart().into_dart(),
1563
+ self.model_name.into_into_dart().into_dart(),
1564
+ self.approx_memory.into_into_dart().into_dart(),
1565
+ self.history_length.into_into_dart().into_dart(),
1566
+ ]
1567
+ .into_dart()
1568
+ }
1569
+}
1570
+impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::EngineInfo {}
1571
+impl flutter_rust_bridge::IntoIntoDart<crate::api::EngineInfo> for crate::api::EngineInfo {
1572
+ fn into_into_dart(self) -> crate::api::EngineInfo {
1573
+ self
1574
+ }
1575
+}
1576
+// Codec=Dco (DartCObject based), see doc to use other codecs
1577
+impl flutter_rust_bridge::IntoDart for crate::api::EngineStatus {
1578
+ fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
1579
+ match self {
1580
+ Self::Unloaded => 0.into_dart(),
1581
+ Self::Loading => 1.into_dart(),
1582
+ Self::Ready => 2.into_dart(),
1583
+ Self::Generating => 3.into_dart(),
1584
+ Self::Error => 4.into_dart(),
1585
+ _ => unreachable!(),
1586
+ }
1587
+ }
1588
+}
1589
+impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::EngineStatus {}
1590
+impl flutter_rust_bridge::IntoIntoDart<crate::api::EngineStatus> for crate::api::EngineStatus {
1591
+ fn into_into_dart(self) -> crate::api::EngineStatus {
1592
+ self
1593
+ }
1594
+}
1595
+// Codec=Dco (DartCObject based), see doc to use other codecs
1596
+impl flutter_rust_bridge::IntoDart for crate::api::GgufModelConfig {
1597
+ fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
1598
+ [
1599
+ self.model_id.into_into_dart().into_dart(),
1600
+ self.files.into_into_dart().into_dart(),
1601
+ self.tok_model_id.into_into_dart().into_dart(),
1602
+ self.display_name.into_into_dart().into_dart(),
1603
+ self.approx_memory.into_into_dart().into_dart(),
1604
+ ]
1605
+ .into_dart()
1606
+ }
1607
+}
1608
+impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::GgufModelConfig {}
1609
+impl flutter_rust_bridge::IntoIntoDart<crate::api::GgufModelConfig>
1610
+ for crate::api::GgufModelConfig
1611
+{
1612
+ fn into_into_dart(self) -> crate::api::GgufModelConfig {
1613
+ self
1614
+ }
1615
+}
1616
+// Codec=Dco (DartCObject based), see doc to use other codecs
1617
+impl flutter_rust_bridge::IntoDart for crate::api::InferenceResult {
1618
+ fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
1619
+ [
1620
+ self.text.into_into_dart().into_dart(),
1621
+ self.duration_secs.into_into_dart().into_dart(),
1622
+ self.duration_display.into_into_dart().into_dart(),
1623
+ self.finish_reason.into_into_dart().into_dart(),
1624
+ ]
1625
+ .into_dart()
1626
+ }
1627
+}
1628
+impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::InferenceResult {}
1629
+impl flutter_rust_bridge::IntoIntoDart<crate::api::InferenceResult>
1630
+ for crate::api::InferenceResult
1631
+{
1632
+ fn into_into_dart(self) -> crate::api::InferenceResult {
1633
+ self
1634
+ }
1635
+}
1636
+// Codec=Dco (DartCObject based), see doc to use other codecs
1637
+impl flutter_rust_bridge::IntoDart for crate::api::OndeError {
1638
+ fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
1639
+ match self {
1640
+ crate::api::OndeError::NoModelLoaded => [0.into_dart()].into_dart(),
1641
+ crate::api::OndeError::AlreadyLoaded { model_name } => {
1642
+ [1.into_dart(), model_name.into_into_dart().into_dart()].into_dart()
1643
+ }
1644
+ crate::api::OndeError::ModelBuild { reason } => {
1645
+ [2.into_dart(), reason.into_into_dart().into_dart()].into_dart()
1646
+ }
1647
+ crate::api::OndeError::Inference { reason } => {
1648
+ [3.into_dart(), reason.into_into_dart().into_dart()].into_dart()
1649
+ }
1650
+ crate::api::OndeError::Cancelled => [4.into_dart()].into_dart(),
1651
+ crate::api::OndeError::Other { reason } => {
1652
+ [5.into_dart(), reason.into_into_dart().into_dart()].into_dart()
1653
+ }
1654
+ _ => {
1655
+ unimplemented!("");
1656
+ }
1657
+ }
1658
+ }
1659
+}
1660
+impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::OndeError {}
1661
+impl flutter_rust_bridge::IntoIntoDart<crate::api::OndeError> for crate::api::OndeError {
1662
+ fn into_into_dart(self) -> crate::api::OndeError {
1663
+ self
1664
+ }
1665
+}
1666
+// Codec=Dco (DartCObject based), see doc to use other codecs
1667
+impl flutter_rust_bridge::IntoDart for crate::api::SamplingConfig {
1668
+ fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
1669
+ [
1670
+ self.temperature.into_into_dart().into_dart(),
1671
+ self.top_p.into_into_dart().into_dart(),
1672
+ self.top_k.into_into_dart().into_dart(),
1673
+ self.min_p.into_into_dart().into_dart(),
1674
+ self.max_tokens.into_into_dart().into_dart(),
1675
+ self.frequency_penalty.into_into_dart().into_dart(),
1676
+ self.presence_penalty.into_into_dart().into_dart(),
1677
+ ]
1678
+ .into_dart()
1679
+ }
1680
+}
1681
+impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::SamplingConfig {}
1682
+impl flutter_rust_bridge::IntoIntoDart<crate::api::SamplingConfig> for crate::api::SamplingConfig {
1683
+ fn into_into_dart(self) -> crate::api::SamplingConfig {
1684
+ self
1685
+ }
1686
+}
1687
+// Codec=Dco (DartCObject based), see doc to use other codecs
1688
+impl flutter_rust_bridge::IntoDart for crate::api::StreamChunk {
1689
+ fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
1690
+ [
1691
+ self.delta.into_into_dart().into_dart(),
1692
+ self.done.into_into_dart().into_dart(),
1693
+ self.finish_reason.into_into_dart().into_dart(),
1694
+ ]
1695
+ .into_dart()
1696
+ }
1697
+}
1698
+impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::api::StreamChunk {}
1699
+impl flutter_rust_bridge::IntoIntoDart<crate::api::StreamChunk> for crate::api::StreamChunk {
1700
+ fn into_into_dart(self) -> crate::api::StreamChunk {
1701
+ self
1702
+ }
1703
+}
1704
+
1705
+impl SseEncode for flutter_rust_bridge::for_generated::anyhow::Error {
1706
+ // Codec=Sse (Serialization based), see doc to use other codecs
1707
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1708
+ <String>::sse_encode(format!("{:?}", self), serializer);
1709
+ }
1710
+}
1711
+
1712
+impl SseEncode for OndeChatEngine {
1713
+ // Codec=Sse (Serialization based), see doc to use other codecs
1714
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1715
+ <RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>>>::sse_encode(flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, MoiArc<_>>(self), serializer);
1716
+ }
1717
+}
1718
+
1719
+impl SseEncode
1720
+ for RustOpaqueMoi<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>>
1721
+{
1722
+ // Codec=Sse (Serialization based), see doc to use other codecs
1723
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1724
+ let (ptr, size) = self.sse_encode_raw();
1725
+ <usize>::sse_encode(ptr, serializer);
1726
+ <i32>::sse_encode(size, serializer);
1727
+ }
1728
+}
1729
+
1730
+impl SseEncode
1731
+ for StreamSink<crate::api::StreamChunk, flutter_rust_bridge::for_generated::SseCodec>
1732
+{
1733
+ // Codec=Sse (Serialization based), see doc to use other codecs
1734
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1735
+ unimplemented!("")
1736
+ }
1737
+}
1738
+
1739
+impl SseEncode for String {
1740
+ // Codec=Sse (Serialization based), see doc to use other codecs
1741
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1742
+ <Vec<u8>>::sse_encode(self.into_bytes(), serializer);
1743
+ }
1744
+}
1745
+
1746
+impl SseEncode for bool {
1747
+ // Codec=Sse (Serialization based), see doc to use other codecs
1748
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1749
+ serializer.cursor.write_u8(self as _).unwrap();
1750
+ }
1751
+}
1752
+
1753
+impl SseEncode for crate::api::ChatMessage {
1754
+ // Codec=Sse (Serialization based), see doc to use other codecs
1755
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1756
+ <crate::api::ChatRole>::sse_encode(self.role, serializer);
1757
+ <String>::sse_encode(self.content, serializer);
1758
+ }
1759
+}
1760
+
1761
+impl SseEncode for crate::api::ChatRole {
1762
+ // Codec=Sse (Serialization based), see doc to use other codecs
1763
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1764
+ <i32>::sse_encode(
1765
+ match self {
1766
+ crate::api::ChatRole::System => 0,
1767
+ crate::api::ChatRole::User => 1,
1768
+ crate::api::ChatRole::Assistant => 2,
1769
+ _ => {
1770
+ unimplemented!("");
1771
+ }
1772
+ },
1773
+ serializer,
1774
+ );
1775
+ }
1776
+}
1777
+
1778
+impl SseEncode for crate::api::EngineInfo {
1779
+ // Codec=Sse (Serialization based), see doc to use other codecs
1780
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1781
+ <crate::api::EngineStatus>::sse_encode(self.status, serializer);
1782
+ <Option<String>>::sse_encode(self.model_name, serializer);
1783
+ <Option<String>>::sse_encode(self.approx_memory, serializer);
1784
+ <u64>::sse_encode(self.history_length, serializer);
1785
+ }
1786
+}
1787
+
1788
+impl SseEncode for crate::api::EngineStatus {
1789
+ // Codec=Sse (Serialization based), see doc to use other codecs
1790
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1791
+ <i32>::sse_encode(
1792
+ match self {
1793
+ crate::api::EngineStatus::Unloaded => 0,
1794
+ crate::api::EngineStatus::Loading => 1,
1795
+ crate::api::EngineStatus::Ready => 2,
1796
+ crate::api::EngineStatus::Generating => 3,
1797
+ crate::api::EngineStatus::Error => 4,
1798
+ _ => {
1799
+ unimplemented!("");
1800
+ }
1801
+ },
1802
+ serializer,
1803
+ );
1804
+ }
1805
+}
1806
+
1807
+impl SseEncode for f32 {
1808
+ // Codec=Sse (Serialization based), see doc to use other codecs
1809
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1810
+ serializer.cursor.write_f32::<NativeEndian>(self).unwrap();
1811
+ }
1812
+}
1813
+
1814
+impl SseEncode for f64 {
1815
+ // Codec=Sse (Serialization based), see doc to use other codecs
1816
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1817
+ serializer.cursor.write_f64::<NativeEndian>(self).unwrap();
1818
+ }
1819
+}
1820
+
1821
+impl SseEncode for crate::api::GgufModelConfig {
1822
+ // Codec=Sse (Serialization based), see doc to use other codecs
1823
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1824
+ <String>::sse_encode(self.model_id, serializer);
1825
+ <Vec<String>>::sse_encode(self.files, serializer);
1826
+ <Option<String>>::sse_encode(self.tok_model_id, serializer);
1827
+ <String>::sse_encode(self.display_name, serializer);
1828
+ <String>::sse_encode(self.approx_memory, serializer);
1829
+ }
1830
+}
1831
+
1832
+impl SseEncode for i32 {
1833
+ // Codec=Sse (Serialization based), see doc to use other codecs
1834
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1835
+ serializer.cursor.write_i32::<NativeEndian>(self).unwrap();
1836
+ }
1837
+}
1838
+
1839
+impl SseEncode for crate::api::InferenceResult {
1840
+ // Codec=Sse (Serialization based), see doc to use other codecs
1841
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1842
+ <String>::sse_encode(self.text, serializer);
1843
+ <f64>::sse_encode(self.duration_secs, serializer);
1844
+ <String>::sse_encode(self.duration_display, serializer);
1845
+ <String>::sse_encode(self.finish_reason, serializer);
1846
+ }
1847
+}
1848
+
1849
+impl SseEncode for Vec<String> {
1850
+ // Codec=Sse (Serialization based), see doc to use other codecs
1851
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1852
+ <i32>::sse_encode(self.len() as _, serializer);
1853
+ for item in self {
1854
+ <String>::sse_encode(item, serializer);
1855
+ }
1856
+ }
1857
+}
1858
+
1859
+impl SseEncode for Vec<crate::api::ChatMessage> {
1860
+ // Codec=Sse (Serialization based), see doc to use other codecs
1861
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1862
+ <i32>::sse_encode(self.len() as _, serializer);
1863
+ for item in self {
1864
+ <crate::api::ChatMessage>::sse_encode(item, serializer);
1865
+ }
1866
+ }
1867
+}
1868
+
1869
+impl SseEncode for Vec<u8> {
1870
+ // Codec=Sse (Serialization based), see doc to use other codecs
1871
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1872
+ <i32>::sse_encode(self.len() as _, serializer);
1873
+ for item in self {
1874
+ <u8>::sse_encode(item, serializer);
1875
+ }
1876
+ }
1877
+}
1878
+
1879
+impl SseEncode for crate::api::OndeError {
1880
+ // Codec=Sse (Serialization based), see doc to use other codecs
1881
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1882
+ match self {
1883
+ crate::api::OndeError::NoModelLoaded => {
1884
+ <i32>::sse_encode(0, serializer);
1885
+ }
1886
+ crate::api::OndeError::AlreadyLoaded { model_name } => {
1887
+ <i32>::sse_encode(1, serializer);
1888
+ <String>::sse_encode(model_name, serializer);
1889
+ }
1890
+ crate::api::OndeError::ModelBuild { reason } => {
1891
+ <i32>::sse_encode(2, serializer);
1892
+ <String>::sse_encode(reason, serializer);
1893
+ }
1894
+ crate::api::OndeError::Inference { reason } => {
1895
+ <i32>::sse_encode(3, serializer);
1896
+ <String>::sse_encode(reason, serializer);
1897
+ }
1898
+ crate::api::OndeError::Cancelled => {
1899
+ <i32>::sse_encode(4, serializer);
1900
+ }
1901
+ crate::api::OndeError::Other { reason } => {
1902
+ <i32>::sse_encode(5, serializer);
1903
+ <String>::sse_encode(reason, serializer);
1904
+ }
1905
+ _ => {
1906
+ unimplemented!("");
1907
+ }
1908
+ }
1909
+ }
1910
+}
1911
+
1912
+impl SseEncode for Option<String> {
1913
+ // Codec=Sse (Serialization based), see doc to use other codecs
1914
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1915
+ <bool>::sse_encode(self.is_some(), serializer);
1916
+ if let Some(value) = self {
1917
+ <String>::sse_encode(value, serializer);
1918
+ }
1919
+ }
1920
+}
1921
+
1922
+impl SseEncode for Option<f32> {
1923
+ // Codec=Sse (Serialization based), see doc to use other codecs
1924
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1925
+ <bool>::sse_encode(self.is_some(), serializer);
1926
+ if let Some(value) = self {
1927
+ <f32>::sse_encode(value, serializer);
1928
+ }
1929
+ }
1930
+}
1931
+
1932
+impl SseEncode for Option<f64> {
1933
+ // Codec=Sse (Serialization based), see doc to use other codecs
1934
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1935
+ <bool>::sse_encode(self.is_some(), serializer);
1936
+ if let Some(value) = self {
1937
+ <f64>::sse_encode(value, serializer);
1938
+ }
1939
+ }
1940
+}
1941
+
1942
+impl SseEncode for Option<crate::api::SamplingConfig> {
1943
+ // Codec=Sse (Serialization based), see doc to use other codecs
1944
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1945
+ <bool>::sse_encode(self.is_some(), serializer);
1946
+ if let Some(value) = self {
1947
+ <crate::api::SamplingConfig>::sse_encode(value, serializer);
1948
+ }
1949
+ }
1950
+}
1951
+
1952
+impl SseEncode for Option<u64> {
1953
+ // Codec=Sse (Serialization based), see doc to use other codecs
1954
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1955
+ <bool>::sse_encode(self.is_some(), serializer);
1956
+ if let Some(value) = self {
1957
+ <u64>::sse_encode(value, serializer);
1958
+ }
1959
+ }
1960
+}
1961
+
1962
+impl SseEncode for crate::api::SamplingConfig {
1963
+ // Codec=Sse (Serialization based), see doc to use other codecs
1964
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1965
+ <Option<f64>>::sse_encode(self.temperature, serializer);
1966
+ <Option<f64>>::sse_encode(self.top_p, serializer);
1967
+ <Option<u64>>::sse_encode(self.top_k, serializer);
1968
+ <Option<f64>>::sse_encode(self.min_p, serializer);
1969
+ <Option<u64>>::sse_encode(self.max_tokens, serializer);
1970
+ <Option<f32>>::sse_encode(self.frequency_penalty, serializer);
1971
+ <Option<f32>>::sse_encode(self.presence_penalty, serializer);
1972
+ }
1973
+}
1974
+
1975
+impl SseEncode for crate::api::StreamChunk {
1976
+ // Codec=Sse (Serialization based), see doc to use other codecs
1977
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1978
+ <String>::sse_encode(self.delta, serializer);
1979
+ <bool>::sse_encode(self.done, serializer);
1980
+ <Option<String>>::sse_encode(self.finish_reason, serializer);
1981
+ }
1982
+}
1983
+
1984
+impl SseEncode for u64 {
1985
+ // Codec=Sse (Serialization based), see doc to use other codecs
1986
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1987
+ serializer.cursor.write_u64::<NativeEndian>(self).unwrap();
1988
+ }
1989
+}
1990
+
1991
+impl SseEncode for u8 {
1992
+ // Codec=Sse (Serialization based), see doc to use other codecs
1993
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
1994
+ serializer.cursor.write_u8(self).unwrap();
1995
+ }
1996
+}
1997
+
1998
+impl SseEncode for () {
1999
+ // Codec=Sse (Serialization based), see doc to use other codecs
2000
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {}
2001
+}
2002
+
2003
+impl SseEncode for usize {
2004
+ // Codec=Sse (Serialization based), see doc to use other codecs
2005
+ fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
2006
+ serializer
2007
+ .cursor
2008
+ .write_u64::<NativeEndian>(self as _)
2009
+ .unwrap();
2010
+ }
2011
+}
2012
+
2013
+#[cfg(not(target_family = "wasm"))]
2014
+mod io {
2015
+ // This file is automatically generated, so please do not edit it.
2016
+ // @generated by `flutter_rust_bridge`@ 2.12.0.
2017
+
2018
+ // Section: imports
2019
+
2020
+ use super::*;
2021
+ use crate::api::*;
2022
+ use flutter_rust_bridge::for_generated::byteorder::{
2023
+ NativeEndian, ReadBytesExt, WriteBytesExt,
2024
+ };
2025
+ use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
2026
+ use flutter_rust_bridge::{Handler, IntoIntoDart};
2027
+
2028
+ // Section: boilerplate
2029
+
2030
+ flutter_rust_bridge::frb_generated_boilerplate_io!();
2031
+
2032
+ #[unsafe(no_mangle)]
2033
+ pub extern "C" fn frbgen_onde_inference_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
2034
+ ptr: *const std::ffi::c_void,
2035
+ ) {
2036
+ MoiArc::<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>>::increment_strong_count(ptr as _);
2037
+ }
2038
+
2039
+ #[unsafe(no_mangle)]
2040
+ pub extern "C" fn frbgen_onde_inference_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOndeChatEngine(
2041
+ ptr: *const std::ffi::c_void,
2042
+ ) {
2043
+ MoiArc::<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<OndeChatEngine>>::decrement_strong_count(ptr as _);
2044
+ }
2045
+}
2046
+#[cfg(not(target_family = "wasm"))]
2047
+pub use io::*;
sdk/dart/rust/src/lib.rs
new
+14
@@ -0,0 +1,14 @@
1
+#![allow(clippy::all)]
2
+#![allow(unexpected_cfgs)]
3
+// flutter_rust_bridge generated code uses `!` (never type) fallback that
4
+// became a hard error in Rust 1.82+ (edition 2024 semantics).
5
+// This allow suppresses it for the entire bridge crate.
6
+#![allow(dependency_on_unit_never_type_fallback)]
7
+
8
+pub mod api;
9
+mod frb_generated;
10
+
11
+#[flutter_rust_bridge::frb(init)]
12
+pub fn init_app() {
13
+ flutter_rust_bridge::setup_default_user_utils();
14
+}
sdk/dart/test/dart_test.dart
new
+219
@@ -0,0 +1,219 @@
1
+import 'package:flutter_test/flutter_test.dart';
2
+import 'package:onde_inference/onde_inference.dart';
3
+
4
+void main() {
5
+ group('OndeException', () {
6
+ test('toString includes message', () {
7
+ const e = OndeException('No model loaded');
8
+ expect(e.toString(), contains('No model loaded'));
9
+ });
10
+
11
+ test('equality', () {
12
+ const a = OndeException('foo');
13
+ const b = OndeException('foo');
14
+ const c = OndeException('bar');
15
+ expect(a, equals(b));
16
+ expect(a, isNot(equals(c)));
17
+ });
18
+ });
19
+
20
+ group('ChatRole', () {
21
+ test('toString values', () {
22
+ expect(ChatRole.system.toString(), 'system');
23
+ expect(ChatRole.user.toString(), 'user');
24
+ expect(ChatRole.assistant.toString(), 'assistant');
25
+ });
26
+ });
27
+
28
+ group('ChatMessage', () {
29
+ test('factory constructors set correct roles', () {
30
+ expect(ChatMessage.system('Hi').role, ChatRole.system);
31
+ expect(ChatMessage.user('Hi').role, ChatRole.user);
32
+ expect(ChatMessage.assistant('Hi').role, ChatRole.assistant);
33
+ });
34
+
35
+ test('equality', () {
36
+ final a = ChatMessage.user('Hello');
37
+ final b = ChatMessage.user('Hello');
38
+ final c = ChatMessage.user('World');
39
+ expect(a, equals(b));
40
+ expect(a, isNot(equals(c)));
41
+ });
42
+ });
43
+
44
+ group('SamplingConfig', () {
45
+ test('defaultConfig preset', () {
46
+ final s = SamplingConfig.defaultConfig();
47
+ expect(s.temperature, 0.7);
48
+ expect(s.topP, 0.95);
49
+ expect(s.maxTokens, 512);
50
+ });
51
+
52
+ test('deterministic preset', () {
53
+ final s = SamplingConfig.deterministic();
54
+ expect(s.temperature, 0.0);
55
+ expect(s.maxTokens, 512);
56
+ expect(s.topP, isNull);
57
+ });
58
+
59
+ test('mobile preset', () {
60
+ final s = SamplingConfig.mobile();
61
+ expect(s.temperature, 0.7);
62
+ expect(s.topP, 0.95);
63
+ expect(s.maxTokens, 128);
64
+ });
65
+
66
+ test('copyWith overrides single field', () {
67
+ final base = SamplingConfig.defaultConfig();
68
+ final copy = base.copyWith(temperature: 0.3);
69
+ expect(copy.temperature, 0.3);
70
+ expect(copy.topP, base.topP);
71
+ expect(copy.maxTokens, base.maxTokens);
72
+ });
73
+
74
+ test('equality', () {
75
+ expect(
76
+ SamplingConfig.deterministic(),
77
+ equals(SamplingConfig.deterministic()),
78
+ );
79
+ expect(
80
+ SamplingConfig.deterministic(),
81
+ isNot(equals(SamplingConfig.mobile())),
82
+ );
83
+ });
84
+ });
85
+
86
+ group('GgufModelConfig', () {
87
+ test('stub factory functions return non-empty configs', () {
88
+ final config1_5b = OndeInference.qwen251_5bConfig();
89
+ expect(config1_5b.modelId, contains('1.5B'));
90
+ expect(config1_5b.files, isNotEmpty);
91
+ expect(config1_5b.displayName, isNotEmpty);
92
+ expect(config1_5b.approxMemory, isNotEmpty);
93
+
94
+ final config3b = OndeInference.qwen253bConfig();
95
+ expect(config3b.modelId, contains('3B'));
96
+ expect(config3b.files, isNotEmpty);
97
+
98
+ final configCoder1_5b = OndeInference.qwen25Coder1_5bConfig();
99
+ expect(configCoder1_5b.modelId, contains('Coder'));
100
+
101
+ final configCoder3b = OndeInference.qwen25Coder3bConfig();
102
+ expect(configCoder3b.modelId, contains('Coder'));
103
+
104
+ final defaultConfig = OndeInference.defaultModelConfig();
105
+ expect(defaultConfig.modelId, isNotEmpty);
106
+ });
107
+
108
+ test('equality', () {
109
+ expect(
110
+ OndeInference.qwen251_5bConfig(),
111
+ equals(OndeInference.qwen251_5bConfig()),
112
+ );
113
+ expect(
114
+ OndeInference.qwen251_5bConfig(),
115
+ isNot(equals(OndeInference.qwen253bConfig())),
116
+ );
117
+ });
118
+ });
119
+
120
+ group('EngineStatus', () {
121
+ test('isReady only true for ready', () {
122
+ expect(EngineStatus.ready.isReady, isTrue);
123
+ expect(EngineStatus.unloaded.isReady, isFalse);
124
+ expect(EngineStatus.loading.isReady, isFalse);
125
+ expect(EngineStatus.generating.isReady, isFalse);
126
+ expect(EngineStatus.error.isReady, isFalse);
127
+ });
128
+
129
+ test('toString values', () {
130
+ expect(EngineStatus.unloaded.toString(), 'unloaded');
131
+ expect(EngineStatus.loading.toString(), 'loading');
132
+ expect(EngineStatus.ready.toString(), 'ready');
133
+ expect(EngineStatus.generating.toString(), 'generating');
134
+ expect(EngineStatus.error.toString(), 'error');
135
+ });
136
+ });
137
+
138
+ group('EngineInfo', () {
139
+ test('equality', () {
140
+ const a = EngineInfo(status: EngineStatus.unloaded, historyLength: 0);
141
+ const b = EngineInfo(status: EngineStatus.unloaded, historyLength: 0);
142
+ const c = EngineInfo(
143
+ status: EngineStatus.ready,
144
+ modelName: 'Qwen 2.5 3B',
145
+ approxMemory: '~1.93 GB',
146
+ historyLength: 3,
147
+ );
148
+ expect(a, equals(b));
149
+ expect(a, isNot(equals(c)));
150
+ });
151
+ });
152
+
153
+ group('StreamChunk', () {
154
+ test('equality', () {
155
+ const a = StreamChunk(delta: 'hello', done: false);
156
+ const b = StreamChunk(delta: 'hello', done: false);
157
+ const c = StreamChunk(delta: 'bye', done: true, finishReason: 'stop');
158
+ expect(a, equals(b));
159
+ expect(a, isNot(equals(c)));
160
+ });
161
+ });
162
+
163
+ group('InferenceResult', () {
164
+ test('equality', () {
165
+ const a = InferenceResult(
166
+ text: 'Hi there!',
167
+ durationSecs: 1.5,
168
+ durationDisplay: '1.5s',
169
+ );
170
+ const b = InferenceResult(
171
+ text: 'Hi there!',
172
+ durationSecs: 1.5,
173
+ durationDisplay: '1.5s',
174
+ );
175
+ expect(a, equals(b));
176
+ });
177
+ });
178
+
179
+ group('RustLib stub', () {
180
+ test('init() is a safe no-op', () async {
181
+ expect(RustLib.isInitialized, isFalse);
182
+ await RustLib.init();
183
+ expect(RustLib.isInitialized, isTrue);
184
+ // Second call is also safe.
185
+ await RustLib.init();
186
+ expect(RustLib.isInitialized, isTrue);
187
+ });
188
+ });
189
+
190
+ group('OndeInference helpers', () {
191
+ test('init() delegates to RustLib.init()', () async {
192
+ await expectLater(OndeInference.init(), completes);
193
+ });
194
+
195
+ test('config factories return valid configs', () {
196
+ expect(OndeInference.defaultModelConfig().modelId, isNotEmpty);
197
+ expect(OndeInference.qwen251_5bConfig().modelId, contains('1.5B'));
198
+ expect(OndeInference.qwen253bConfig().modelId, contains('3B'));
199
+ expect(OndeInference.qwen25Coder1_5bConfig().modelId, contains('Coder'));
200
+ expect(OndeInference.qwen25Coder3bConfig().modelId, contains('Coder'));
201
+ });
202
+
203
+ test('sampling factories return correct presets', () {
204
+ expect(OndeInference.defaultSamplingConfig().temperature, 0.7);
205
+ expect(OndeInference.deterministicSamplingConfig().temperature, 0.0);
206
+ expect(OndeInference.mobileSamplingConfig().maxTokens, 128);
207
+ });
208
+ });
209
+
210
+ group('OndeChatEngine stub', () {
211
+ test('create() throws UnimplementedError before codegen', () async {
212
+ // RustLib.init() is already called above; init guard is met.
213
+ await expectLater(
214
+ OndeChatEngine.create(),
215
+ throwsA(isA<UnimplementedError>()),
216
+ );
217
+ });
218
+ });
219
+}
sdk/dart/windows/CMakeLists.txt
new
+88
@@ -0,0 +1,88 @@
1
+cmake_minimum_required(VERSION 3.14)
2
+project(onde_inference_plugin VERSION 0.1.0 LANGUAGES CXX)
3
+
4
+# ── Flutter plugin boilerplate ────────────────────────────────────────────────
5
+set(PLUGIN_NAME "onde_inference_plugin")
6
+
7
+# ── Rust source directory ─────────────────────────────────────────────────────
8
+# CMakeLists.txt lives in windows/, so ../rust resolves to the sibling rust/ dir.
9
+set(RUST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../rust")
10
+
11
+# ── Determine build profile ───────────────────────────────────────────────────
12
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
13
+ set(CARGO_PROFILE "debug")
14
+ set(CARGO_PROFILE_FLAG "")
15
+else()
16
+ set(CARGO_PROFILE "release")
17
+ set(CARGO_PROFILE_FLAG "--release")
18
+endif()
19
+
20
+# ── Output paths for the compiled Rust DLL ───────────────────────────────────
21
+# On Windows, cargo cdylib outputs are named without a "lib" prefix:
22
+# onde_inference_dart.dll (not libonde_inference_dart.dll)
23
+set(RUST_DLL
24
+ "${RUST_DIR}/target/${CARGO_PROFILE}/onde_inference_dart.dll"
25
+)
26
+set(RUST_IMPLIB
27
+ "${RUST_DIR}/target/${CARGO_PROFILE}/onde_inference_dart.dll.lib"
28
+)
29
+
30
+# ── Custom build step: invoke cargo ──────────────────────────────────────────
31
+# Requires Rust + the current host toolchain (msvc or gnu) to be on PATH.
32
+# For CUDA builds, append --features cuda to CARGO_PROFILE_FLAG.
33
+add_custom_command(
34
+ OUTPUT "${RUST_DLL}" "${RUST_IMPLIB}"
35
+ COMMAND cargo build
36
+ ${CARGO_PROFILE_FLAG}
37
+ --manifest-path "${RUST_DIR}/Cargo.toml"
38
+ WORKING_DIRECTORY "${RUST_DIR}"
39
+ COMMENT "Building onde_inference_dart Rust bridge (${CARGO_PROFILE})…"
40
+ VERBATIM
41
+)
42
+
43
+add_custom_target(onde_inference_dart_cargo_build ALL
44
+ DEPENDS "${RUST_DLL}"
45
+)
46
+
47
+# ── Import the Rust DLL as a pre-built shared library ───────────────────────
48
+add_library(onde_inference_dart SHARED IMPORTED GLOBAL)
49
+set_target_properties(onde_inference_dart PROPERTIES
50
+ IMPORTED_LOCATION "${RUST_DLL}"
51
+ IMPORTED_IMPLIB "${RUST_IMPLIB}"
52
+)
53
+add_dependencies(onde_inference_dart onde_inference_dart_cargo_build)
54
+
55
+# ── Flutter plugin shared library ────────────────────────────────────────────
56
+add_library(${PLUGIN_NAME} SHARED
57
+ "onde_inference_plugin.cpp"
58
+)
59
+
60
+apply_standard_settings(${PLUGIN_NAME})
61
+
62
+target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL)
63
+
64
+target_include_directories(${PLUGIN_NAME} INTERFACE
65
+ "${CMAKE_CURRENT_SOURCE_DIR}/include"
66
+)
67
+
68
+target_link_libraries(${PLUGIN_NAME} PRIVATE
69
+ flutter
70
+ flutter_wrapper_plugin
71
+ onde_inference_dart
72
+)
73
+
74
+add_dependencies(${PLUGIN_NAME} onde_inference_dart_cargo_build)
75
+
76
+# ── Copy the Rust DLL next to the Flutter runner executable ──────────────────
77
+# Flutter's build system picks up files installed to the install prefix, so
78
+# we install the DLL there so it is packaged with the final app bundle.
79
+install(FILES "${RUST_DLL}"
80
+ DESTINATION "${CMAKE_INSTALL_PREFIX}"
81
+)
82
+
83
+# ── Bundled libraries declaration ─────────────────────────────────────────────
84
+# Tells the Flutter tooling to bundle these DLLs with the distributed app.
85
+set(onde_inference_plugin_bundled_libraries
86
+ "${RUST_DLL}"
87
+ PARENT_SCOPE
88
+)
sdk/dart/windows/onde_inference_plugin.cpp
new
+36
@@ -0,0 +1,36 @@
1
+// Copyright 2024 Onde Inference (Splitfire AB). All rights reserved.
2
+// Use of this source code is governed by the MIT license.
3
+//
4
+// onde_inference_plugin.cpp
5
+//
6
+// Minimal Flutter Windows plugin registration entry point.
7
+//
8
+// All LLM inference logic runs inside the Rust shared library
9
+// (onde_inference_dart.dll) loaded at runtime by the flutter_rust_bridge Dart
10
+// package. This C++ file exists solely so that the Flutter tooling recognises
11
+// onde_inference as a valid Windows plugin and links it into the host
12
+// application.
13
+
14
+#include "onde_inference_plugin.h"
15
+
16
+// This must be included before many other Windows headers.
17
+#include <windows.h>
18
+
19
+#include <flutter/plugin_registrar_windows.h>
20
+
21
+#include <memory>
22
+
23
+namespace onde_inference {
24
+
25
+// static
26
+void OndeInferencePlugin::RegisterWithRegistrar(
27
+ flutter::PluginRegistrarWindows* registrar) {
28
+ auto plugin = std::make_unique<OndeInferencePlugin>();
29
+ registrar->AddPlugin(std::move(plugin));
30
+}
31
+
32
+OndeInferencePlugin::OndeInferencePlugin() {}
33
+
34
+OndeInferencePlugin::~OndeInferencePlugin() {}
35
+
36
+} // namespace onde_inference
\ No newline at end of file
sdk/dart/windows/onde_inference_plugin.h
new
+33
@@ -0,0 +1,33 @@
1
+#ifndef FLUTTER_PLUGIN_ONDE_INFERENCE_PLUGIN_H_
2
+#define FLUTTER_PLUGIN_ONDE_INFERENCE_PLUGIN_H_
3
+
4
+#include <flutter/plugin_registrar_windows.h>
5
+
6
+#include <memory>
7
+
8
+namespace onde_inference {
9
+
10
+// A minimal Flutter Windows plugin class.
11
+//
12
+// All on-device inference logic is implemented in the Rust crate
13
+// onde_inference_dart (compiled to onde_inference_dart.dll). This plugin
14
+// class exists solely to satisfy the Flutter Windows plugin registration
15
+// protocol — it does not handle any method channels itself.
16
+//
17
+// flutter_rust_bridge v2 loads the Rust DLL directly from Dart via dart:ffi,
18
+// so no C++ ↔ Dart channel code is needed here.
19
+class OndeInferencePlugin : public flutter::Plugin {
20
+ public:
21
+ static void RegisterWithRegistrar(flutter::PluginRegistrarWindows* registrar);
22
+
23
+ OndeInferencePlugin();
24
+ virtual ~OndeInferencePlugin();
25
+
26
+ // Disallow copy and assign.
27
+ OndeInferencePlugin(const OndeInferencePlugin&) = delete;
28
+ OndeInferencePlugin& operator=(const OndeInferencePlugin&) = delete;
29
+};
30
+
31
+} // namespace onde_inference
32
+
33
+#endif // FLUTTER_PLUGIN_ONDE_INFERENCE_PLUGIN_H_
\ No newline at end of file