diff --git a/mobile/mise.toml b/mobile/mise.toml index 7495288f2..b7acdda56 100644 --- a/mobile/mise.toml +++ b/mobile/mise.toml @@ -1,5 +1,6 @@ [tools] java = "21.0.2" +rust = { version = "1.99.1", targets = "aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android,aarch64-apple-ios,aarch64-apple-ios-sim,x86_64-apple-ios" } [tools."aqua:flutter/flutter"] version = "3.47.2" @@ -34,6 +35,7 @@ depends = [ "codegen:dart", "codegen:drift:migration", "codegen:drift:schema", + "codegen:native", "codegen:pigeon", "codegen:translation", ] @@ -80,6 +82,11 @@ alias = "watch" description = "Watch and auto-generate dart code" run = "dart run build_runner watch" +[tasks."codegen:native"] +description = "Generate the native C header and Dart bindings" +dir = "../native/native_core" +run = ["cargo build -p native_core_ffi", "flutter pub get", "dart run ffigen --config ffigen.yaml"] + [tasks."codegen:pigeon"] alias = "pigeon" description = "Generate pigeon platform code" diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index 1d60cb099..9bde58636 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -796,10 +796,10 @@ packages: dependency: transitive description: name: hooks - sha256: "9a62a50b50b769a737bc0a8ff381f333529df3ab746b2f6b02e83760231455ba" + sha256: eaac480a35ec0814146c2c48d96aaa829e0e44a7662c88ae84c9edf4bc35651f url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.2.0" hooks_riverpod: dependency: "direct main" description: @@ -1132,6 +1132,13 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + native_core: + dependency: "direct main" + description: + path: "../native/native_core" + relative: true + source: path + version: "0.0.0" native_toolchain_c: dependency: transitive description: @@ -1140,6 +1147,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.19.1" + native_toolchain_rust: + dependency: transitive + description: + name: native_toolchain_rust + sha256: "8469a0e32a47a5c84b7fd300de9fd0e8082aac76c37922986324f5082a58350d" + url: "https://pub.dev" + source: hosted + version: "1.0.6" native_video_player: dependency: "direct main" description: @@ -1458,10 +1473,10 @@ packages: dependency: transitive description: name: record_use - sha256: "2551bd8eecfe95d14ae75f6021ad0248be5c27f138c2ec12fcb52b500b3ba1ed" + sha256: "1cb8564af8d43b464294411db9217f5ec04891c6f22ee2c32d73ae05e88a6bd2" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "1.1.1" riverpod: dependency: transitive description: @@ -1772,6 +1787,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.9.4" + toml: + dependency: transitive + description: + name: toml + sha256: "35a35f782228656a2af31e8c73d1353cc4ef3d683fd68af1111b44631879c05e" + url: "https://pub.dev" + source: hosted + version: "0.18.0" typed_data: dependency: transitive description: