From a6afb877a92393faa8b0655eccec10f01725a122 Mon Sep 17 00:00:00 2001 From: Sander in 't Hout Date: Mon, 1 Jan 2024 18:41:45 +0100 Subject: [PATCH 01/50] Fix generator crashing on declarations outside api folder --- .../library/codegen/generator/api_dart/text_generator.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs index d3078dd2a0..8958691e65 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs @@ -47,8 +47,11 @@ fn generate_end_api_text( .join("\n\n"); let classes = item.classes.iter().map(|c| c.code.clone()).join("\n\n"); - // TODO use relative path calculation - let path_frb_generated = "../".repeat(namespace.path().len() - 2) + "frb_generated.dart"; + let path = namespace.path(); + let path_frb_generated = match path.len() { + 1 => "rust/frb_generated.dart".to_string(), + len => "../".repeat(len - 2) + "frb_generated.dart", + }; let mut header = DartBasicHeaderCode { file_top: generate_code_header() From 4ba09d75ce780713b763c4cece034524b6801479 Mon Sep 17 00:00:00 2001 From: Sander in 't Hout Date: Tue, 2 Jan 2024 00:42:12 +0100 Subject: [PATCH 02/50] Add test for generator crash fix --- frb_example/pure_dart/rust/src/api/misc_example.rs | 4 ++++ frb_example/pure_dart/rust/src/lib.rs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/frb_example/pure_dart/rust/src/api/misc_example.rs b/frb_example/pure_dart/rust/src/api/misc_example.rs index b0bb094cb2..be5c3ce657 100644 --- a/frb_example/pure_dart/rust/src/api/misc_example.rs +++ b/frb_example/pure_dart/rust/src/api/misc_example.rs @@ -140,3 +140,7 @@ pub struct MySizeFreezedTwinNormal { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_normal() {} + +pub fn handle_declarations_above_api_folder(my_struct: DeclaredAboveApiFolder) -> DeclaredAboveApiFolder { + my_struct +} diff --git a/frb_example/pure_dart/rust/src/lib.rs b/frb_example/pure_dart/rust/src/lib.rs index 3f11a4e28b..f4526d2ace 100644 --- a/frb_example/pure_dart/rust/src/lib.rs +++ b/frb_example/pure_dart/rust/src/lib.rs @@ -1,3 +1,5 @@ pub mod api; mod auxiliary; mod frb_generated; /* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */ + +pub struct DeclaredAboveApiFolder {} From c97c14fa1848c14bfb7856c3c5a580f79b5dc6e4 Mon Sep 17 00:00:00 2001 From: Sander in 't Hout Date: Tue, 2 Jan 2024 00:45:14 +0100 Subject: [PATCH 03/50] Add missing use --- frb_example/pure_dart/rust/src/api/misc_type.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/frb_example/pure_dart/rust/src/api/misc_type.rs b/frb_example/pure_dart/rust/src/api/misc_type.rs index a3dc285cab..27bb189467 100644 --- a/frb_example/pure_dart/rust/src/api/misc_type.rs +++ b/frb_example/pure_dart/rust/src/api/misc_type.rs @@ -1,5 +1,6 @@ use crate::auxiliary::sample_types::MySize; use log::info; +use crate::EmptyTwinNormal; pub fn func_string_twin_normal(arg: String) -> String { arg From 510918f8cb8c1fd50b7830c65c8d0588e46ccedd Mon Sep 17 00:00:00 2001 From: Sander in 't Hout Date: Tue, 2 Jan 2024 09:09:00 +0100 Subject: [PATCH 04/50] Fix Rust use mistake --- frb_example/pure_dart/rust/src/api/misc_example.rs | 1 + frb_example/pure_dart/rust/src/api/misc_type.rs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_example/pure_dart/rust/src/api/misc_example.rs b/frb_example/pure_dart/rust/src/api/misc_example.rs index be5c3ce657..3cccf21868 100644 --- a/frb_example/pure_dart/rust/src/api/misc_example.rs +++ b/frb_example/pure_dart/rust/src/api/misc_example.rs @@ -1,4 +1,5 @@ use crate::auxiliary::sample_types::MySize; +use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; diff --git a/frb_example/pure_dart/rust/src/api/misc_type.rs b/frb_example/pure_dart/rust/src/api/misc_type.rs index 27bb189467..a3dc285cab 100644 --- a/frb_example/pure_dart/rust/src/api/misc_type.rs +++ b/frb_example/pure_dart/rust/src/api/misc_type.rs @@ -1,6 +1,5 @@ use crate::auxiliary::sample_types::MySize; use log::info; -use crate::EmptyTwinNormal; pub fn func_string_twin_normal(arg: String) -> String { arg From de35df6159878290a027d43cf13e2fec7211adf2 Mon Sep 17 00:00:00 2001 From: Aran Donohue Date: Fri, 16 Feb 2024 13:31:26 -0800 Subject: [PATCH 05/50] Erase max version constraint of FFIGEN_REQUIREMENT, as the min is sufficient to ensure the tool is available. --- frb_codegen/src/library/commands/ensure_tools_available.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_codegen/src/library/commands/ensure_tools_available.rs b/frb_codegen/src/library/commands/ensure_tools_available.rs index a5bd696a1a..84a0827fb6 100644 --- a/frb_codegen/src/library/commands/ensure_tools_available.rs +++ b/frb_codegen/src/library/commands/ensure_tools_available.rs @@ -8,7 +8,7 @@ use std::str::FromStr; lazy_static! { pub(crate) static ref FFIGEN_REQUIREMENT: VersionReq = - VersionReq::parse(">= 8.0.0, < 10.0.0").unwrap(); + VersionReq::parse(">= 8.0.0").unwrap(); } pub fn ensure_tools_available( From ca018975d30790915c64464d851bc8605c613835 Mon Sep 17 00:00:00 2001 From: Aran Donohue Date: Fri, 16 Feb 2024 13:34:18 -0800 Subject: [PATCH 06/50] Upgrade pubspec.yaml dart min sdk to 3.3 and ffigen to 11 across frb_example --- frb_example/dart_build_rs/pubspec.yaml | 4 +- frb_example/dart_minimal/pubspec.yaml | 4 +- frb_example/deliberate_bad/pubspec.yaml | 4 +- frb_example/flutter_via_create/pubspec.yaml | 2 +- .../rust_builder/pubspec.yaml | 4 +- .../flutter_via_integrate/pubspec.yaml | 2 +- .../rust_builder/pubspec.yaml | 4 +- frb_example/gallery/pubspec.lock | 78 +++++++++++-------- frb_example/gallery/pubspec.yaml | 4 +- frb_example/gallery/rust_builder/pubspec.yaml | 4 +- frb_example/pure_dart/pubspec.lock | 6 +- frb_example/pure_dart/pubspec.yaml | 4 +- frb_example/pure_dart_pde/pubspec.lock | 6 +- frb_example/pure_dart_pde/pubspec.yaml | 4 +- 14 files changed, 73 insertions(+), 57 deletions(-) diff --git a/frb_example/dart_build_rs/pubspec.yaml b/frb_example/dart_build_rs/pubspec.yaml index fa355bbce2..ba4281421d 100644 --- a/frb_example/dart_build_rs/pubspec.yaml +++ b/frb_example/dart_build_rs/pubspec.yaml @@ -3,7 +3,7 @@ description: flutter rust bridge example version: 1.0.0 publish_to: none environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: lints: ^2.0.1 flutter_rust_bridge: @@ -15,4 +15,4 @@ dev_dependencies: test: ^1.21.4 freezed: ^2.1.0+1 build_runner: ^2.4.4 - ffigen: ^8.0.0 + ffigen: ^11.0.0 diff --git a/frb_example/dart_minimal/pubspec.yaml b/frb_example/dart_minimal/pubspec.yaml index 71053cadbb..9bf3df7314 100644 --- a/frb_example/dart_minimal/pubspec.yaml +++ b/frb_example/dart_minimal/pubspec.yaml @@ -3,7 +3,7 @@ description: flutter rust bridge example version: 1.0.0 publish_to: none environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: lints: ^2.0.1 flutter_rust_bridge: @@ -15,4 +15,4 @@ dev_dependencies: test: ^1.21.4 freezed: ^2.1.0+1 build_runner: ^2.4.4 - ffigen: ^8.0.0 + ffigen: ^11.0.0 diff --git a/frb_example/deliberate_bad/pubspec.yaml b/frb_example/deliberate_bad/pubspec.yaml index 2089c45808..5cc2fd8c1f 100644 --- a/frb_example/deliberate_bad/pubspec.yaml +++ b/frb_example/deliberate_bad/pubspec.yaml @@ -3,7 +3,7 @@ description: flutter rust bridge example version: 1.0.0 publish_to: none environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: lints: ^2.0.1 flutter_rust_bridge: @@ -15,4 +15,4 @@ dependencies: dev_dependencies: test: ^1.21.4 build_runner: ^2.4.4 - ffigen: ^8.0.0 + ffigen: ^11.0.0 diff --git a/frb_example/flutter_via_create/pubspec.yaml b/frb_example/flutter_via_create/pubspec.yaml index 5ac8ed8160..e15d2640bc 100644 --- a/frb_example/flutter_via_create/pubspec.yaml +++ b/frb_example/flutter_via_create/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/frb_example/flutter_via_create/rust_builder/pubspec.yaml b/frb_example/flutter_via_create/rust_builder/pubspec.yaml index bb7b92041f..cab3f1f695 100644 --- a/frb_example/flutter_via_create/rust_builder/pubspec.yaml +++ b/frb_example/flutter_via_create/rust_builder/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 publish_to: none environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' flutter: '>=3.3.0' dependencies: @@ -14,7 +14,7 @@ dependencies: dev_dependencies: ffi: ^2.0.2 - ffigen: ^9.0.0 + ffigen: ^11.0.0 flutter_test: sdk: flutter flutter_lints: ^2.0.0 diff --git a/frb_example/flutter_via_integrate/pubspec.yaml b/frb_example/flutter_via_integrate/pubspec.yaml index 3360f93884..7ec9ff3132 100644 --- a/frb_example/flutter_via_integrate/pubspec.yaml +++ b/frb_example/flutter_via_integrate/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions diff --git a/frb_example/flutter_via_integrate/rust_builder/pubspec.yaml b/frb_example/flutter_via_integrate/rust_builder/pubspec.yaml index 6b1d2e21f1..4f2b7feb52 100644 --- a/frb_example/flutter_via_integrate/rust_builder/pubspec.yaml +++ b/frb_example/flutter_via_integrate/rust_builder/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 publish_to: none environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' flutter: '>=3.3.0' dependencies: @@ -14,7 +14,7 @@ dependencies: dev_dependencies: ffi: ^2.0.2 - ffigen: ^9.0.0 + ffigen: ^11.0.0 flutter_test: sdk: flutter flutter_lints: ^2.0.0 diff --git a/frb_example/gallery/pubspec.lock b/frb_example/gallery/pubspec.lock index 6b358d5780..e8673cf7a8 100644 --- a/frb_example/gallery/pubspec.lock +++ b/frb_example/gallery/pubspec.lock @@ -173,10 +173,10 @@ packages: dependency: transitive description: name: coverage - sha256: "595a29b55ce82d53398e1bcc2cba525d7bd7c59faeb2d2540e9d42c390cfeeeb" + sha256: "8acabb8306b57a409bf4c83522065672ee13179297a6bb0cb9ead73948df7c76" url: "https://pub.dev" source: hosted - version: "1.6.4" + version: "1.7.2" crypto: dependency: transitive description: @@ -213,18 +213,18 @@ packages: dependency: "direct dev" description: name: ffigen - sha256: d3e76c2ad48a4e7f93a29a162006f00eba46ce7c08194a77bb5c5e97d1b5ff0a + sha256: dead012f29db2be71ea152458f5eab600de98fbc244e01088ae6bf2616bceca7 url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "11.0.0" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: @@ -353,6 +353,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.8.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lints: dependency: "direct main" description: @@ -373,26 +397,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" mime: dependency: transitive description: @@ -421,18 +445,18 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" platform: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -453,10 +477,10 @@ packages: dependency: transitive description: name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "5.0.2" pub_semver: dependency: transitive description: @@ -657,10 +681,10 @@ packages: dependency: transitive description: name: vm_service - sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "11.10.0" + version: "13.0.0" watcher: dependency: transitive description: @@ -669,14 +693,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" - web: - dependency: transitive - description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 - url: "https://pub.dev" - source: hosted - version: "0.3.0" web_socket_channel: dependency: transitive description: @@ -689,10 +705,10 @@ packages: dependency: transitive description: name: webdriver - sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" webkit_inspection_protocol: dependency: transitive description: @@ -718,5 +734,5 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=3.2.0 <4.0.0" + dart: ">=3.3.0 <4.0.0" flutter: ">=3.3.0" diff --git a/frb_example/gallery/pubspec.yaml b/frb_example/gallery/pubspec.yaml index 1e7d7c8acb..fd2ea8c060 100644 --- a/frb_example/gallery/pubspec.yaml +++ b/frb_example/gallery/pubspec.yaml @@ -3,7 +3,7 @@ description: flutter rust bridge example version: 1.0.0 publish_to: none environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: flutter: sdk: flutter @@ -17,7 +17,7 @@ dev_dependencies: test: ^1.21.4 freezed: ^2.1.0+1 build_runner: ^2.4.4 - ffigen: ^8.0.0 + ffigen: ^11.0.0 flutter_test: sdk: flutter flutter_lints: ^2.0.0 diff --git a/frb_example/gallery/rust_builder/pubspec.yaml b/frb_example/gallery/rust_builder/pubspec.yaml index a663567dd2..62dbfa9d3c 100644 --- a/frb_example/gallery/rust_builder/pubspec.yaml +++ b/frb_example/gallery/rust_builder/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 publish_to: none environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' flutter: '>=3.3.0' dependencies: @@ -14,7 +14,7 @@ dependencies: dev_dependencies: ffi: ^2.0.2 - ffigen: ^9.0.0 + ffigen: ^11.0.0 flutter_test: sdk: flutter flutter_lints: ^2.0.0 diff --git a/frb_example/pure_dart/pubspec.lock b/frb_example/pure_dart/pubspec.lock index 7be7ef8cd0..28b63014c1 100644 --- a/frb_example/pure_dart/pubspec.lock +++ b/frb_example/pure_dart/pubspec.lock @@ -213,10 +213,10 @@ packages: dependency: "direct dev" description: name: ffigen - sha256: "3a80687577e7e51ba915114742f389a128e8aa241c52ce69a0f70aecb8e14365" + sha256: dead012f29db2be71ea152458f5eab600de98fbc244e01088ae6bf2616bceca7 url: "https://pub.dev" source: hosted - version: "9.0.1" + version: "11.0.0" file: dependency: transitive description: @@ -704,4 +704,4 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=3.2.0 <4.0.0" + dart: ">=3.3.0 <4.0.0" diff --git a/frb_example/pure_dart/pubspec.yaml b/frb_example/pure_dart/pubspec.yaml index fb57532f08..99b3239c2a 100644 --- a/frb_example/pure_dart/pubspec.yaml +++ b/frb_example/pure_dart/pubspec.yaml @@ -3,7 +3,7 @@ description: flutter rust bridge example version: 1.0.0 publish_to: none environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: benchmark_harness: ^2.2.2 meta: ^1.8.0 @@ -23,4 +23,4 @@ dependencies: dev_dependencies: build_runner: ^2.4.4 freezed: ^2.1.0+1 - ffigen: ^9.0.0 + ffigen: ^11.0.0 diff --git a/frb_example/pure_dart_pde/pubspec.lock b/frb_example/pure_dart_pde/pubspec.lock index 7be7ef8cd0..28b63014c1 100644 --- a/frb_example/pure_dart_pde/pubspec.lock +++ b/frb_example/pure_dart_pde/pubspec.lock @@ -213,10 +213,10 @@ packages: dependency: "direct dev" description: name: ffigen - sha256: "3a80687577e7e51ba915114742f389a128e8aa241c52ce69a0f70aecb8e14365" + sha256: dead012f29db2be71ea152458f5eab600de98fbc244e01088ae6bf2616bceca7 url: "https://pub.dev" source: hosted - version: "9.0.1" + version: "11.0.0" file: dependency: transitive description: @@ -704,4 +704,4 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=3.2.0 <4.0.0" + dart: ">=3.3.0 <4.0.0" diff --git a/frb_example/pure_dart_pde/pubspec.yaml b/frb_example/pure_dart_pde/pubspec.yaml index 0d49663779..db71be859f 100644 --- a/frb_example/pure_dart_pde/pubspec.yaml +++ b/frb_example/pure_dart_pde/pubspec.yaml @@ -3,7 +3,7 @@ description: flutter rust bridge example version: 1.0.0 publish_to: none environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: benchmark_harness: ^2.2.2 meta: ^1.8.0 @@ -23,4 +23,4 @@ dependencies: dev_dependencies: build_runner: ^2.4.4 freezed: ^2.1.0+1 - ffigen: ^9.0.0 + ffigen: ^11.0.0 From f31a0ca56a0f2953b61a733dabca3dc347818233 Mon Sep 17 00:00:00 2001 From: Aran Donohue Date: Fri, 16 Feb 2024 13:36:40 -0800 Subject: [PATCH 07/50] Soften ffigen version requirement in frb_codegen/assets/integration_template/rust_builder/pubspec.yaml --- .../assets/integration_template/rust_builder/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_codegen/assets/integration_template/rust_builder/pubspec.yaml b/frb_codegen/assets/integration_template/rust_builder/pubspec.yaml index 7d43168844..bae59944f0 100644 --- a/frb_codegen/assets/integration_template/rust_builder/pubspec.yaml +++ b/frb_codegen/assets/integration_template/rust_builder/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: dev_dependencies: ffi: ^2.0.2 - ffigen: ^9.0.0 + ffigen: ">=9.0.0 <12.0.0" flutter_test: sdk: flutter flutter_lints: ^2.0.0 From 5776487ba2b64f84d0009f8d11d136dcf372b58d Mon Sep 17 00:00:00 2001 From: Aran Donohue Date: Fri, 16 Feb 2024 16:28:16 -0800 Subject: [PATCH 08/50] Amend frb_dart ffigen constraint --- frb_dart/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_dart/pubspec.yaml b/frb_dart/pubspec.yaml index c1f27cb66d..40ebefaa52 100644 --- a/frb_dart/pubspec.yaml +++ b/frb_dart/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: dev_dependencies: build_cli: ^2.2.0 build_runner: ^2.2.0 - ffigen: ">=8.0.0 <10.0.0" + ffigen: ">=8.0.0 <12.0.0" flutter_lints: ^3.0.1 test: ^1.16.8 mocktail: ^1.0.1 From efe3c8ceaa871d318b4d7b76f4d25f318fa54387 Mon Sep 17 00:00:00 2001 From: Aran Donohue Date: Fri, 16 Feb 2024 16:32:06 -0800 Subject: [PATCH 09/50] Upgrade flutter and dart version for CI --- .github/workflows/ci.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b4fbce91cd..b98c4aa69f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,8 +10,8 @@ on: env: CARGO_TERM_COLOR: always FRB_MAIN_RUST_VERSION: 1.74.0 - FRB_MAIN_DART_VERSION: 3.2.0 - FRB_MAIN_FLUTTER_VERSION: 3.16.0 + FRB_MAIN_DART_VERSION: 3.3.0 + FRB_MAIN_FLUTTER_VERSION: 3.19.0 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -147,7 +147,7 @@ jobs: # we avoid a ci dependency to cargo-msrv. # However, the code is left commented here in case this decission changes. # msrv: - # name: 'Test :: FRB Codegen :: MSRV' + # name: 'Test :: FRB Codegen :: MSRV' # runs-on: ubuntu-latest # steps: # - uses: actions/checkout@v2 @@ -210,7 +210,7 @@ jobs: flutter-version: ${{ env.FRB_MAIN_FLUTTER_VERSION }} architecture: x64 - uses: taiki-e/install-action@cargo-llvm-cov - + # execute - run: ./frb_internal generate-run-frb-codegen-command-generate --set-exit-if-changed --package ${{ matrix.package }} --coverage @@ -559,8 +559,8 @@ jobs: - uses: actions/upload-artifact@v4 with: name: ${{ github.job }}--${{ matrix.info.image }}--${{ matrix.info.version }}--coverage - path: target/coverage - + path: target/coverage + test_dart_native: name: 'Test :: Dart :: Native' runs-on: ${{ matrix.image }} From aef53078ee926f68b193f8caefc55eb87e6e0935 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:08:36 +0800 Subject: [PATCH 10/50] chore: lint --- frb_codegen/src/library/commands/ensure_tools_available.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frb_codegen/src/library/commands/ensure_tools_available.rs b/frb_codegen/src/library/commands/ensure_tools_available.rs index 84a0827fb6..373ce7cb51 100644 --- a/frb_codegen/src/library/commands/ensure_tools_available.rs +++ b/frb_codegen/src/library/commands/ensure_tools_available.rs @@ -7,8 +7,7 @@ use std::path::Path; use std::str::FromStr; lazy_static! { - pub(crate) static ref FFIGEN_REQUIREMENT: VersionReq = - VersionReq::parse(">= 8.0.0").unwrap(); + pub(crate) static ref FFIGEN_REQUIREMENT: VersionReq = VersionReq::parse(">= 8.0.0").unwrap(); } pub fn ensure_tools_available( From 37c38e32b79d14436afdd0d2e074632e5cf8c274 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:13:56 +0800 Subject: [PATCH 11/50] chore: pub-get --- frb_example/dart_build_rs/pubspec.lock | 10 +++++----- frb_example/dart_minimal/pubspec.lock | 10 +++++----- frb_example/deliberate_bad/pubspec.lock | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/frb_example/dart_build_rs/pubspec.lock b/frb_example/dart_build_rs/pubspec.lock index 613278b4b1..b50b72e22d 100644 --- a/frb_example/dart_build_rs/pubspec.lock +++ b/frb_example/dart_build_rs/pubspec.lock @@ -205,18 +205,18 @@ packages: dependency: "direct dev" description: name: ffigen - sha256: d3e76c2ad48a4e7f93a29a162006f00eba46ce7c08194a77bb5c5e97d1b5ff0a + sha256: dead012f29db2be71ea152458f5eab600de98fbc244e01088ae6bf2616bceca7 url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "11.0.0" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: @@ -664,4 +664,4 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=3.2.0 <4.0.0" + dart: ">=3.3.0 <4.0.0" diff --git a/frb_example/dart_minimal/pubspec.lock b/frb_example/dart_minimal/pubspec.lock index 613278b4b1..b50b72e22d 100644 --- a/frb_example/dart_minimal/pubspec.lock +++ b/frb_example/dart_minimal/pubspec.lock @@ -205,18 +205,18 @@ packages: dependency: "direct dev" description: name: ffigen - sha256: d3e76c2ad48a4e7f93a29a162006f00eba46ce7c08194a77bb5c5e97d1b5ff0a + sha256: dead012f29db2be71ea152458f5eab600de98fbc244e01088ae6bf2616bceca7 url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "11.0.0" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: @@ -664,4 +664,4 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=3.2.0 <4.0.0" + dart: ">=3.3.0 <4.0.0" diff --git a/frb_example/deliberate_bad/pubspec.lock b/frb_example/deliberate_bad/pubspec.lock index d5b8cf6e3a..b703251cdb 100644 --- a/frb_example/deliberate_bad/pubspec.lock +++ b/frb_example/deliberate_bad/pubspec.lock @@ -213,18 +213,18 @@ packages: dependency: "direct dev" description: name: ffigen - sha256: d3e76c2ad48a4e7f93a29a162006f00eba46ce7c08194a77bb5c5e97d1b5ff0a + sha256: dead012f29db2be71ea152458f5eab600de98fbc244e01088ae6bf2616bceca7 url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "11.0.0" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: @@ -679,4 +679,4 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=3.2.0 <4.0.0" + dart: ">=3.3.0 <4.0.0" From 9a9a9faf422e74e403d7cf4339eec4915941ac11 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:14:32 +0800 Subject: [PATCH 12/50] chore: more pub-get --- frb_example/flutter_via_create/pubspec.lock | 70 ++++++++++++------- .../flutter_via_integrate/pubspec.lock | 70 ++++++++++++------- 2 files changed, 86 insertions(+), 54 deletions(-) diff --git a/frb_example/flutter_via_create/pubspec.lock b/frb_example/flutter_via_create/pubspec.lock index c60e489cdf..5b6dd8bf10 100644 --- a/frb_example/flutter_via_create/pubspec.lock +++ b/frb_example/flutter_via_create/pubspec.lock @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" flutter: dependency: "direct main" description: flutter @@ -129,6 +129,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lints: dependency: transitive description: @@ -141,42 +165,42 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" platform: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -189,10 +213,10 @@ packages: dependency: transitive description: name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "5.0.2" rust_lib_flutter_via_create: dependency: "direct main" description: @@ -273,26 +297,18 @@ packages: dependency: transitive description: name: vm_service - sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 - url: "https://pub.dev" - source: hosted - version: "11.10.0" - web: - dependency: transitive - description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "13.0.0" webdriver: dependency: transitive description: name: webdriver - sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" sdks: - dart: ">=3.2.0 <4.0.0" + dart: ">=3.3.0 <4.0.0" flutter: ">=3.3.0" diff --git a/frb_example/flutter_via_integrate/pubspec.lock b/frb_example/flutter_via_integrate/pubspec.lock index 3f7367a298..ef71cfa9d4 100644 --- a/frb_example/flutter_via_integrate/pubspec.lock +++ b/frb_example/flutter_via_integrate/pubspec.lock @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" flutter: dependency: "direct main" description: flutter @@ -129,6 +129,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lints: dependency: transitive description: @@ -141,42 +165,42 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" platform: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -189,10 +213,10 @@ packages: dependency: transitive description: name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "5.0.2" rust_lib_flutter_via_integrate: dependency: "direct main" description: @@ -273,26 +297,18 @@ packages: dependency: transitive description: name: vm_service - sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 - url: "https://pub.dev" - source: hosted - version: "11.10.0" - web: - dependency: transitive - description: - name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "13.0.0" webdriver: dependency: transitive description: name: webdriver - sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" sdks: - dart: ">=3.2.0 <4.0.0" + dart: ">=3.3.0 <4.0.0" flutter: ">=3.3.0" From eda3878c00716b50f83ec3497268c82397ceca29 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:14:55 +0800 Subject: [PATCH 13/50] feat: update post_release version --- .github/workflows/post_release.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/post_release.yaml b/.github/workflows/post_release.yaml index 4931fffcd6..2949a7a384 100644 --- a/.github/workflows/post_release.yaml +++ b/.github/workflows/post_release.yaml @@ -5,15 +5,15 @@ name: Post-Release on: - workflow_dispatch: {} + workflow_dispatch: { } schedule: - cron: "0,30 * * * *" env: CARGO_TERM_COLOR: always FRB_MAIN_RUST_VERSION: 1.74.0 - FRB_MAIN_DART_VERSION: 3.2.0 - FRB_MAIN_FLUTTER_VERSION: 3.16.0 + FRB_MAIN_DART_VERSION: 3.3.0 + FRB_MAIN_FLUTTER_VERSION: 3.19.0 jobs: test_mimic_quickstart: @@ -33,10 +33,10 @@ jobs: # - scoop # TODO enable after 2.0.0 stable release # - homebrew # TODO enable after 2.0.0 stable release exclude: - - {image: windows-2019, codegen_install_mode: homebrew} - - {image: macos-11, codegen_install_mode: scoop} - - {image: ubuntu-20.04, codegen_install_mode: homebrew} - - {image: ubuntu-20.04, codegen_install_mode: scoop} + - { image: windows-2019, codegen_install_mode: homebrew } + - { image: macos-11, codegen_install_mode: scoop } + - { image: ubuntu-20.04, codegen_install_mode: homebrew } + - { image: ubuntu-20.04, codegen_install_mode: scoop } steps: # setup From c5480a90f77a6dea0561033649c0e6df07e6ba6f Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:43:17 +0800 Subject: [PATCH 14/50] chore: update tests --- frb_example/pure_dart/rust/src/api/misc_example.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frb_example/pure_dart/rust/src/api/misc_example.rs b/frb_example/pure_dart/rust/src/api/misc_example.rs index 3cccf21868..b3d0b897d3 100644 --- a/frb_example/pure_dart/rust/src/api/misc_example.rs +++ b/frb_example/pure_dart/rust/src/api/misc_example.rs @@ -142,6 +142,8 @@ pub struct MySizeFreezedTwinNormal { #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_normal() {} -pub fn handle_declarations_above_api_folder(my_struct: DeclaredAboveApiFolder) -> DeclaredAboveApiFolder { +pub fn handle_declarations_above_api_folder_twin_normal( + my_struct: DeclaredAboveApiFolder, +) -> DeclaredAboveApiFolder { my_struct } From 3c003fd467cef96a3d8353cb634b648a81097d65 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:44:10 +0800 Subject: [PATCH 15/50] chore: inline --- .../src/library/codegen/generator/api_dart/text_generator.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs index 0caf1e876c..684a2d6cd5 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs @@ -47,8 +47,7 @@ fn generate_end_api_text( .join("\n\n"); let classes = item.classes.iter().map(|c| c.code.clone()).join("\n\n"); - let path = namespace.path(); - let path_frb_generated = match path.len() { + let path_frb_generated = match namespace.path().len() { 1 => "rust/frb_generated.dart".to_string(), len => "../".repeat(len - 2) + "frb_generated.dart", }; From ed29b97f00dd628a42a07f7565b53f75a643d534 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:44:49 +0800 Subject: [PATCH 16/50] refactorr: minor extract --- .../library/codegen/generator/api_dart/text_generator.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs index 684a2d6cd5..367ed67adc 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs @@ -48,9 +48,9 @@ fn generate_end_api_text( let classes = item.classes.iter().map(|c| c.code.clone()).join("\n\n"); let path_frb_generated = match namespace.path().len() { - 1 => "rust/frb_generated.dart".to_string(), - len => "../".repeat(len - 2) + "frb_generated.dart", - }; + 1 => "rust/".to_string(), + len => "../".repeat(len - 2), + } + "frb_generated.dart"; let mut header = DartBasicHeaderCode { file_top: generate_code_header() From 2a97cdb3d1b750005ab3f2567ebcf0af5e11ba7f Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:45:47 +0800 Subject: [PATCH 17/50] chore: codegen --- .../api/pseudo_manual/misc_example_twin_rust_async.rs | 7 +++++++ .../pseudo_manual/misc_example_twin_rust_async_sse.rs | 8 ++++++++ .../rust/src/api/pseudo_manual/misc_example_twin_sse.rs | 8 ++++++++ .../rust/src/api/pseudo_manual/misc_example_twin_sync.rs | 8 ++++++++ .../src/api/pseudo_manual/misc_example_twin_sync_sse.rs | 9 +++++++++ frb_example/pure_dart_pde/rust/src/api/misc_example.rs | 7 +++++++ .../api/pseudo_manual/misc_example_twin_rust_async.rs | 7 +++++++ .../rust/src/api/pseudo_manual/misc_example_twin_sync.rs | 8 ++++++++ frb_example/pure_dart_pde/rust/src/lib.rs | 2 ++ 9 files changed, 64 insertions(+) diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs index 652f2739bb..68de02d2e1 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs @@ -3,6 +3,7 @@ // Please do not modify manually, but modify the origin and re-run frb_internal generator use crate::auxiliary::sample_types::MySize; +use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -150,3 +151,9 @@ pub struct MySizeFreezedTwinRustAsync { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_rust_async() {} + +pub async fn handle_declarations_above_api_folder_twin_rust_async( + my_struct: DeclaredAboveApiFolder, +) -> DeclaredAboveApiFolder { + my_struct +} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async_sse.rs index 68de1915e6..8a2fdabd57 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async_sse.rs @@ -3,6 +3,7 @@ // Please do not modify manually, but modify the origin and re-run frb_internal generator use crate::auxiliary::sample_types::MySize; +use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -159,3 +160,10 @@ pub struct MySizeFreezedTwinRustAsyncSse { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_rust_async_sse() {} + +#[flutter_rust_bridge::frb(serialize)] +pub async fn handle_declarations_above_api_folder_twin_rust_async_sse( + my_struct: DeclaredAboveApiFolder, +) -> DeclaredAboveApiFolder { + my_struct +} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sse.rs index 95397670bc..cb0618b4ca 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sse.rs @@ -3,6 +3,7 @@ // Please do not modify manually, but modify the origin and re-run frb_internal generator use crate::auxiliary::sample_types::MySize; +use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -151,3 +152,10 @@ pub struct MySizeFreezedTwinSse { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_sse() {} + +#[flutter_rust_bridge::frb(serialize)] +pub fn handle_declarations_above_api_folder_twin_sse( + my_struct: DeclaredAboveApiFolder, +) -> DeclaredAboveApiFolder { + my_struct +} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync.rs index 9512beb7fc..4a24e09306 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync.rs @@ -3,6 +3,7 @@ // Please do not modify manually, but modify the origin and re-run frb_internal generator use crate::auxiliary::sample_types::MySize; +use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -151,3 +152,10 @@ pub struct MySizeFreezedTwinSync { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_sync() {} + +#[flutter_rust_bridge::frb(sync)] +pub fn handle_declarations_above_api_folder_twin_sync( + my_struct: DeclaredAboveApiFolder, +) -> DeclaredAboveApiFolder { + my_struct +} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync_sse.rs index aed25b2f2d..9f67986120 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync_sse.rs @@ -3,6 +3,7 @@ // Please do not modify manually, but modify the origin and re-run frb_internal generator use crate::auxiliary::sample_types::MySize; +use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -166,3 +167,11 @@ pub struct MySizeFreezedTwinSyncSse { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_sync_sse() {} + +#[flutter_rust_bridge::frb(serialize)] +#[flutter_rust_bridge::frb(sync)] +pub fn handle_declarations_above_api_folder_twin_sync_sse( + my_struct: DeclaredAboveApiFolder, +) -> DeclaredAboveApiFolder { + my_struct +} diff --git a/frb_example/pure_dart_pde/rust/src/api/misc_example.rs b/frb_example/pure_dart_pde/rust/src/api/misc_example.rs index 5dc290053f..64135a67f4 100644 --- a/frb_example/pure_dart_pde/rust/src/api/misc_example.rs +++ b/frb_example/pure_dart_pde/rust/src/api/misc_example.rs @@ -1,6 +1,7 @@ // AUTO-GENERATED FROM frb_example/pure_dart, DO NOT EDIT use crate::auxiliary::sample_types::MySize; +use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -142,3 +143,9 @@ pub struct MySizeFreezedTwinNormal { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_normal() {} + +pub fn handle_declarations_above_api_folder_twin_normal( + my_struct: DeclaredAboveApiFolder, +) -> DeclaredAboveApiFolder { + my_struct +} diff --git a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs index 4b80786b78..f115a10db6 100644 --- a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs +++ b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs @@ -5,6 +5,7 @@ // AUTO-GENERATED FROM frb_example/pure_dart, DO NOT EDIT use crate::auxiliary::sample_types::MySize; +use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -152,3 +153,9 @@ pub struct MySizeFreezedTwinRustAsync { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_rust_async() {} + +pub async fn handle_declarations_above_api_folder_twin_rust_async( + my_struct: DeclaredAboveApiFolder, +) -> DeclaredAboveApiFolder { + my_struct +} diff --git a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_sync.rs b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_sync.rs index bc6f5b134a..0c4f52fb00 100644 --- a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_sync.rs +++ b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_sync.rs @@ -5,6 +5,7 @@ // AUTO-GENERATED FROM frb_example/pure_dart, DO NOT EDIT use crate::auxiliary::sample_types::MySize; +use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -153,3 +154,10 @@ pub struct MySizeFreezedTwinSync { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_sync() {} + +#[flutter_rust_bridge::frb(sync)] +pub fn handle_declarations_above_api_folder_twin_sync( + my_struct: DeclaredAboveApiFolder, +) -> DeclaredAboveApiFolder { + my_struct +} diff --git a/frb_example/pure_dart_pde/rust/src/lib.rs b/frb_example/pure_dart_pde/rust/src/lib.rs index 77ed78dce9..457c53bef1 100644 --- a/frb_example/pure_dart_pde/rust/src/lib.rs +++ b/frb_example/pure_dart_pde/rust/src/lib.rs @@ -4,3 +4,5 @@ pub mod api; mod auxiliary; mod deliberate_name_conflict; mod frb_generated; /* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */ + +pub struct DeclaredAboveApiFolder {} From 2ead3f12a71f465e3dadbcbf50d7a2edfc510a7f Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:48:25 +0800 Subject: [PATCH 18/50] fix: diff paths --- frb_codegen/src/library/codegen/dumper/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/dumper/mod.rs b/frb_codegen/src/library/codegen/dumper/mod.rs index c43ba11959..a3f204138e 100644 --- a/frb_codegen/src/library/codegen/dumper/mod.rs +++ b/frb_codegen/src/library/codegen/dumper/mod.rs @@ -4,8 +4,10 @@ use crate::codegen::generator::misc::target::TargetOrCommon; use crate::codegen::generator::misc::PathTexts; use crate::utils::file_utils::create_dir_all_and_write; use crate::utils::path_utils::path_to_string; +use anyhow::Context; use convert_case::{Case, Casing}; use log::debug; +use pathdiff::diff_paths; use serde::Serialize; use std::path::Path; use strum::IntoEnumIterator; @@ -44,7 +46,9 @@ impl Dumper<'_> { content, &format!( "{partial_name}/{}", - path_to_string(path_text.path.strip_prefix(base_dir)?)? + path_to_string( + &diff_paths(&path_text.path, base_dir).context("cannot diff path")? + )? ), &path_text.text, )?; From 951698e202c9acc42d96eeaeba43e1fc4b865e67 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:54:52 +0800 Subject: [PATCH 19/50] Revert "chore: codegen" This reverts commit 2a97cdb3d1b750005ab3f2567ebcf0af5e11ba7f. --- .../api/pseudo_manual/misc_example_twin_rust_async.rs | 7 ------- .../pseudo_manual/misc_example_twin_rust_async_sse.rs | 8 -------- .../rust/src/api/pseudo_manual/misc_example_twin_sse.rs | 8 -------- .../rust/src/api/pseudo_manual/misc_example_twin_sync.rs | 8 -------- .../src/api/pseudo_manual/misc_example_twin_sync_sse.rs | 9 --------- frb_example/pure_dart_pde/rust/src/api/misc_example.rs | 7 ------- .../api/pseudo_manual/misc_example_twin_rust_async.rs | 7 ------- .../rust/src/api/pseudo_manual/misc_example_twin_sync.rs | 8 -------- frb_example/pure_dart_pde/rust/src/lib.rs | 2 -- 9 files changed, 64 deletions(-) diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs index 68de02d2e1..652f2739bb 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs @@ -3,7 +3,6 @@ // Please do not modify manually, but modify the origin and re-run frb_internal generator use crate::auxiliary::sample_types::MySize; -use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -151,9 +150,3 @@ pub struct MySizeFreezedTwinRustAsync { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_rust_async() {} - -pub async fn handle_declarations_above_api_folder_twin_rust_async( - my_struct: DeclaredAboveApiFolder, -) -> DeclaredAboveApiFolder { - my_struct -} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async_sse.rs index 8a2fdabd57..68de1915e6 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_rust_async_sse.rs @@ -3,7 +3,6 @@ // Please do not modify manually, but modify the origin and re-run frb_internal generator use crate::auxiliary::sample_types::MySize; -use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -160,10 +159,3 @@ pub struct MySizeFreezedTwinRustAsyncSse { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_rust_async_sse() {} - -#[flutter_rust_bridge::frb(serialize)] -pub async fn handle_declarations_above_api_folder_twin_rust_async_sse( - my_struct: DeclaredAboveApiFolder, -) -> DeclaredAboveApiFolder { - my_struct -} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sse.rs index cb0618b4ca..95397670bc 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sse.rs @@ -3,7 +3,6 @@ // Please do not modify manually, but modify the origin and re-run frb_internal generator use crate::auxiliary::sample_types::MySize; -use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -152,10 +151,3 @@ pub struct MySizeFreezedTwinSse { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_sse() {} - -#[flutter_rust_bridge::frb(serialize)] -pub fn handle_declarations_above_api_folder_twin_sse( - my_struct: DeclaredAboveApiFolder, -) -> DeclaredAboveApiFolder { - my_struct -} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync.rs index 4a24e09306..9512beb7fc 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync.rs @@ -3,7 +3,6 @@ // Please do not modify manually, but modify the origin and re-run frb_internal generator use crate::auxiliary::sample_types::MySize; -use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -152,10 +151,3 @@ pub struct MySizeFreezedTwinSync { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_sync() {} - -#[flutter_rust_bridge::frb(sync)] -pub fn handle_declarations_above_api_folder_twin_sync( - my_struct: DeclaredAboveApiFolder, -) -> DeclaredAboveApiFolder { - my_struct -} diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync_sse.rs index 9f67986120..aed25b2f2d 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/misc_example_twin_sync_sse.rs @@ -3,7 +3,6 @@ // Please do not modify manually, but modify the origin and re-run frb_internal generator use crate::auxiliary::sample_types::MySize; -use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -167,11 +166,3 @@ pub struct MySizeFreezedTwinSyncSse { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_sync_sse() {} - -#[flutter_rust_bridge::frb(serialize)] -#[flutter_rust_bridge::frb(sync)] -pub fn handle_declarations_above_api_folder_twin_sync_sse( - my_struct: DeclaredAboveApiFolder, -) -> DeclaredAboveApiFolder { - my_struct -} diff --git a/frb_example/pure_dart_pde/rust/src/api/misc_example.rs b/frb_example/pure_dart_pde/rust/src/api/misc_example.rs index 64135a67f4..5dc290053f 100644 --- a/frb_example/pure_dart_pde/rust/src/api/misc_example.rs +++ b/frb_example/pure_dart_pde/rust/src/api/misc_example.rs @@ -1,7 +1,6 @@ // AUTO-GENERATED FROM frb_example/pure_dart, DO NOT EDIT use crate::auxiliary::sample_types::MySize; -use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -143,9 +142,3 @@ pub struct MySizeFreezedTwinNormal { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_normal() {} - -pub fn handle_declarations_above_api_folder_twin_normal( - my_struct: DeclaredAboveApiFolder, -) -> DeclaredAboveApiFolder { - my_struct -} diff --git a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs index f115a10db6..4b80786b78 100644 --- a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs +++ b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_rust_async.rs @@ -5,7 +5,6 @@ // AUTO-GENERATED FROM frb_example/pure_dart, DO NOT EDIT use crate::auxiliary::sample_types::MySize; -use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -153,9 +152,3 @@ pub struct MySizeFreezedTwinRustAsync { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_rust_async() {} - -pub async fn handle_declarations_above_api_folder_twin_rust_async( - my_struct: DeclaredAboveApiFolder, -) -> DeclaredAboveApiFolder { - my_struct -} diff --git a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_sync.rs b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_sync.rs index 0c4f52fb00..bc6f5b134a 100644 --- a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_sync.rs +++ b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/misc_example_twin_sync.rs @@ -5,7 +5,6 @@ // AUTO-GENERATED FROM frb_example/pure_dart, DO NOT EDIT use crate::auxiliary::sample_types::MySize; -use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -154,10 +153,3 @@ pub struct MySizeFreezedTwinSync { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_sync() {} - -#[flutter_rust_bridge::frb(sync)] -pub fn handle_declarations_above_api_folder_twin_sync( - my_struct: DeclaredAboveApiFolder, -) -> DeclaredAboveApiFolder { - my_struct -} diff --git a/frb_example/pure_dart_pde/rust/src/lib.rs b/frb_example/pure_dart_pde/rust/src/lib.rs index 457c53bef1..77ed78dce9 100644 --- a/frb_example/pure_dart_pde/rust/src/lib.rs +++ b/frb_example/pure_dart_pde/rust/src/lib.rs @@ -4,5 +4,3 @@ pub mod api; mod auxiliary; mod deliberate_name_conflict; mod frb_generated; /* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */ - -pub struct DeclaredAboveApiFolder {} From 7c44cbeeada968363221af8e391209b10febd872 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:55:24 +0800 Subject: [PATCH 20/50] chore: further --- frb_example/pure_dart/rust/src/api/misc_example.rs | 7 ------- frb_example/pure_dart/rust/src/lib.rs | 2 -- 2 files changed, 9 deletions(-) diff --git a/frb_example/pure_dart/rust/src/api/misc_example.rs b/frb_example/pure_dart/rust/src/api/misc_example.rs index b3d0b897d3..b0bb094cb2 100644 --- a/frb_example/pure_dart/rust/src/api/misc_example.rs +++ b/frb_example/pure_dart/rust/src/api/misc_example.rs @@ -1,5 +1,4 @@ use crate::auxiliary::sample_types::MySize; -use crate::DeclaredAboveApiFolder; use flutter_rust_bridge::frb; use log::info; @@ -141,9 +140,3 @@ pub struct MySizeFreezedTwinNormal { // To test parsing of `pub(super)` #[allow(dead_code)] pub(super) fn visibility_restricted_func_twin_normal() {} - -pub fn handle_declarations_above_api_folder_twin_normal( - my_struct: DeclaredAboveApiFolder, -) -> DeclaredAboveApiFolder { - my_struct -} diff --git a/frb_example/pure_dart/rust/src/lib.rs b/frb_example/pure_dart/rust/src/lib.rs index 164b1761c6..58ce8dbfe7 100644 --- a/frb_example/pure_dart/rust/src/lib.rs +++ b/frb_example/pure_dart/rust/src/lib.rs @@ -2,5 +2,3 @@ pub mod api; mod auxiliary; mod deliberate_name_conflict; mod frb_generated; /* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */ - -pub struct DeclaredAboveApiFolder {} From b44ee73d3ff6624899727f16b9412a90b72c2a84 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:57:00 +0800 Subject: [PATCH 21/50] refactor: assert --- .../codegen/generator/api_dart/text_generator.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs index 367ed67adc..c0ed55e9e5 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs @@ -6,6 +6,7 @@ use crate::codegen::generator::api_dart::spec_generator::{ use crate::codegen::generator::misc::{generate_code_header, PathText, PathTexts}; use crate::codegen::ir::namespace::Namespace; use crate::utils::basic_code::DartBasicHeaderCode; +use anyhow::ensure; use itertools::Itertools; use std::path::{Path, PathBuf}; @@ -47,10 +48,13 @@ fn generate_end_api_text( .join("\n\n"); let classes = item.classes.iter().map(|c| c.code.clone()).join("\n\n"); - let path_frb_generated = match namespace.path().len() { - 1 => "rust/".to_string(), - len => "../".repeat(len - 2), - } + "frb_generated.dart"; + let path_chunks_len = namespace.path().len(); + ensure!( + path_chunks_len >= 2, + "Please do not put structs in `lib.rs`" + ); + // TODO use relative path calculation + let path_frb_generated = "../".repeat(path_chunks_len - 2) + "frb_generated.dart"; let mut header = DartBasicHeaderCode { file_top: generate_code_header() From fb2021d3c8b7747944580eaafcc6d776cf976a8f Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 13:57:36 +0800 Subject: [PATCH 22/50] chore: codecov --- .../src/library/codegen/generator/api_dart/text_generator.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs index c0ed55e9e5..a325538fe9 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs @@ -51,7 +51,10 @@ fn generate_end_api_text( let path_chunks_len = namespace.path().len(); ensure!( path_chunks_len >= 2, - "Please do not put structs in `lib.rs`" + // This will stop the whole generator and tell the users, so we do not care about testing it + // frb-coverage:ignore-start + "Please do not put structs in `lib.rs`", + // frb-coverage:ignore-end ); // TODO use relative path calculation let path_frb_generated = "../".repeat(path_chunks_len - 2) + "frb_generated.dart"; From 27f3192b46cf03681228d56cce24002dc809ca54 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:21:08 +0800 Subject: [PATCH 23/50] chore: make dev_dep tighter --- frb_dart/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_dart/pubspec.yaml b/frb_dart/pubspec.yaml index e3b8b98f62..2bd7fbdd04 100644 --- a/frb_dart/pubspec.yaml +++ b/frb_dart/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: dev_dependencies: build_cli: ^2.2.0 build_runner: ^2.2.0 - ffigen: ">=8.0.0 <12.0.0" + ffigen: ^11.0.0 flutter_lints: ^3.0.1 test: ^1.16.8 mocktail: ^1.0.1 From a5fe2fb033b983d4709ca351e4e0f93a9ec2f7fa Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:25:57 +0800 Subject: [PATCH 24/50] feat: more --- frb_codegen/src/library/commands/ffigen.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frb_codegen/src/library/commands/ffigen.rs b/frb_codegen/src/library/commands/ffigen.rs index 94500763de..521e7f70c5 100644 --- a/frb_codegen/src/library/commands/ffigen.rs +++ b/frb_codegen/src/library/commands/ffigen.rs @@ -169,6 +169,10 @@ fn parse_config(args: &FfigenToFileArgs) -> FfigenCommandConfig { functions: FfigenCommandConfigFunctions { rename: args.function_rename.cloned(), }, + // Otherwise, e.g. on MacOS, we see a ton of warnings like: + // `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:239:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [Nullability Issue]` + // Indeed, we have our own sanity checks to detect errors. + ignore_source_errors: true, } } @@ -185,6 +189,7 @@ pub(crate) struct FfigenCommandConfig { pub llvm_path: Vec, pub compiler_opts: Vec, pub functions: FfigenCommandConfigFunctions, + pub ignore_source_errors: bool, } #[derive(Default, Clone, Serialize, Deserialize)] From eb13c868c5a3460b7d2bee11ef819af0ba84ba4a Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:28:26 +0800 Subject: [PATCH 25/50] fix: more --- frb_codegen/src/library/internal/frb_dart_source_code.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frb_codegen/src/library/internal/frb_dart_source_code.rs b/frb_codegen/src/library/internal/frb_dart_source_code.rs index ea5600aed1..5d5d71c07f 100644 --- a/frb_codegen/src/library/internal/frb_dart_source_code.rs +++ b/frb_codegen/src/library/internal/frb_dart_source_code.rs @@ -155,6 +155,8 @@ fn ffigen(repo_base_dir: &Path) -> anyhow::Result<()> { format!("-I{}", &path_to_string(&dir_dart_api)?), format!("-I{}", &path_to_string(&dir_intermediate)?), ], + // same reason as is discussed in ffigen.rs + ignore_source_errors: true, ..Default::default() }, &repo_base_dir.join("frb_dart"), From 984ee4ac99369f5841474e0febff4bc711c98d1f Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:29:17 +0800 Subject: [PATCH 26/50] chore: codegen --- .../src/ffigen_generated/multi_package.dart | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/frb_dart/lib/src/ffigen_generated/multi_package.dart b/frb_dart/lib/src/ffigen_generated/multi_package.dart index b36295cb6b..d08d449300 100644 --- a/frb_dart/lib/src/ffigen_generated/multi_package.dart +++ b/frb_dart/lib/src/ffigen_generated/multi_package.dart @@ -525,6 +525,7 @@ final class UnnamedStruct1 extends ffi.Struct { /// A port is used to send or receive inter-isolate messages typedef Dart_Port = ffi.Int64; +typedef DartDart_Port = int; final class UnnamedStruct2 extends ffi.Struct { @ffi.Int64() @@ -581,10 +582,12 @@ final class UnnamedStruct5 extends ffi.Struct { external Dart_HandleFinalizer callback; } -typedef Dart_HandleFinalizer = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer isolate_callback_data, - ffi.Pointer peer)>>; +typedef Dart_HandleFinalizer + = ffi.Pointer>; +typedef Dart_HandleFinalizerFunction = ffi.Void Function( + ffi.Pointer isolate_callback_data, ffi.Pointer peer); +typedef DartDart_HandleFinalizerFunction = void Function( + ffi.Pointer isolate_callback_data, ffi.Pointer peer); final class UnnamedStruct6 extends ffi.Struct { @ffi.IntPtr() @@ -607,10 +610,12 @@ typedef Dart_CObject = _Dart_CObject; /// lifetime of the message data is controlled by the caller. All the /// data references from the message are allocated by the caller and /// will be reclaimed when returning to it. -typedef Dart_NativeMessageHandler = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - Dart_Port dest_port_id, ffi.Pointer message)>>; +typedef Dart_NativeMessageHandler + = ffi.Pointer>; +typedef Dart_NativeMessageHandlerFunction = ffi.Void Function( + Dart_Port dest_port_id, ffi.Pointer message); +typedef DartDart_NativeMessageHandlerFunction = void Function( + DartDart_Port dest_port_id, ffi.Pointer message); final class _Dart_Handle extends ffi.Opaque {} @@ -629,12 +634,16 @@ final class DartCObject extends ffi.Opaque {} /// `message` The message to send. /// /// return true if the message was posted. -typedef DartPostCObjectFnType = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(DartPort port_id, ffi.Pointer message)>>; +typedef DartPostCObjectFnType + = ffi.Pointer>; +typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( + DartPort port_id, ffi.Pointer message); +typedef DartDartPostCObjectFnTypeFunction = bool Function( + DartDartPort port_id, ffi.Pointer message); /// A port is used to send or receive inter-isolate messages typedef DartPort = ffi.Int64; +typedef DartDartPort = int; final class WireSyncRust2DartSse extends ffi.Struct { external ffi.Pointer ptr; @@ -644,6 +653,7 @@ final class WireSyncRust2DartSse extends ffi.Struct { } typedef MessagePort = ffi.Int64; +typedef DartMessagePort = int; typedef WireSyncRust2DartDco = ffi.Pointer; // coverage:ignore-end From 9ce16eff69da4f43ab1fca8d830ee4ea9257b3b2 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:34:16 +0800 Subject: [PATCH 27/50] chore: codegen --- .../pure_dart/lib/src/rust/frb_generated.io.dart | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart index e085ff6369..1b57f57057 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart @@ -93651,10 +93651,14 @@ class RustLibWire implements BaseWire { _dummy_method_to_enforce_bundlingPtr.asFunction(); } -typedef DartPostCObjectFnType = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(DartPort port_id, ffi.Pointer message)>>; +typedef DartPostCObjectFnType + = ffi.Pointer>; +typedef DartPostCObjectFnTypeFunction = ffi.Bool Function( + DartPort port_id, ffi.Pointer message); +typedef DartDartPostCObjectFnTypeFunction = bool Function( + DartDartPort port_id, ffi.Pointer message); typedef DartPort = ffi.Int64; +typedef DartDartPort = int; final class benchmark_raw_list_prim_u_8 extends ffi.Struct { external ffi.Pointer ptr; From 2ec6b42675d747c953cbb4a6f05bdc225fc84e0c Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:35:04 +0800 Subject: [PATCH 28/50] chore: ignore warning since we need to support old code --- frb_dart/lib/src/dart_c_object_into_dart/_io.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frb_dart/lib/src/dart_c_object_into_dart/_io.dart b/frb_dart/lib/src/dart_c_object_into_dart/_io.dart index 724a3de07f..14ecd33022 100644 --- a/frb_dart/lib/src/dart_c_object_into_dart/_io.dart +++ b/frb_dart/lib/src/dart_c_object_into_dart/_io.dart @@ -30,6 +30,7 @@ dynamic dartCObjectIntoDart(Dart_CObject object) { // See [allo-isolate's String::into_dart](https://github.com/sunshine-protocol/allo-isolate/blob/71b9760993d64ef46794176ca276d1cc637b2599/src/into_dart.rs#L106) // and [std::ffi::CString](https://doc.rust-lang.org/nightly/std/ffi/struct.CString.html) int len = 0; + // ignore: deprecated_member_use while (object.value.as_string.elementAt(len).value != 0) { len++; } @@ -38,8 +39,8 @@ dynamic dartCObjectIntoDart(Dart_CObject object) { case Dart_CObject_Type.Dart_CObject_kArray: return List.generate( - object.value.as_array.length, - (i) => dartCObjectIntoDart( + object.value.as_array.length, (i) => dartCObjectIntoDart( + // ignore: deprecated_member_use object.value.as_array.values.elementAt(i).value.ref)); case Dart_CObject_Type.Dart_CObject_kTypedData: From 022234e4e282a34858ad67e26b84dec208a69dae Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:39:10 +0800 Subject: [PATCH 29/50] chore: codegen --- .../rust_builder/pubspec.yaml | 4 +- frb_example/flutter_via_create/.metadata | 30 +++++++------- .../android/app/build.gradle | 2 +- .../android/app/src/main/AndroidManifest.xml | 11 +++++ .../flutter_via_create/MainActivity.kt | 3 +- .../flutter_via_create/android/build.gradle | 12 ------ .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../android/settings.gradle | 5 +-- .../ios/Flutter/AppFrameworkInfo.plist | 2 +- frb_example/flutter_via_create/ios/Podfile | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 40 ++++++++++--------- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../linux/my_application.cc | 20 ++++++++++ .../macos/Runner.xcodeproj/project.pbxproj | 12 +++++- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- frb_example/flutter_via_create/pubspec.lock | 8 ++-- frb_example/flutter_via_create/pubspec.yaml | 4 +- frb_example/flutter_via_integrate/.metadata | 30 +++++++------- .../android/app/build.gradle | 2 +- .../android/app/src/main/AndroidManifest.xml | 11 +++++ .../flutter_via_integrate/MainActivity.kt | 3 +- .../android/build.gradle | 12 ------ .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../android/settings.gradle | 5 +-- .../ios/Flutter/AppFrameworkInfo.plist | 2 +- frb_example/flutter_via_integrate/ios/Podfile | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 40 ++++++++++--------- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../linux/my_application.cc | 20 ++++++++++ .../macos/Runner.xcodeproj/project.pbxproj | 12 +++++- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../flutter_via_integrate/pubspec.lock | 8 ++-- .../flutter_via_integrate/pubspec.yaml | 4 +- 33 files changed, 186 insertions(+), 132 deletions(-) diff --git a/frb_codegen/assets/integration_template/rust_builder/pubspec.yaml b/frb_codegen/assets/integration_template/rust_builder/pubspec.yaml index bae59944f0..89ac983418 100644 --- a/frb_codegen/assets/integration_template/rust_builder/pubspec.yaml +++ b/frb_codegen/assets/integration_template/rust_builder/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 publish_to: none environment: - sdk: '>=3.2.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' flutter: '>=3.3.0' dependencies: @@ -14,7 +14,7 @@ dependencies: dev_dependencies: ffi: ^2.0.2 - ffigen: ">=9.0.0 <12.0.0" + ffigen: ^11.0.0 flutter_test: sdk: flutter flutter_lints: ^2.0.0 diff --git a/frb_example/flutter_via_create/.metadata b/frb_example/flutter_via_create/.metadata index d22992edba..bae49f356f 100644 --- a/frb_example/flutter_via_create/.metadata +++ b/frb_example/flutter_via_create/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "db7ef5bf9f59442b0e200a90587e8fa5e0c6336a" + revision: "7482962148e8d758338d8a28f589f317e1e42ba4" channel: "stable" project_type: app @@ -13,26 +13,26 @@ project_type: app migration: platforms: - platform: root - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - platform: android - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - platform: ios - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - platform: linux - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - platform: macos - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - platform: web - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 - platform: windows - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 + base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4 # User provided section diff --git a/frb_example/flutter_via_create/android/app/build.gradle b/frb_example/flutter_via_create/android/app/build.gradle index 47dac1f9b0..a68d619dfd 100644 --- a/frb_example/flutter_via_create/android/app/build.gradle +++ b/frb_example/flutter_via_create/android/app/build.gradle @@ -24,7 +24,7 @@ if (flutterVersionName == null) { android { namespace "com.example.flutter_via_create" - compileSdkVersion flutter.compileSdkVersion + compileSdk flutter.compileSdkVersion ndkVersion flutter.ndkVersion compileOptions { diff --git a/frb_example/flutter_via_create/android/app/src/main/AndroidManifest.xml b/frb_example/flutter_via_create/android/app/src/main/AndroidManifest.xml index a566a8c581..14d1d08625 100644 --- a/frb_example/flutter_via_create/android/app/src/main/AndroidManifest.xml +++ b/frb_example/flutter_via_create/android/app/src/main/AndroidManifest.xml @@ -30,4 +30,15 @@ android:name="flutterEmbedding" android:value="2" /> + + + + + + + diff --git a/frb_example/flutter_via_create/android/app/src/main/kotlin/com/example/flutter_via_create/MainActivity.kt b/frb_example/flutter_via_create/android/app/src/main/kotlin/com/example/flutter_via_create/MainActivity.kt index bb564e1329..32ed7ae185 100644 --- a/frb_example/flutter_via_create/android/app/src/main/kotlin/com/example/flutter_via_create/MainActivity.kt +++ b/frb_example/flutter_via_create/android/app/src/main/kotlin/com/example/flutter_via_create/MainActivity.kt @@ -2,5 +2,4 @@ package com.example.flutter_via_create import io.flutter.embedding.android.FlutterActivity -class MainActivity: FlutterActivity() { -} +class MainActivity: FlutterActivity() diff --git a/frb_example/flutter_via_create/android/build.gradle b/frb_example/flutter_via_create/android/build.gradle index e83fb5daca..bc157bd1a1 100644 --- a/frb_example/flutter_via_create/android/build.gradle +++ b/frb_example/flutter_via_create/android/build.gradle @@ -1,15 +1,3 @@ -buildscript { - ext.kotlin_version = '1.7.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() diff --git a/frb_example/flutter_via_create/android/gradle/wrapper/gradle-wrapper.properties b/frb_example/flutter_via_create/android/gradle/wrapper/gradle-wrapper.properties index 3c472b99c6..e1ca574ef0 100644 --- a/frb_example/flutter_via_create/android/gradle/wrapper/gradle-wrapper.properties +++ b/frb_example/flutter_via_create/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/frb_example/flutter_via_create/android/settings.gradle b/frb_example/flutter_via_create/android/settings.gradle index 7cd7128551..1d6d19b7f8 100644 --- a/frb_example/flutter_via_create/android/settings.gradle +++ b/frb_example/flutter_via_create/android/settings.gradle @@ -15,15 +15,12 @@ pluginManagement { mavenCentral() gradlePluginPortal() } - - plugins { - id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false - } } plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false } include ":app" diff --git a/frb_example/flutter_via_create/ios/Flutter/AppFrameworkInfo.plist b/frb_example/flutter_via_create/ios/Flutter/AppFrameworkInfo.plist index 9625e105df..7c56964006 100644 --- a/frb_example/flutter_via_create/ios/Flutter/AppFrameworkInfo.plist +++ b/frb_example/flutter_via_create/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/frb_example/flutter_via_create/ios/Podfile b/frb_example/flutter_via_create/ios/Podfile index fdcc671eb3..d97f17e223 100644 --- a/frb_example/flutter_via_create/ios/Podfile +++ b/frb_example/flutter_via_create/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/frb_example/flutter_via_create/ios/Runner.xcodeproj/project.pbxproj b/frb_example/flutter_via_create/ios/Runner.xcodeproj/project.pbxproj index 1134db0d7a..76fd9655db 100644 --- a/frb_example/flutter_via_create/ios/Runner.xcodeproj/project.pbxproj +++ b/frb_example/flutter_via_create/ios/Runner.xcodeproj/project.pbxproj @@ -8,12 +8,12 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -42,6 +42,8 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -53,8 +55,6 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,6 +68,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -79,14 +87,6 @@ name = Flutter; sourceTree = ""; }; - 331C8082294A63A400263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C807B294A618700263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( @@ -129,7 +129,6 @@ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( 331C807D294A63A400263BE5 /* Sources */, - 331C807E294A63A400263BE5 /* Frameworks */, 331C807F294A63A400263BE5 /* Resources */, ); buildRules = ( @@ -169,7 +168,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C8080294A63A400263BE5 = { @@ -308,6 +307,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -337,6 +337,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -345,7 +346,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -377,7 +378,6 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -395,7 +395,6 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -411,7 +410,6 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -429,6 +427,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -458,6 +457,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -472,7 +472,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -484,6 +484,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -513,6 +514,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -521,7 +523,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/frb_example/flutter_via_create/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/frb_example/flutter_via_create/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 87131a09be..8e3ca5dfe1 100644 --- a/frb_example/flutter_via_create/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/frb_example/flutter_via_create/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ startup(application); +} + +// Implements GApplication::shutdown. +static void my_application_shutdown(GApplication* application) { + //MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application shutdown. + + G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); +} + // Implements GObject::dispose. static void my_application_dispose(GObject* object) { MyApplication* self = MY_APPLICATION(object); @@ -91,6 +109,8 @@ static void my_application_dispose(GObject* object) { static void my_application_class_init(MyApplicationClass* klass) { G_APPLICATION_CLASS(klass)->activate = my_application_activate; G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_APPLICATION_CLASS(klass)->startup = my_application_startup; + G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; G_OBJECT_CLASS(klass)->dispose = my_application_dispose; } diff --git a/frb_example/flutter_via_create/macos/Runner.xcodeproj/project.pbxproj b/frb_example/flutter_via_create/macos/Runner.xcodeproj/project.pbxproj index 1d96d28d77..37f5e1d32d 100644 --- a/frb_example/flutter_via_create/macos/Runner.xcodeproj/project.pbxproj +++ b/frb_example/flutter_via_create/macos/Runner.xcodeproj/project.pbxproj @@ -226,8 +226,9 @@ 33CC10E52044A3C60003C045 /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C80D4294CF70F00263BE5 = { @@ -424,6 +425,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -447,9 +449,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -497,6 +501,7 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -520,9 +525,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -550,6 +557,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -573,9 +581,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/frb_example/flutter_via_create/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/frb_example/flutter_via_create/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 95de4a5af8..9bcdadecf6 100644 --- a/frb_example/flutter_via_create/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/frb_example/flutter_via_create/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ + + + + + + + diff --git a/frb_example/flutter_via_integrate/android/app/src/main/kotlin/com/example/flutter_via_integrate/MainActivity.kt b/frb_example/flutter_via_integrate/android/app/src/main/kotlin/com/example/flutter_via_integrate/MainActivity.kt index 4696288f14..785fd67f8e 100644 --- a/frb_example/flutter_via_integrate/android/app/src/main/kotlin/com/example/flutter_via_integrate/MainActivity.kt +++ b/frb_example/flutter_via_integrate/android/app/src/main/kotlin/com/example/flutter_via_integrate/MainActivity.kt @@ -2,5 +2,4 @@ package com.example.flutter_via_integrate import io.flutter.embedding.android.FlutterActivity -class MainActivity: FlutterActivity() { -} +class MainActivity: FlutterActivity() diff --git a/frb_example/flutter_via_integrate/android/build.gradle b/frb_example/flutter_via_integrate/android/build.gradle index e83fb5daca..bc157bd1a1 100644 --- a/frb_example/flutter_via_integrate/android/build.gradle +++ b/frb_example/flutter_via_integrate/android/build.gradle @@ -1,15 +1,3 @@ -buildscript { - ext.kotlin_version = '1.7.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() diff --git a/frb_example/flutter_via_integrate/android/gradle/wrapper/gradle-wrapper.properties b/frb_example/flutter_via_integrate/android/gradle/wrapper/gradle-wrapper.properties index 3c472b99c6..e1ca574ef0 100644 --- a/frb_example/flutter_via_integrate/android/gradle/wrapper/gradle-wrapper.properties +++ b/frb_example/flutter_via_integrate/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/frb_example/flutter_via_integrate/android/settings.gradle b/frb_example/flutter_via_integrate/android/settings.gradle index 7cd7128551..1d6d19b7f8 100644 --- a/frb_example/flutter_via_integrate/android/settings.gradle +++ b/frb_example/flutter_via_integrate/android/settings.gradle @@ -15,15 +15,12 @@ pluginManagement { mavenCentral() gradlePluginPortal() } - - plugins { - id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false - } } plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false } include ":app" diff --git a/frb_example/flutter_via_integrate/ios/Flutter/AppFrameworkInfo.plist b/frb_example/flutter_via_integrate/ios/Flutter/AppFrameworkInfo.plist index 9625e105df..7c56964006 100644 --- a/frb_example/flutter_via_integrate/ios/Flutter/AppFrameworkInfo.plist +++ b/frb_example/flutter_via_integrate/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/frb_example/flutter_via_integrate/ios/Podfile b/frb_example/flutter_via_integrate/ios/Podfile index fdcc671eb3..d97f17e223 100644 --- a/frb_example/flutter_via_integrate/ios/Podfile +++ b/frb_example/flutter_via_integrate/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/frb_example/flutter_via_integrate/ios/Runner.xcodeproj/project.pbxproj b/frb_example/flutter_via_integrate/ios/Runner.xcodeproj/project.pbxproj index 82cf0f659d..f2c07c3ba6 100644 --- a/frb_example/flutter_via_integrate/ios/Runner.xcodeproj/project.pbxproj +++ b/frb_example/flutter_via_integrate/ios/Runner.xcodeproj/project.pbxproj @@ -8,12 +8,12 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -42,6 +42,8 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -53,8 +55,6 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,6 +68,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -79,14 +87,6 @@ name = Flutter; sourceTree = ""; }; - 331C8082294A63A400263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C807B294A618700263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( @@ -129,7 +129,6 @@ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( 331C807D294A63A400263BE5 /* Sources */, - 331C807E294A63A400263BE5 /* Frameworks */, 331C807F294A63A400263BE5 /* Resources */, ); buildRules = ( @@ -169,7 +168,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C8080294A63A400263BE5 = { @@ -308,6 +307,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -337,6 +337,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -345,7 +346,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -377,7 +378,6 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -395,7 +395,6 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -411,7 +410,6 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -429,6 +427,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -458,6 +457,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -472,7 +472,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -484,6 +484,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -513,6 +514,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -521,7 +523,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/frb_example/flutter_via_integrate/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/frb_example/flutter_via_integrate/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 87131a09be..8e3ca5dfe1 100644 --- a/frb_example/flutter_via_integrate/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/frb_example/flutter_via_integrate/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ startup(application); +} + +// Implements GApplication::shutdown. +static void my_application_shutdown(GApplication* application) { + //MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application shutdown. + + G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); +} + // Implements GObject::dispose. static void my_application_dispose(GObject* object) { MyApplication* self = MY_APPLICATION(object); @@ -91,6 +109,8 @@ static void my_application_dispose(GObject* object) { static void my_application_class_init(MyApplicationClass* klass) { G_APPLICATION_CLASS(klass)->activate = my_application_activate; G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_APPLICATION_CLASS(klass)->startup = my_application_startup; + G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; G_OBJECT_CLASS(klass)->dispose = my_application_dispose; } diff --git a/frb_example/flutter_via_integrate/macos/Runner.xcodeproj/project.pbxproj b/frb_example/flutter_via_integrate/macos/Runner.xcodeproj/project.pbxproj index 943ae3854d..ead091e386 100644 --- a/frb_example/flutter_via_integrate/macos/Runner.xcodeproj/project.pbxproj +++ b/frb_example/flutter_via_integrate/macos/Runner.xcodeproj/project.pbxproj @@ -226,8 +226,9 @@ 33CC10E52044A3C60003C045 /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C80D4294CF70F00263BE5 = { @@ -424,6 +425,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -447,9 +449,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -497,6 +501,7 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -520,9 +525,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -550,6 +557,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -573,9 +581,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/frb_example/flutter_via_integrate/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/frb_example/flutter_via_integrate/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 17041f70f3..d1c45fe765 100644 --- a/frb_example/flutter_via_integrate/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/frb_example/flutter_via_integrate/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Date: Wed, 6 Mar 2024 14:41:36 +0800 Subject: [PATCH 30/50] fix: err --- .../library/codegen/generator/api_dart/text_generator.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs index a325538fe9..c89d18baab 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs @@ -24,7 +24,7 @@ pub(super) fn generate( .map(|(namespace, item)| { let dart_output_path = compute_path_from_namespace(&config.dart_decl_base_output_path, namespace); - let text = generate_end_api_text(namespace, &dart_output_path, item); + let text = generate_end_api_text(namespace, &dart_output_path, item)?; PathText::new(dart_output_path, text) }) .collect_vec(), @@ -39,7 +39,7 @@ fn generate_end_api_text( namespace: &Namespace, dart_output_path: &Path, item: &ApiDartOutputSpecItem, -) -> String { +) -> anyhow::Result { let funcs = item .funcs .iter() @@ -103,7 +103,7 @@ fn generate_end_api_text( }) .join(""); - format!( + Ok(format!( " {header} @@ -113,7 +113,7 @@ fn generate_end_api_text( {classes} ", - ) + )) } fn generate_function(func: &ApiDartGeneratedFunction) -> String { From a7f1b1800e1d1d7c9a87e6ad59062dd6817b6319 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:42:02 +0800 Subject: [PATCH 31/50] fix: more --- .../src/library/codegen/generator/api_dart/text_generator.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs index c89d18baab..dca717eaaf 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/text_generator.rs @@ -25,9 +25,9 @@ pub(super) fn generate( let dart_output_path = compute_path_from_namespace(&config.dart_decl_base_output_path, namespace); let text = generate_end_api_text(namespace, &dart_output_path, item)?; - PathText::new(dart_output_path, text) + Ok(PathText::new(dart_output_path, text)) }) - .collect_vec(), + .collect::>>()?, ); Ok(ApiDartOutputText { From f385441346403f7c1b370bc7b87f4b41ff2df214 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:46:42 +0800 Subject: [PATCH 32/50] feat: reproduce --- frb_example/pure_dart/rust/src/api/rust_auto_opaque.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frb_example/pure_dart/rust/src/api/rust_auto_opaque.rs b/frb_example/pure_dart/rust/src/api/rust_auto_opaque.rs index 714cf73a51..0c9cd20a44 100644 --- a/frb_example/pure_dart/rust/src/api/rust_auto_opaque.rs +++ b/frb_example/pure_dart/rust/src/api/rust_auto_opaque.rs @@ -222,6 +222,8 @@ impl NonCloneSimpleTwinNormal { pub struct StructWithGoodAndOpaqueFieldTwinNormal { pub good: String, pub opaque: NonCloneSimpleTwinNormal, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_normal( @@ -229,6 +231,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_normal( ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_normal( @@ -236,6 +239,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_normal StructWithGoodAndOpaqueFieldTwinNormal { good: "hello".to_string(), opaque: NonCloneSimpleTwinNormal { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinNormal { inner: 42 }), } } From f5fc1e50a8db94fa4960154f04bceec87e13d708 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:48:45 +0800 Subject: [PATCH 33/50] chore: codegen --- .../rust/src/api/pseudo_manual/rust_auto_opaque_twin_moi.rs | 4 ++++ .../src/api/pseudo_manual/rust_auto_opaque_twin_rust_async.rs | 4 ++++ .../api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.rs | 4 ++++ .../api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.rs | 4 ++++ .../pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.rs | 4 ++++ .../rust/src/api/pseudo_manual/rust_auto_opaque_twin_sse.rs | 4 ++++ .../src/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.rs | 4 ++++ .../rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync.rs | 4 ++++ .../src/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.rs | 4 ++++ .../src/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.rs | 4 ++++ .../api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.rs | 4 ++++ .../src/api/pseudo_manual/rust_auto_opaque_twin_rust_async.rs | 4 ++++ .../rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync.rs | 4 ++++ frb_example/pure_dart_pde/rust/src/api/rust_auto_opaque.rs | 4 ++++ 14 files changed, 56 insertions(+) diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_moi.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_moi.rs index 2e2005684a..a3efa81f57 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_moi.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_moi.rs @@ -250,6 +250,8 @@ impl NonCloneSimpleTwinMoi { pub struct StructWithGoodAndOpaqueFieldTwinMoi { pub good: String, pub opaque: NonCloneSimpleTwinMoi, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -258,6 +260,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_moi( ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -266,6 +269,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_moi( StructWithGoodAndOpaqueFieldTwinMoi { good: "hello".to_string(), opaque: NonCloneSimpleTwinMoi { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinMoi { inner: 42 }), } } diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async.rs index 9f3695c4e7..cc7adbe7c9 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async.rs @@ -246,6 +246,8 @@ impl NonCloneSimpleTwinRustAsync { pub struct StructWithGoodAndOpaqueFieldTwinRustAsync { pub good: String, pub opaque: NonCloneSimpleTwinRustAsync, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_rust_async( @@ -253,6 +255,7 @@ pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_rus ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_rust_async( @@ -260,6 +263,7 @@ pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_ StructWithGoodAndOpaqueFieldTwinRustAsync { good: "hello".to_string(), opaque: NonCloneSimpleTwinRustAsync { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinRustAsync { inner: 42 }), } } diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.rs index 45254d5b16..5d001191f3 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.rs @@ -279,6 +279,8 @@ impl NonCloneSimpleTwinRustAsyncMoi { pub struct StructWithGoodAndOpaqueFieldTwinRustAsyncMoi { pub good: String, pub opaque: NonCloneSimpleTwinRustAsyncMoi, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -287,6 +289,7 @@ pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_rus ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -295,6 +298,7 @@ pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_ StructWithGoodAndOpaqueFieldTwinRustAsyncMoi { good: "hello".to_string(), opaque: NonCloneSimpleTwinRustAsyncMoi { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinRustAsyncMoi { inner: 42 }), } } diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.rs index 4338fa6831..21162b0e53 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.rs @@ -279,6 +279,8 @@ impl NonCloneSimpleTwinRustAsyncSse { pub struct StructWithGoodAndOpaqueFieldTwinRustAsyncSse { pub good: String, pub opaque: NonCloneSimpleTwinRustAsyncSse, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } #[flutter_rust_bridge::frb(serialize)] @@ -287,6 +289,7 @@ pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_rus ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } #[flutter_rust_bridge::frb(serialize)] @@ -295,6 +298,7 @@ pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_ StructWithGoodAndOpaqueFieldTwinRustAsyncSse { good: "hello".to_string(), opaque: NonCloneSimpleTwinRustAsyncSse { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinRustAsyncSse { inner: 42 }), } } diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.rs index d8b5484138..68886e3e27 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.rs @@ -310,6 +310,8 @@ impl NonCloneSimpleTwinRustAsyncSseMoi { pub struct StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi { pub good: String, pub opaque: NonCloneSimpleTwinRustAsyncSseMoi, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -319,6 +321,7 @@ pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_rus ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -328,6 +331,7 @@ pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_ StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi { good: "hello".to_string(), opaque: NonCloneSimpleTwinRustAsyncSseMoi { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinRustAsyncSseMoi { inner: 42 }), } } diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sse.rs index b416d75430..ae415355a7 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sse.rs @@ -250,6 +250,8 @@ impl NonCloneSimpleTwinSse { pub struct StructWithGoodAndOpaqueFieldTwinSse { pub good: String, pub opaque: NonCloneSimpleTwinSse, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } #[flutter_rust_bridge::frb(serialize)] @@ -258,6 +260,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_sse( ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } #[flutter_rust_bridge::frb(serialize)] @@ -266,6 +269,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_sse( StructWithGoodAndOpaqueFieldTwinSse { good: "hello".to_string(), opaque: NonCloneSimpleTwinSse { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinSse { inner: 42 }), } } diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.rs index 5d18c3c56f..920f888520 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.rs @@ -287,6 +287,8 @@ impl NonCloneSimpleTwinSseMoi { pub struct StructWithGoodAndOpaqueFieldTwinSseMoi { pub good: String, pub opaque: NonCloneSimpleTwinSseMoi, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -296,6 +298,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_sse_moi( ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -305,6 +308,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_sse_mo StructWithGoodAndOpaqueFieldTwinSseMoi { good: "hello".to_string(), opaque: NonCloneSimpleTwinSseMoi { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinSseMoi { inner: 42 }), } } diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync.rs index a3be8fe395..6443718400 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync.rs @@ -250,6 +250,8 @@ impl NonCloneSimpleTwinSync { pub struct StructWithGoodAndOpaqueFieldTwinSync { pub good: String, pub opaque: NonCloneSimpleTwinSync, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } #[flutter_rust_bridge::frb(sync)] @@ -258,6 +260,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_sync( ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } #[flutter_rust_bridge::frb(sync)] @@ -266,6 +269,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_sync( StructWithGoodAndOpaqueFieldTwinSync { good: "hello".to_string(), opaque: NonCloneSimpleTwinSync { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinSync { inner: 42 }), } } diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.rs index c409192f23..e8a5df4d49 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.rs @@ -292,6 +292,8 @@ impl NonCloneSimpleTwinSyncMoi { pub struct StructWithGoodAndOpaqueFieldTwinSyncMoi { pub good: String, pub opaque: NonCloneSimpleTwinSyncMoi, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -301,6 +303,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_sync_moi( ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -310,6 +313,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_sync_m StructWithGoodAndOpaqueFieldTwinSyncMoi { good: "hello".to_string(), opaque: NonCloneSimpleTwinSyncMoi { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinSyncMoi { inner: 42 }), } } diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.rs index 2350801e40..a9cf6d1c60 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.rs @@ -292,6 +292,8 @@ impl NonCloneSimpleTwinSyncSse { pub struct StructWithGoodAndOpaqueFieldTwinSyncSse { pub good: String, pub opaque: NonCloneSimpleTwinSyncSse, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } #[flutter_rust_bridge::frb(serialize)] @@ -301,6 +303,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_sync_sse( ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } #[flutter_rust_bridge::frb(serialize)] @@ -310,6 +313,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_sync_s StructWithGoodAndOpaqueFieldTwinSyncSse { good: "hello".to_string(), opaque: NonCloneSimpleTwinSyncSse { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinSyncSse { inner: 42 }), } } diff --git a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.rs b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.rs index cd0fcad1eb..3064b375d0 100644 --- a/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.rs +++ b/frb_example/pure_dart/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.rs @@ -323,6 +323,8 @@ impl NonCloneSimpleTwinSyncSseMoi { pub struct StructWithGoodAndOpaqueFieldTwinSyncSseMoi { pub good: String, pub opaque: NonCloneSimpleTwinSyncSseMoi, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -333,6 +335,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_sync_sse_ ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } #[flutter_rust_bridge::frb(rust_opaque_codec_moi)] @@ -343,6 +346,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_sync_s StructWithGoodAndOpaqueFieldTwinSyncSseMoi { good: "hello".to_string(), opaque: NonCloneSimpleTwinSyncSseMoi { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinSyncSseMoi { inner: 42 }), } } diff --git a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async.rs b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async.rs index 035e0109f0..93faa05160 100644 --- a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async.rs +++ b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/rust_auto_opaque_twin_rust_async.rs @@ -248,6 +248,8 @@ impl NonCloneSimpleTwinRustAsync { pub struct StructWithGoodAndOpaqueFieldTwinRustAsync { pub good: String, pub opaque: NonCloneSimpleTwinRustAsync, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_rust_async( @@ -255,6 +257,7 @@ pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_rus ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_rust_async( @@ -262,6 +265,7 @@ pub async fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_ StructWithGoodAndOpaqueFieldTwinRustAsync { good: "hello".to_string(), opaque: NonCloneSimpleTwinRustAsync { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinRustAsync { inner: 42 }), } } diff --git a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync.rs b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync.rs index 26328e77cd..1893324154 100644 --- a/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync.rs +++ b/frb_example/pure_dart_pde/rust/src/api/pseudo_manual/rust_auto_opaque_twin_sync.rs @@ -252,6 +252,8 @@ impl NonCloneSimpleTwinSync { pub struct StructWithGoodAndOpaqueFieldTwinSync { pub good: String, pub opaque: NonCloneSimpleTwinSync, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } #[flutter_rust_bridge::frb(sync)] @@ -260,6 +262,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_sync( ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } #[flutter_rust_bridge::frb(sync)] @@ -268,6 +271,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_sync( StructWithGoodAndOpaqueFieldTwinSync { good: "hello".to_string(), opaque: NonCloneSimpleTwinSync { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinSync { inner: 42 }), } } diff --git a/frb_example/pure_dart_pde/rust/src/api/rust_auto_opaque.rs b/frb_example/pure_dart_pde/rust/src/api/rust_auto_opaque.rs index 55554822b9..b915653387 100644 --- a/frb_example/pure_dart_pde/rust/src/api/rust_auto_opaque.rs +++ b/frb_example/pure_dart_pde/rust/src/api/rust_auto_opaque.rs @@ -224,6 +224,8 @@ impl NonCloneSimpleTwinNormal { pub struct StructWithGoodAndOpaqueFieldTwinNormal { pub good: String, pub opaque: NonCloneSimpleTwinNormal, + // Reproduce https://github.com/fzyzcjy/flutter_rust_bridge/issues/1792#issuecomment-1972804379 + pub option_opaque: Option, } pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_normal( @@ -231,6 +233,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_arg_own_twin_normal( ) { assert_eq!(&arg.good, "hello"); assert_eq!(arg.opaque.inner, 42); + assert_eq!(arg.option_opaque.unwrap().inner, 42); } pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_normal( @@ -238,6 +241,7 @@ pub fn rust_auto_opaque_struct_with_good_and_opaque_field_return_own_twin_normal StructWithGoodAndOpaqueFieldTwinNormal { good: "hello".to_string(), opaque: NonCloneSimpleTwinNormal { inner: 42 }, + option_opaque: Some(NonCloneSimpleTwinNormal { inner: 42 }), } } From b851c8420591b2e987a15d5dae581535bb396e39 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:51:04 +0800 Subject: [PATCH 34/50] chore: more codegen --- frb_example/pure_dart/frb_generated.h | 24 + .../rust_auto_opaque_twin_moi.dart | 7 +- .../rust_auto_opaque_twin_rust_async.dart | 7 +- .../rust_auto_opaque_twin_rust_async_moi.dart | 7 +- .../rust_auto_opaque_twin_rust_async_sse.dart | 7 +- ...t_auto_opaque_twin_rust_async_sse_moi.dart | 7 +- .../rust_auto_opaque_twin_sse.dart | 7 +- .../rust_auto_opaque_twin_sse_moi.dart | 7 +- .../rust_auto_opaque_twin_sync.dart | 7 +- .../rust_auto_opaque_twin_sync_moi.dart | 7 +- .../rust_auto_opaque_twin_sync_sse.dart | 7 +- .../rust_auto_opaque_twin_sync_sse_moi.dart | 7 +- .../lib/src/rust/api/rust_auto_opaque.dart | 7 +- .../pure_dart/lib/src/rust/frb_generated.dart | 936 +++++++++++++++++- .../lib/src/rust/frb_generated.io.dart | 648 ++++++++++++ .../lib/src/rust/frb_generated.web.dart | 504 +++++++++- .../pure_dart/rust/src/frb_generated.io.rs | 100 +- .../pure_dart/rust/src/frb_generated.rs | 345 ++++++- .../pure_dart/rust/src/frb_generated.web.rs | 28 +- .../rust_auto_opaque_twin_rust_async.dart | 7 +- .../rust_auto_opaque_twin_sync.dart | 7 +- .../lib/src/rust/api/rust_auto_opaque.dart | 7 +- .../lib/src/rust/frb_generated.dart | 234 ++++- .../lib/src/rust/frb_generated.io.dart | 90 ++ .../lib/src/rust/frb_generated.web.dart | 90 ++ .../pure_dart_pde/rust/src/frb_generated.rs | 81 +- 26 files changed, 3056 insertions(+), 129 deletions(-) diff --git a/frb_example/pure_dart/frb_generated.h b/frb_example/pure_dart/frb_generated.h index f019cc603f..248141fc64 100644 --- a/frb_example/pure_dart/frb_generated.h +++ b/frb_example/pure_dart/frb_generated.h @@ -1877,6 +1877,7 @@ typedef struct wire_cst_struct_with_explicit_auto_opaque_field_twin_moi { typedef struct wire_cst_struct_with_good_and_opaque_field_twin_moi { struct wire_cst_list_prim_u_8_strict *good; uintptr_t opaque; + uintptr_t *option_opaque; } wire_cst_struct_with_good_and_opaque_field_twin_moi; typedef struct wire_cst_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync { @@ -1910,6 +1911,7 @@ typedef struct wire_cst_struct_with_explicit_auto_opaque_field_twin_rust_async { typedef struct wire_cst_struct_with_good_and_opaque_field_twin_rust_async { struct wire_cst_list_prim_u_8_strict *good; uintptr_t opaque; + uintptr_t *option_opaque; } wire_cst_struct_with_good_and_opaque_field_twin_rust_async; typedef struct wire_cst_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi { @@ -1943,6 +1945,7 @@ typedef struct wire_cst_struct_with_explicit_auto_opaque_field_twin_rust_async_m typedef struct wire_cst_struct_with_good_and_opaque_field_twin_rust_async_moi { struct wire_cst_list_prim_u_8_strict *good; uintptr_t opaque; + uintptr_t *option_opaque; } wire_cst_struct_with_good_and_opaque_field_twin_rust_async_moi; typedef struct wire_cst_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync { @@ -1976,6 +1979,7 @@ typedef struct wire_cst_struct_with_explicit_auto_opaque_field_twin_sync { typedef struct wire_cst_struct_with_good_and_opaque_field_twin_sync { struct wire_cst_list_prim_u_8_strict *good; uintptr_t opaque; + uintptr_t *option_opaque; } wire_cst_struct_with_good_and_opaque_field_twin_sync; typedef struct wire_cst_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi { @@ -2009,6 +2013,7 @@ typedef struct wire_cst_struct_with_explicit_auto_opaque_field_twin_sync_moi { typedef struct wire_cst_struct_with_good_and_opaque_field_twin_sync_moi { struct wire_cst_list_prim_u_8_strict *good; uintptr_t opaque; + uintptr_t *option_opaque; } wire_cst_struct_with_good_and_opaque_field_twin_sync_moi; typedef struct wire_cst_list_RustOpaque_HideDataTwinMoi { @@ -2324,6 +2329,7 @@ typedef struct wire_cst_struct_with_explicit_auto_opaque_field_twin_normal { typedef struct wire_cst_struct_with_good_and_opaque_field_twin_normal { struct wire_cst_list_prim_u_8_strict *good; uintptr_t opaque; + uintptr_t *option_opaque; } wire_cst_struct_with_good_and_opaque_field_twin_normal; typedef struct wire_cst_list_RustOpaque_HideDataTwinNormal { @@ -12565,6 +12571,18 @@ void frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_i32 struct wire_cst_application_env *frbgen_frb_example_pure_dart_cst_new_box_application_env(void); +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi(void); + +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal(void); + +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync(void); + +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi(void); + +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync(void); + +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi(void); + int64_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Chrono_Duration(int64_t value); int64_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Chrono_Naive(int64_t value); @@ -13323,6 +13341,12 @@ struct wire_cst_list_weekdays_twin_sync *frbgen_frb_example_pure_dart_cst_new_li static int64_t dummy_method_to_enforce_bundling(void) { int64_t dummy_var = 0; dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_application_env); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync); + dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_Chrono_Duration); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_Chrono_Naive); dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_Chrono_Utc); diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_moi.dart index 5fb22dbce7..60bd36c20e 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_moi.dart @@ -421,14 +421,16 @@ class StructWithExplicitAutoOpaqueFieldTwinMoi { class StructWithGoodAndOpaqueFieldTwinMoi { final String good; final NonCloneSimpleTwinMoi opaque; + final NonCloneSimpleTwinMoi? optionOpaque; const StructWithGoodAndOpaqueFieldTwinMoi({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -436,5 +438,6 @@ class StructWithGoodAndOpaqueFieldTwinMoi { other is StructWithGoodAndOpaqueFieldTwinMoi && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart index c0baaeab45..98363645bb 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart @@ -429,14 +429,16 @@ class StructWithExplicitAutoOpaqueFieldTwinRustAsync { class StructWithGoodAndOpaqueFieldTwinRustAsync { final String good; final NonCloneSimpleTwinRustAsync opaque; + final NonCloneSimpleTwinRustAsync? optionOpaque; const StructWithGoodAndOpaqueFieldTwinRustAsync({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -444,5 +446,6 @@ class StructWithGoodAndOpaqueFieldTwinRustAsync { other is StructWithGoodAndOpaqueFieldTwinRustAsync && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.dart index c2754e608a..24c89b4ecc 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_moi.dart @@ -439,14 +439,16 @@ class StructWithExplicitAutoOpaqueFieldTwinRustAsyncMoi { class StructWithGoodAndOpaqueFieldTwinRustAsyncMoi { final String good; final NonCloneSimpleTwinRustAsyncMoi opaque; + final NonCloneSimpleTwinRustAsyncMoi? optionOpaque; const StructWithGoodAndOpaqueFieldTwinRustAsyncMoi({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -454,5 +456,6 @@ class StructWithGoodAndOpaqueFieldTwinRustAsyncMoi { other is StructWithGoodAndOpaqueFieldTwinRustAsyncMoi && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.dart index 607c2142d8..253f2f7a61 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse.dart @@ -439,14 +439,16 @@ class StructWithExplicitAutoOpaqueFieldTwinRustAsyncSse { class StructWithGoodAndOpaqueFieldTwinRustAsyncSse { final String good; final NonCloneSimpleTwinRustAsyncSse opaque; + final NonCloneSimpleTwinRustAsyncSse? optionOpaque; const StructWithGoodAndOpaqueFieldTwinRustAsyncSse({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -454,5 +456,6 @@ class StructWithGoodAndOpaqueFieldTwinRustAsyncSse { other is StructWithGoodAndOpaqueFieldTwinRustAsyncSse && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.dart index edd9589e28..7c2e149da5 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async_sse_moi.dart @@ -445,14 +445,16 @@ class StructWithExplicitAutoOpaqueFieldTwinRustAsyncSseMoi { class StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi { final String good; final NonCloneSimpleTwinRustAsyncSseMoi opaque; + final NonCloneSimpleTwinRustAsyncSseMoi? optionOpaque; const StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -460,5 +462,6 @@ class StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi { other is StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse.dart index ff0be1ddb6..aece8228c9 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse.dart @@ -403,14 +403,16 @@ class StructWithExplicitAutoOpaqueFieldTwinSse { class StructWithGoodAndOpaqueFieldTwinSse { final String good; final NonCloneSimpleTwinSse opaque; + final NonCloneSimpleTwinSse? optionOpaque; const StructWithGoodAndOpaqueFieldTwinSse({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -418,5 +420,6 @@ class StructWithGoodAndOpaqueFieldTwinSse { other is StructWithGoodAndOpaqueFieldTwinSse && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.dart index d6121466a8..ce61014cca 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sse_moi.dart @@ -422,14 +422,16 @@ class StructWithExplicitAutoOpaqueFieldTwinSseMoi { class StructWithGoodAndOpaqueFieldTwinSseMoi { final String good; final NonCloneSimpleTwinSseMoi opaque; + final NonCloneSimpleTwinSseMoi? optionOpaque; const StructWithGoodAndOpaqueFieldTwinSseMoi({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -437,5 +439,6 @@ class StructWithGoodAndOpaqueFieldTwinSseMoi { other is StructWithGoodAndOpaqueFieldTwinSseMoi && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart index 2699daddd1..1ee5c483c2 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart @@ -408,14 +408,16 @@ class StructWithExplicitAutoOpaqueFieldTwinSync { class StructWithGoodAndOpaqueFieldTwinSync { final String good; final NonCloneSimpleTwinSync opaque; + final NonCloneSimpleTwinSync? optionOpaque; const StructWithGoodAndOpaqueFieldTwinSync({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -423,5 +425,6 @@ class StructWithGoodAndOpaqueFieldTwinSync { other is StructWithGoodAndOpaqueFieldTwinSync && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.dart index e3ac3da1d6..3d6c36d3c9 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_moi.dart @@ -418,14 +418,16 @@ class StructWithExplicitAutoOpaqueFieldTwinSyncMoi { class StructWithGoodAndOpaqueFieldTwinSyncMoi { final String good; final NonCloneSimpleTwinSyncMoi opaque; + final NonCloneSimpleTwinSyncMoi? optionOpaque; const StructWithGoodAndOpaqueFieldTwinSyncMoi({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -433,5 +435,6 @@ class StructWithGoodAndOpaqueFieldTwinSyncMoi { other is StructWithGoodAndOpaqueFieldTwinSyncMoi && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.dart index c51ec4c14e..35b274968a 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse.dart @@ -418,14 +418,16 @@ class StructWithExplicitAutoOpaqueFieldTwinSyncSse { class StructWithGoodAndOpaqueFieldTwinSyncSse { final String good; final NonCloneSimpleTwinSyncSse opaque; + final NonCloneSimpleTwinSyncSse? optionOpaque; const StructWithGoodAndOpaqueFieldTwinSyncSse({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -433,5 +435,6 @@ class StructWithGoodAndOpaqueFieldTwinSyncSse { other is StructWithGoodAndOpaqueFieldTwinSyncSse && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.dart b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.dart index 30a5e8b931..175b4050da 100644 --- a/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.dart +++ b/frb_example/pure_dart/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync_sse_moi.dart @@ -427,14 +427,16 @@ class StructWithExplicitAutoOpaqueFieldTwinSyncSseMoi { class StructWithGoodAndOpaqueFieldTwinSyncSseMoi { final String good; final NonCloneSimpleTwinSyncSseMoi opaque; + final NonCloneSimpleTwinSyncSseMoi? optionOpaque; const StructWithGoodAndOpaqueFieldTwinSyncSseMoi({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -442,5 +444,6 @@ class StructWithGoodAndOpaqueFieldTwinSyncSseMoi { other is StructWithGoodAndOpaqueFieldTwinSyncSseMoi && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/api/rust_auto_opaque.dart b/frb_example/pure_dart/lib/src/rust/api/rust_auto_opaque.dart index d0da880b60..6a67882af7 100644 --- a/frb_example/pure_dart/lib/src/rust/api/rust_auto_opaque.dart +++ b/frb_example/pure_dart/lib/src/rust/api/rust_auto_opaque.dart @@ -422,14 +422,16 @@ class StructWithExplicitAutoOpaqueFieldTwinNormal { class StructWithGoodAndOpaqueFieldTwinNormal { final String good; final NonCloneSimpleTwinNormal opaque; + final NonCloneSimpleTwinNormal? optionOpaque; const StructWithGoodAndOpaqueFieldTwinNormal({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -437,5 +439,6 @@ class StructWithGoodAndOpaqueFieldTwinNormal { other is StructWithGoodAndOpaqueFieldTwinNormal && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.dart index 44683e2410..131d2bd663 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.dart @@ -80954,6 +80954,102 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return dco_decode_application_env(raw); } + @protected + NonCloneSimpleTwinMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinMoi; + } + + @protected + NonCloneSimpleTwinNormal + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinNormal; + } + + @protected + NonCloneSimpleTwinRustAsync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinRustAsync; + } + + @protected + NonCloneSimpleTwinRustAsyncMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinRustAsyncMoi; + } + + @protected + NonCloneSimpleTwinRustAsyncSse + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinRustAsyncSse; + } + + @protected + NonCloneSimpleTwinRustAsyncSseMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinRustAsyncSseMoi; + } + + @protected + NonCloneSimpleTwinSse + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinSse; + } + + @protected + NonCloneSimpleTwinSseMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinSseMoi; + } + + @protected + NonCloneSimpleTwinSync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinSync; + } + + @protected + NonCloneSimpleTwinSyncMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinSyncMoi; + } + + @protected + NonCloneSimpleTwinSyncSse + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinSyncSse; + } + + @protected + NonCloneSimpleTwinSyncSseMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinSyncSseMoi; + } + @protected Duration dco_decode_box_autoadd_Chrono_Duration(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -90374,6 +90470,138 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return raw == null ? null : dco_decode_String(raw); } + @protected + NonCloneSimpleTwinMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + raw); + } + + @protected + NonCloneSimpleTwinNormal? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + raw); + } + + @protected + NonCloneSimpleTwinRustAsync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + raw); + } + + @protected + NonCloneSimpleTwinRustAsyncMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + raw); + } + + @protected + NonCloneSimpleTwinRustAsyncSse? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + raw); + } + + @protected + NonCloneSimpleTwinRustAsyncSseMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + raw); + } + + @protected + NonCloneSimpleTwinSse? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + raw); + } + + @protected + NonCloneSimpleTwinSseMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + raw); + } + + @protected + NonCloneSimpleTwinSync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + raw); + } + + @protected + NonCloneSimpleTwinSyncMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + raw); + } + + @protected + NonCloneSimpleTwinSyncSse? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + raw); + } + + @protected + NonCloneSimpleTwinSyncSseMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + raw); + } + @protected Duration? dco_decode_opt_box_autoadd_Chrono_Duration(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -93250,13 +93478,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_struct_with_good_and_opaque_field_twin_moi(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinMoi( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + arr[2]), ); } @@ -93265,13 +93496,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_struct_with_good_and_opaque_field_twin_normal(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinNormal( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + arr[2]), ); } @@ -93281,13 +93515,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinRustAsync( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + arr[2]), ); } @@ -93297,13 +93534,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinRustAsyncMoi( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + arr[2]), ); } @@ -93313,13 +93553,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinRustAsyncSse( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + arr[2]), ); } @@ -93329,13 +93572,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + arr[2]), ); } @@ -93344,13 +93590,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_struct_with_good_and_opaque_field_twin_sse(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinSse( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + arr[2]), ); } @@ -93359,13 +93608,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_struct_with_good_and_opaque_field_twin_sse_moi(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinSseMoi( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + arr[2]), ); } @@ -93374,13 +93626,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_struct_with_good_and_opaque_field_twin_sync(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinSync( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + arr[2]), ); } @@ -93389,13 +93644,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_struct_with_good_and_opaque_field_twin_sync_moi(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinSyncMoi( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + arr[2]), ); } @@ -93404,13 +93662,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_struct_with_good_and_opaque_field_twin_sync_sse(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinSyncSse( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + arr[2]), ); } @@ -93420,13 +93681,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinSyncSseMoi( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + arr[2]), ); } @@ -98827,6 +99091,114 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return (sse_decode_application_env(deserializer)); } + @protected + NonCloneSimpleTwinMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + deserializer)); + } + + @protected + NonCloneSimpleTwinNormal + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + deserializer)); + } + + @protected + NonCloneSimpleTwinRustAsync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + deserializer)); + } + + @protected + NonCloneSimpleTwinRustAsyncMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + deserializer)); + } + + @protected + NonCloneSimpleTwinRustAsyncSse + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + deserializer)); + } + + @protected + NonCloneSimpleTwinRustAsyncSseMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + deserializer)); + } + + @protected + NonCloneSimpleTwinSse + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + deserializer)); + } + + @protected + NonCloneSimpleTwinSseMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + deserializer)); + } + + @protected + NonCloneSimpleTwinSync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + deserializer)); + } + + @protected + NonCloneSimpleTwinSyncMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + deserializer)); + } + + @protected + NonCloneSimpleTwinSyncSse + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + deserializer)); + } + + @protected + NonCloneSimpleTwinSyncSseMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + deserializer)); + } + @protected Duration sse_decode_box_autoadd_Chrono_Duration( SseDeserializer deserializer) { @@ -109237,6 +109609,174 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } } + @protected + NonCloneSimpleTwinMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinNormal? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinRustAsync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinRustAsyncMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinRustAsyncSse? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinRustAsyncSseMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinSse? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinSseMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinSync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinSyncMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinSyncSse? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinSyncSseMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + deserializer)); + } else { + return null; + } + } + @protected Duration? sse_decode_opt_box_autoadd_Chrono_Duration( SseDeserializer deserializer) { @@ -112303,8 +112843,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + deserializer); return StructWithGoodAndOpaqueFieldTwinMoi( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -112316,8 +112859,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + deserializer); return StructWithGoodAndOpaqueFieldTwinNormal( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -112329,8 +112875,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + deserializer); return StructWithGoodAndOpaqueFieldTwinRustAsync( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -112342,8 +112891,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + deserializer); return StructWithGoodAndOpaqueFieldTwinRustAsyncMoi( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -112355,8 +112907,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + deserializer); return StructWithGoodAndOpaqueFieldTwinRustAsyncSse( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -112368,8 +112923,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + deserializer); return StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -112381,8 +112939,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + deserializer); return StructWithGoodAndOpaqueFieldTwinSse( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -112394,8 +112955,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + deserializer); return StructWithGoodAndOpaqueFieldTwinSseMoi( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -112407,8 +112971,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + deserializer); return StructWithGoodAndOpaqueFieldTwinSync( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -112420,8 +112987,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + deserializer); return StructWithGoodAndOpaqueFieldTwinSyncMoi( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -112433,8 +113003,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + deserializer); return StructWithGoodAndOpaqueFieldTwinSyncSse( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -112446,8 +113019,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + deserializer); return StructWithGoodAndOpaqueFieldTwinSyncSseMoi( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -118893,6 +119469,114 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_application_env(self, serializer); } + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + NonCloneSimpleTwinMoi self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + NonCloneSimpleTwinRustAsyncMoi self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + NonCloneSimpleTwinRustAsyncSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + NonCloneSimpleTwinRustAsyncSseMoi self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + NonCloneSimpleTwinSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + NonCloneSimpleTwinSseMoi self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + NonCloneSimpleTwinSyncMoi self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + NonCloneSimpleTwinSyncSse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + NonCloneSimpleTwinSyncSseMoi self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + self, serializer); + } + @protected void sse_encode_box_autoadd_Chrono_Duration( Duration self, SseSerializer serializer) { @@ -127726,6 +128410,162 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } } + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + NonCloneSimpleTwinMoi? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + NonCloneSimpleTwinRustAsyncMoi? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + NonCloneSimpleTwinRustAsyncSse? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + NonCloneSimpleTwinRustAsyncSseMoi? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + NonCloneSimpleTwinSse? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + NonCloneSimpleTwinSseMoi? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + NonCloneSimpleTwinSyncMoi? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + NonCloneSimpleTwinSyncSse? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + NonCloneSimpleTwinSyncSseMoi? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + self, serializer); + } + } + @protected void sse_encode_opt_box_autoadd_Chrono_Duration( Duration? self, SseSerializer serializer) { @@ -130312,6 +131152,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + self.optionOpaque, serializer); } @protected @@ -130321,6 +131163,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + self.optionOpaque, serializer); } @protected @@ -130331,6 +131175,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + self.optionOpaque, serializer); } @protected @@ -130341,6 +131187,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + self.optionOpaque, serializer); } @protected @@ -130351,6 +131199,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + self.optionOpaque, serializer); } @protected @@ -130361,6 +131211,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + self.optionOpaque, serializer); } @protected @@ -130370,6 +131222,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + self.optionOpaque, serializer); } @protected @@ -130379,6 +131233,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + self.optionOpaque, serializer); } @protected @@ -130388,6 +131244,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + self.optionOpaque, serializer); } @protected @@ -130397,6 +131255,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + self.optionOpaque, serializer); } @protected @@ -130406,6 +131266,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + self.optionOpaque, serializer); } @protected @@ -130416,6 +131278,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + self.optionOpaque, serializer); } @protected diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart index e085ff6369..7fee8d12d1 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart @@ -2997,6 +2997,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ApplicationEnv dco_decode_box_application_env(dynamic raw); + @protected + NonCloneSimpleTwinMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinNormal + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncSse + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncSseMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSse + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + dynamic raw); + + @protected + NonCloneSimpleTwinSseMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncSse + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncSseMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + dynamic raw); + @protected Duration dco_decode_box_autoadd_Chrono_Duration(dynamic raw); @@ -6590,6 +6650,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected String? dco_decode_opt_String(dynamic raw); + @protected + NonCloneSimpleTwinMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinNormal? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncSse? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncSseMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSse? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + dynamic raw); + + @protected + NonCloneSimpleTwinSseMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncSse? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncSseMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + dynamic raw); + @protected Duration? dco_decode_opt_box_autoadd_Chrono_Duration(dynamic raw); @@ -10133,6 +10253,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ApplicationEnv sse_decode_box_application_env(SseDeserializer deserializer); + @protected + NonCloneSimpleTwinMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinNormal + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncSse + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncSseMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSse + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSseMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncSse + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncSseMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + SseDeserializer deserializer); + @protected Duration sse_decode_box_autoadd_Chrono_Duration(SseDeserializer deserializer); @@ -14243,6 +14423,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected String? sse_decode_opt_String(SseDeserializer deserializer); + @protected + NonCloneSimpleTwinMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinNormal? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncSse? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncSseMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSse? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSseMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncSse? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncSseMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + SseDeserializer deserializer); + @protected Duration? sse_decode_opt_box_autoadd_Chrono_Duration( SseDeserializer deserializer); @@ -16254,6 +16494,78 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return ptr; } + @protected + ffi.Pointer + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + NonCloneSimpleTwinMoi raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi(); + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal(); + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync(); + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + NonCloneSimpleTwinRustAsyncMoi raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi(); + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync(); + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + NonCloneSimpleTwinSyncMoi raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi(); + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + raw, ptr.ref); + return ptr; + } + @protected ffi.Pointer cst_encode_box_autoadd_Chrono_Duration(Duration raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -20187,6 +20499,72 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return raw == null ? ffi.nullptr : cst_encode_String(raw); } + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + NonCloneSimpleTwinMoi? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + raw); + } + + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + raw); + } + + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + raw); + } + + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + NonCloneSimpleTwinRustAsyncMoi? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + raw); + } + + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + raw); + } + + @protected + ffi.Pointer + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + NonCloneSimpleTwinSyncMoi? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? ffi.nullptr + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + raw); + } + @protected ffi.Pointer cst_encode_opt_box_autoadd_Chrono_Duration( Duration? raw) { @@ -21388,6 +21766,54 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { cst_api_fill_to_wire_application_env(apiObj, wireObj.ref); } + @protected + void + cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + NonCloneSimpleTwinMoi apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + apiObj, wireObj.ref); + } + + @protected + void + cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + apiObj, wireObj.ref); + } + + @protected + void + cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + apiObj, wireObj.ref); + } + + @protected + void + cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + NonCloneSimpleTwinRustAsyncMoi apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + apiObj, wireObj.ref); + } + + @protected + void + cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + apiObj, wireObj.ref); + } + + @protected + void + cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + NonCloneSimpleTwinSyncMoi apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + apiObj, wireObj.ref); + } + @protected void cst_api_fill_to_wire_box_autoadd_a_twin_normal( ATwinNormal apiObj, ffi.Pointer wireObj) { @@ -25496,6 +25922,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wireObj.opaque = cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( apiObj.opaque); + wireObj.option_opaque = + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + apiObj.optionOpaque); } @protected @@ -25506,6 +25935,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wireObj.opaque = cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( apiObj.opaque); + wireObj.option_opaque = + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + apiObj.optionOpaque); } @protected @@ -25516,6 +25948,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wireObj.opaque = cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( apiObj.opaque); + wireObj.option_opaque = + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + apiObj.optionOpaque); } @protected @@ -25528,6 +25963,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wireObj.opaque = cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( apiObj.opaque); + wireObj.option_opaque = + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + apiObj.optionOpaque); } @protected @@ -25538,6 +25976,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wireObj.opaque = cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( apiObj.opaque); + wireObj.option_opaque = + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + apiObj.optionOpaque); } @protected @@ -25548,6 +25989,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { wireObj.opaque = cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( apiObj.opaque); + wireObj.option_opaque = + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + apiObj.optionOpaque); } @protected @@ -28766,6 +29210,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_application_env( ApplicationEnv self, SseSerializer serializer); + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + NonCloneSimpleTwinMoi self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + NonCloneSimpleTwinRustAsyncMoi self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + NonCloneSimpleTwinRustAsyncSse self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + NonCloneSimpleTwinRustAsyncSseMoi self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + NonCloneSimpleTwinSse self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + NonCloneSimpleTwinSseMoi self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + NonCloneSimpleTwinSyncMoi self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + NonCloneSimpleTwinSyncSse self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + NonCloneSimpleTwinSyncSseMoi self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_Chrono_Duration( Duration self, SseSerializer serializer); @@ -32665,6 +33169,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_opt_String(String? self, SseSerializer serializer); + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + NonCloneSimpleTwinMoi? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + NonCloneSimpleTwinRustAsyncMoi? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + NonCloneSimpleTwinRustAsyncSse? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + NonCloneSimpleTwinRustAsyncSseMoi? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + NonCloneSimpleTwinSse? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + NonCloneSimpleTwinSseMoi? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + NonCloneSimpleTwinSyncMoi? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + NonCloneSimpleTwinSyncSse? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + NonCloneSimpleTwinSyncSseMoi? self, SseSerializer serializer); + @protected void sse_encode_opt_box_autoadd_Chrono_Duration( Duration? self, SseSerializer serializer); @@ -87910,6 +88474,78 @@ class RustLibWire implements BaseWire { late final _cst_new_box_application_env = _cst_new_box_application_envPtr .asFunction Function()>(); + ffi.Pointer + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi() { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi(); + } + + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoiPtr = + _lookup Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi'); + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi = + _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoiPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal() { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal(); + } + + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormalPtr = + _lookup Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal'); + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal = + _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormalPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync() { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync(); + } + + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncPtr = + _lookup Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync'); + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync = + _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi() { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi(); + } + + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoiPtr = + _lookup Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi'); + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi = + _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoiPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync() { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync(); + } + + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncPtr = + _lookup Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync'); + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync = + _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi() { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi(); + } + + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoiPtr = + _lookup Function()>>( + 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi'); + late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi = + _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoiPtr + .asFunction Function()>(); + ffi.Pointer cst_new_box_autoadd_Chrono_Duration( int value, ) { @@ -96146,6 +96782,8 @@ final class wire_cst_struct_with_good_and_opaque_field_twin_moi @ffi.UintPtr() external int opaque; + + external ffi.Pointer option_opaque; } final class wire_cst_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync @@ -96196,6 +96834,8 @@ final class wire_cst_struct_with_good_and_opaque_field_twin_rust_async @ffi.UintPtr() external int opaque; + + external ffi.Pointer option_opaque; } final class wire_cst_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi @@ -96246,6 +96886,8 @@ final class wire_cst_struct_with_good_and_opaque_field_twin_rust_async_moi @ffi.UintPtr() external int opaque; + + external ffi.Pointer option_opaque; } final class wire_cst_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync @@ -96293,6 +96935,8 @@ final class wire_cst_struct_with_good_and_opaque_field_twin_sync @ffi.UintPtr() external int opaque; + + external ffi.Pointer option_opaque; } final class wire_cst_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi @@ -96342,6 +96986,8 @@ final class wire_cst_struct_with_good_and_opaque_field_twin_sync_moi @ffi.UintPtr() external int opaque; + + external ffi.Pointer option_opaque; } final class wire_cst_list_RustOpaque_HideDataTwinMoi extends ffi.Struct { @@ -96773,6 +97419,8 @@ final class wire_cst_struct_with_good_and_opaque_field_twin_normal @ffi.UintPtr() external int opaque; + + external ffi.Pointer option_opaque; } final class wire_cst_list_RustOpaque_HideDataTwinNormal extends ffi.Struct { diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.web.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.web.dart index 013398cf74..714b38d973 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.web.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.web.dart @@ -2996,6 +2996,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ApplicationEnv dco_decode_box_application_env(dynamic raw); + @protected + NonCloneSimpleTwinMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinNormal + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncSse + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncSseMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSse + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + dynamic raw); + + @protected + NonCloneSimpleTwinSseMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncSse + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncSseMoi + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + dynamic raw); + @protected Duration dco_decode_box_autoadd_Chrono_Duration(dynamic raw); @@ -6589,6 +6649,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected String? dco_decode_opt_String(dynamic raw); + @protected + NonCloneSimpleTwinMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinNormal? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncSse? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsyncSseMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSse? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + dynamic raw); + + @protected + NonCloneSimpleTwinSseMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncSse? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + dynamic raw); + + @protected + NonCloneSimpleTwinSyncSseMoi? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + dynamic raw); + @protected Duration? dco_decode_opt_box_autoadd_Chrono_Duration(dynamic raw); @@ -10132,6 +10252,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ApplicationEnv sse_decode_box_application_env(SseDeserializer deserializer); + @protected + NonCloneSimpleTwinMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinNormal + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncSse + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncSseMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSse + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSseMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncSse + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncSseMoi + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + SseDeserializer deserializer); + @protected Duration sse_decode_box_autoadd_Chrono_Duration(SseDeserializer deserializer); @@ -14242,6 +14422,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected String? sse_decode_opt_String(SseDeserializer deserializer); + @protected + NonCloneSimpleTwinMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinNormal? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncSse? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsyncSseMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSse? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSseMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncSse? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSyncSseMoi? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + SseDeserializer deserializer); + @protected Duration? sse_decode_opt_box_autoadd_Chrono_Duration( SseDeserializer deserializer); @@ -16569,6 +16809,60 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return cst_encode_application_env(raw); } + @protected + Object + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + NonCloneSimpleTwinMoi raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + raw); + } + + @protected + Object + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + raw); + } + + @protected + Object + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + raw); + } + + @protected + Object + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + NonCloneSimpleTwinRustAsyncMoi raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + raw); + } + + @protected + Object + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + raw); + } + + @protected + Object + cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + NonCloneSimpleTwinSyncMoi raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + raw); + } + @protected Object cst_encode_box_autoadd_Chrono_Duration(Duration raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -20963,6 +21257,72 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return raw == null ? null : cst_encode_String(raw); } + @protected + Object? + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + NonCloneSimpleTwinMoi? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? null + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + raw); + } + + @protected + Object? + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? null + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + raw); + } + + @protected + Object? + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? null + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + raw); + } + + @protected + Object? + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + NonCloneSimpleTwinRustAsyncMoi? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? null + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + raw); + } + + @protected + Object? + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? null + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + raw); + } + + @protected + Object? + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + NonCloneSimpleTwinSyncMoi? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null + ? null + : cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + raw); + } + @protected Object? cst_encode_opt_box_autoadd_Chrono_Duration(Duration? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -22265,7 +22625,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return [ cst_encode_String(raw.good), cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( - raw.opaque) + raw.opaque), + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + raw.optionOpaque) ]; } @@ -22276,7 +22638,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return [ cst_encode_String(raw.good), cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( - raw.opaque) + raw.opaque), + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + raw.optionOpaque) ]; } @@ -22287,7 +22651,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return [ cst_encode_String(raw.good), cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( - raw.opaque) + raw.opaque), + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + raw.optionOpaque) ]; } @@ -22299,7 +22665,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return [ cst_encode_String(raw.good), cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( - raw.opaque) + raw.opaque), + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + raw.optionOpaque) ]; } @@ -22310,7 +22678,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return [ cst_encode_String(raw.good), cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( - raw.opaque) + raw.opaque), + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + raw.optionOpaque) ]; } @@ -22321,7 +22691,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { return [ cst_encode_String(raw.good), cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( - raw.opaque) + raw.opaque), + cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + raw.optionOpaque) ]; } @@ -25650,6 +26022,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_application_env( ApplicationEnv self, SseSerializer serializer); + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + NonCloneSimpleTwinMoi self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + NonCloneSimpleTwinRustAsyncMoi self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + NonCloneSimpleTwinRustAsyncSse self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + NonCloneSimpleTwinRustAsyncSseMoi self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + NonCloneSimpleTwinSse self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + NonCloneSimpleTwinSseMoi self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + NonCloneSimpleTwinSyncMoi self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + NonCloneSimpleTwinSyncSse self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + NonCloneSimpleTwinSyncSseMoi self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_Chrono_Duration( Duration self, SseSerializer serializer); @@ -29549,6 +29981,66 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_opt_String(String? self, SseSerializer serializer); + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + NonCloneSimpleTwinMoi? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + NonCloneSimpleTwinRustAsyncMoi? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + NonCloneSimpleTwinRustAsyncSse? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + NonCloneSimpleTwinRustAsyncSseMoi? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + NonCloneSimpleTwinSse? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + NonCloneSimpleTwinSseMoi? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + NonCloneSimpleTwinSyncMoi? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + NonCloneSimpleTwinSyncSse? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + NonCloneSimpleTwinSyncSseMoi? self, SseSerializer serializer); + @protected void sse_encode_opt_box_autoadd_Chrono_Duration( Duration? self, SseSerializer serializer); diff --git a/frb_example/pure_dart/rust/src/frb_generated.io.rs b/frb_example/pure_dart/rust/src/frb_generated.io.rs index d990622114..12fc0e9764 100644 --- a/frb_example/pure_dart/rust/src/frb_generated.io.rs +++ b/frb_example/pure_dart/rust/src/frb_generated.io.rs @@ -2561,6 +2561,48 @@ impl CstDecode for *mut usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> NonCloneSimpleTwinMoi { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> NonCloneSimpleTwinNormal { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> NonCloneSimpleTwinRustAsync { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> NonCloneSimpleTwinRustAsyncMoi { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> NonCloneSimpleTwinSync { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> NonCloneSimpleTwinSyncMoi { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} impl CstDecode for *mut i64 { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> chrono::Duration { @@ -9840,6 +9882,7 @@ impl crate::api::pseudo_manual::rust_auto_opaque_twin_moi::StructWithGoodAndOpaqueFieldTwinMoi { good: self.good.cst_decode(), opaque: self.opaque.cst_decode(), + option_opaque: self.option_opaque.cst_decode(), } } } @@ -9851,19 +9894,20 @@ impl CstDecode for wire_cst_struct_with_good_and_opaque_field_twin_rust_async { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync { - crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync{good: self.good.cst_decode(),opaque: self.opaque.cst_decode()} + crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync{good: self.good.cst_decode(),opaque: self.opaque.cst_decode(),option_opaque: self.option_opaque.cst_decode()} } } impl CstDecode for wire_cst_struct_with_good_and_opaque_field_twin_rust_async_moi { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncMoi { - crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncMoi{good: self.good.cst_decode(),opaque: self.opaque.cst_decode()} + crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncMoi{good: self.good.cst_decode(),opaque: self.opaque.cst_decode(),option_opaque: self.option_opaque.cst_decode()} } } impl @@ -9876,13 +9920,13 @@ impl self, ) -> crate::api::pseudo_manual::rust_auto_opaque_twin_sync::StructWithGoodAndOpaqueFieldTwinSync { - crate::api::pseudo_manual::rust_auto_opaque_twin_sync::StructWithGoodAndOpaqueFieldTwinSync{good: self.good.cst_decode(),opaque: self.opaque.cst_decode()} + crate::api::pseudo_manual::rust_auto_opaque_twin_sync::StructWithGoodAndOpaqueFieldTwinSync{good: self.good.cst_decode(),opaque: self.opaque.cst_decode(),option_opaque: self.option_opaque.cst_decode()} } } impl CstDecode for wire_cst_struct_with_good_and_opaque_field_twin_sync_moi { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::api::pseudo_manual::rust_auto_opaque_twin_sync_moi::StructWithGoodAndOpaqueFieldTwinSyncMoi { - crate::api::pseudo_manual::rust_auto_opaque_twin_sync_moi::StructWithGoodAndOpaqueFieldTwinSyncMoi{good: self.good.cst_decode(),opaque: self.opaque.cst_decode()} + crate::api::pseudo_manual::rust_auto_opaque_twin_sync_moi::StructWithGoodAndOpaqueFieldTwinSyncMoi{good: self.good.cst_decode(),opaque: self.opaque.cst_decode(),option_opaque: self.option_opaque.cst_decode()} } } impl CstDecode @@ -13748,6 +13792,7 @@ impl NewWithNullPtr for wire_cst_struct_with_good_and_opaque_field_twin_moi { Self { good: core::ptr::null_mut(), opaque: Default::default(), + option_opaque: core::ptr::null_mut(), } } } @@ -13761,6 +13806,7 @@ impl NewWithNullPtr for wire_cst_struct_with_good_and_opaque_field_twin_normal { Self { good: core::ptr::null_mut(), opaque: Default::default(), + option_opaque: core::ptr::null_mut(), } } } @@ -13774,6 +13820,7 @@ impl NewWithNullPtr for wire_cst_struct_with_good_and_opaque_field_twin_rust_asy Self { good: core::ptr::null_mut(), opaque: Default::default(), + option_opaque: core::ptr::null_mut(), } } } @@ -13787,6 +13834,7 @@ impl NewWithNullPtr for wire_cst_struct_with_good_and_opaque_field_twin_rust_asy Self { good: core::ptr::null_mut(), opaque: Default::default(), + option_opaque: core::ptr::null_mut(), } } } @@ -13800,6 +13848,7 @@ impl NewWithNullPtr for wire_cst_struct_with_good_and_opaque_field_twin_sync { Self { good: core::ptr::null_mut(), opaque: Default::default(), + option_opaque: core::ptr::null_mut(), } } } @@ -13813,6 +13862,7 @@ impl NewWithNullPtr for wire_cst_struct_with_good_and_opaque_field_twin_sync_moi Self { good: core::ptr::null_mut(), opaque: Default::default(), + option_opaque: core::ptr::null_mut(), } } } @@ -39299,6 +39349,42 @@ pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_application_env( ) } +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( +) -> *mut usize { + flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( +) -> *mut usize { + flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( +) -> *mut usize { + flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( +) -> *mut usize { + flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( +) -> *mut usize { + flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( +) -> *mut usize { + flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) +} + #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Chrono_Duration( value: i64, @@ -46370,36 +46456,42 @@ pub struct wire_cst_struct_with_explicit_auto_opaque_field_twin_sync_moi { pub struct wire_cst_struct_with_good_and_opaque_field_twin_moi { good: *mut wire_cst_list_prim_u_8_strict, opaque: usize, + option_opaque: *mut usize, } #[repr(C)] #[derive(Clone, Copy)] pub struct wire_cst_struct_with_good_and_opaque_field_twin_normal { good: *mut wire_cst_list_prim_u_8_strict, opaque: usize, + option_opaque: *mut usize, } #[repr(C)] #[derive(Clone, Copy)] pub struct wire_cst_struct_with_good_and_opaque_field_twin_rust_async { good: *mut wire_cst_list_prim_u_8_strict, opaque: usize, + option_opaque: *mut usize, } #[repr(C)] #[derive(Clone, Copy)] pub struct wire_cst_struct_with_good_and_opaque_field_twin_rust_async_moi { good: *mut wire_cst_list_prim_u_8_strict, opaque: usize, + option_opaque: *mut usize, } #[repr(C)] #[derive(Clone, Copy)] pub struct wire_cst_struct_with_good_and_opaque_field_twin_sync { good: *mut wire_cst_list_prim_u_8_strict, opaque: usize, + option_opaque: *mut usize, } #[repr(C)] #[derive(Clone, Copy)] pub struct wire_cst_struct_with_good_and_opaque_field_twin_sync_moi { good: *mut wire_cst_list_prim_u_8_strict, opaque: usize, + option_opaque: *mut usize, } #[repr(C)] #[derive(Clone, Copy)] diff --git a/frb_example/pure_dart/rust/src/frb_generated.rs b/frb_example/pure_dart/rust/src/frb_generated.rs index 30192c1211..6d5392cdbe 100644 --- a/frb_example/pure_dart/rust/src/frb_generated.rs +++ b/frb_example/pure_dart/rust/src/frb_generated.rs @@ -50021,6 +50021,140 @@ impl SseDecode for Option { } } +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode( + deserializer, + )); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + impl SseDecode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -53320,7 +53454,8 @@ impl SseDecode fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); - return crate::api::pseudo_manual::rust_auto_opaque_twin_moi::StructWithGoodAndOpaqueFieldTwinMoi{good: var_good, opaque: var_opaque}; + let mut var_optionOpaque = >::sse_decode(deserializer); + return crate::api::pseudo_manual::rust_auto_opaque_twin_moi::StructWithGoodAndOpaqueFieldTwinMoi{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque}; } } @@ -53329,9 +53464,11 @@ impl SseDecode for crate::api::rust_auto_opaque::StructWithGoodAndOpaqueFieldTwi fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); + let mut var_optionOpaque = >::sse_decode(deserializer); return crate::api::rust_auto_opaque::StructWithGoodAndOpaqueFieldTwinNormal { good: var_good, opaque: var_opaque, + option_opaque: var_optionOpaque, }; } } @@ -53340,28 +53477,32 @@ impl SseDecode for crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async:: // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); -return crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync{good: var_good, opaque: var_opaque};} +let mut var_optionOpaque = >::sse_decode(deserializer); +return crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque};} } impl SseDecode for crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncMoi { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); -return crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncMoi{good: var_good, opaque: var_opaque};} +let mut var_optionOpaque = >::sse_decode(deserializer); +return crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncMoi{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque};} } impl SseDecode for crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_sse::StructWithGoodAndOpaqueFieldTwinRustAsyncSse { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); -return crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_sse::StructWithGoodAndOpaqueFieldTwinRustAsyncSse{good: var_good, opaque: var_opaque};} +let mut var_optionOpaque = >::sse_decode(deserializer); +return crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_sse::StructWithGoodAndOpaqueFieldTwinRustAsyncSse{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque};} } impl SseDecode for crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_sse_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); -return crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_sse_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi{good: var_good, opaque: var_opaque};} +let mut var_optionOpaque = >::sse_decode(deserializer); +return crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_sse_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque};} } impl SseDecode @@ -53371,7 +53512,8 @@ impl SseDecode fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); - return crate::api::pseudo_manual::rust_auto_opaque_twin_sse::StructWithGoodAndOpaqueFieldTwinSse{good: var_good, opaque: var_opaque}; + let mut var_optionOpaque = >::sse_decode(deserializer); + return crate::api::pseudo_manual::rust_auto_opaque_twin_sse::StructWithGoodAndOpaqueFieldTwinSse{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque}; } } @@ -53379,7 +53521,8 @@ impl SseDecode for crate::api::pseudo_manual::rust_auto_opaque_twin_sse_moi::Str // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); -return crate::api::pseudo_manual::rust_auto_opaque_twin_sse_moi::StructWithGoodAndOpaqueFieldTwinSseMoi{good: var_good, opaque: var_opaque};} +let mut var_optionOpaque = >::sse_decode(deserializer); +return crate::api::pseudo_manual::rust_auto_opaque_twin_sse_moi::StructWithGoodAndOpaqueFieldTwinSseMoi{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque};} } impl SseDecode @@ -53389,7 +53532,8 @@ impl SseDecode fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); - return crate::api::pseudo_manual::rust_auto_opaque_twin_sync::StructWithGoodAndOpaqueFieldTwinSync{good: var_good, opaque: var_opaque}; + let mut var_optionOpaque = >::sse_decode(deserializer); + return crate::api::pseudo_manual::rust_auto_opaque_twin_sync::StructWithGoodAndOpaqueFieldTwinSync{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque}; } } @@ -53397,21 +53541,24 @@ impl SseDecode for crate::api::pseudo_manual::rust_auto_opaque_twin_sync_moi::St // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); -return crate::api::pseudo_manual::rust_auto_opaque_twin_sync_moi::StructWithGoodAndOpaqueFieldTwinSyncMoi{good: var_good, opaque: var_opaque};} +let mut var_optionOpaque = >::sse_decode(deserializer); +return crate::api::pseudo_manual::rust_auto_opaque_twin_sync_moi::StructWithGoodAndOpaqueFieldTwinSyncMoi{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque};} } impl SseDecode for crate::api::pseudo_manual::rust_auto_opaque_twin_sync_sse::StructWithGoodAndOpaqueFieldTwinSyncSse { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); -return crate::api::pseudo_manual::rust_auto_opaque_twin_sync_sse::StructWithGoodAndOpaqueFieldTwinSyncSse{good: var_good, opaque: var_opaque};} +let mut var_optionOpaque = >::sse_decode(deserializer); +return crate::api::pseudo_manual::rust_auto_opaque_twin_sync_sse::StructWithGoodAndOpaqueFieldTwinSyncSse{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque};} } impl SseDecode for crate::api::pseudo_manual::rust_auto_opaque_twin_sync_sse_moi::StructWithGoodAndOpaqueFieldTwinSyncSseMoi { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); -return crate::api::pseudo_manual::rust_auto_opaque_twin_sync_sse_moi::StructWithGoodAndOpaqueFieldTwinSyncSseMoi{good: var_good, opaque: var_opaque};} +let mut var_optionOpaque = >::sse_decode(deserializer); +return crate::api::pseudo_manual::rust_auto_opaque_twin_sync_sse_moi::StructWithGoodAndOpaqueFieldTwinSyncSseMoi{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque};} } impl SseDecode for crate::api::pseudo_manual::mirror_twin_sync_sse::StructWithHashMap { @@ -66529,6 +66676,7 @@ impl flutter_rust_bridge::IntoDart [ self.good.into_into_dart().into_dart(), self.opaque.into_into_dart().into_dart(), + self.option_opaque.into_into_dart().into_dart(), ] .into_dart() } @@ -66558,6 +66706,7 @@ impl flutter_rust_bridge::IntoDart [ self.good.into_into_dart().into_dart(), self.opaque.into_into_dart().into_dart(), + self.option_opaque.into_into_dart().into_dart(), ] .into_dart() } @@ -66582,7 +66731,8 @@ impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::rust_auto_opaq fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ self.good.into_into_dart().into_dart(), -self.opaque.into_into_dart().into_dart() +self.opaque.into_into_dart().into_dart(), +self.option_opaque.into_into_dart().into_dart() ].into_dart() } } @@ -66597,7 +66747,8 @@ impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::rust_auto_opaq fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ self.good.into_into_dart().into_dart(), -self.opaque.into_into_dart().into_dart() +self.opaque.into_into_dart().into_dart(), +self.option_opaque.into_into_dart().into_dart() ].into_dart() } } @@ -66612,7 +66763,8 @@ impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::rust_auto_opaq fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ self.good.into_into_dart().into_dart(), -self.opaque.into_into_dart().into_dart() +self.opaque.into_into_dart().into_dart(), +self.option_opaque.into_into_dart().into_dart() ].into_dart() } } @@ -66627,7 +66779,8 @@ impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::rust_auto_opaq fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ self.good.into_into_dart().into_dart(), -self.opaque.into_into_dart().into_dart() +self.opaque.into_into_dart().into_dart(), +self.option_opaque.into_into_dart().into_dart() ].into_dart() } } @@ -66645,6 +66798,7 @@ impl flutter_rust_bridge::IntoDart [ self.good.into_into_dart().into_dart(), self.opaque.into_into_dart().into_dart(), + self.option_opaque.into_into_dart().into_dart(), ] .into_dart() } @@ -66671,7 +66825,8 @@ impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::rust_auto_opaq fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ self.good.into_into_dart().into_dart(), -self.opaque.into_into_dart().into_dart() +self.opaque.into_into_dart().into_dart(), +self.option_opaque.into_into_dart().into_dart() ].into_dart() } } @@ -66689,6 +66844,7 @@ impl flutter_rust_bridge::IntoDart [ self.good.into_into_dart().into_dart(), self.opaque.into_into_dart().into_dart(), + self.option_opaque.into_into_dart().into_dart(), ] .into_dart() } @@ -66715,7 +66871,8 @@ impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::rust_auto_opaq fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ self.good.into_into_dart().into_dart(), -self.opaque.into_into_dart().into_dart() +self.opaque.into_into_dart().into_dart(), +self.option_opaque.into_into_dart().into_dart() ].into_dart() } } @@ -66730,7 +66887,8 @@ impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::rust_auto_opaq fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ self.good.into_into_dart().into_dart(), -self.opaque.into_into_dart().into_dart() +self.opaque.into_into_dart().into_dart(), +self.option_opaque.into_into_dart().into_dart() ].into_dart() } } @@ -66745,7 +66903,8 @@ impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::rust_auto_opaq fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ self.good.into_into_dart().into_dart(), -self.opaque.into_into_dart().into_dart() +self.opaque.into_into_dart().into_dart(), +self.option_opaque.into_into_dart().into_dart() ].into_dart() } } @@ -79445,6 +79604,126 @@ impl SseEncode for Option { } } +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + impl SseEncode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -82257,6 +82536,7 @@ impl SseEncode fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.good, serializer); ::sse_encode(self.opaque, serializer); + >::sse_encode(self.option_opaque, serializer); } } @@ -82265,31 +82545,36 @@ impl SseEncode for crate::api::rust_auto_opaque::StructWithGoodAndOpaqueFieldTwi fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.good, serializer); ::sse_encode(self.opaque, serializer); + >::sse_encode(self.option_opaque, serializer); } } impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {::sse_encode(self.good, serializer); -::sse_encode(self.opaque, serializer);} +::sse_encode(self.opaque, serializer); +>::sse_encode(self.option_opaque, serializer);} } impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncMoi { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {::sse_encode(self.good, serializer); -::sse_encode(self.opaque, serializer);} +::sse_encode(self.opaque, serializer); +>::sse_encode(self.option_opaque, serializer);} } impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_sse::StructWithGoodAndOpaqueFieldTwinRustAsyncSse { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {::sse_encode(self.good, serializer); -::sse_encode(self.opaque, serializer);} +::sse_encode(self.opaque, serializer); +>::sse_encode(self.option_opaque, serializer);} } impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_sse_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncSseMoi { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {::sse_encode(self.good, serializer); -::sse_encode(self.opaque, serializer);} +::sse_encode(self.opaque, serializer); +>::sse_encode(self.option_opaque, serializer);} } impl SseEncode @@ -82299,13 +82584,15 @@ impl SseEncode fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.good, serializer); ::sse_encode(self.opaque, serializer); + >::sse_encode(self.option_opaque, serializer); } } impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_sse_moi::StructWithGoodAndOpaqueFieldTwinSseMoi { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {::sse_encode(self.good, serializer); -::sse_encode(self.opaque, serializer);} +::sse_encode(self.opaque, serializer); +>::sse_encode(self.option_opaque, serializer);} } impl SseEncode @@ -82315,25 +82602,29 @@ impl SseEncode fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.good, serializer); ::sse_encode(self.opaque, serializer); + >::sse_encode(self.option_opaque, serializer); } } impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_sync_moi::StructWithGoodAndOpaqueFieldTwinSyncMoi { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {::sse_encode(self.good, serializer); -::sse_encode(self.opaque, serializer);} +::sse_encode(self.opaque, serializer); +>::sse_encode(self.option_opaque, serializer);} } impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_sync_sse::StructWithGoodAndOpaqueFieldTwinSyncSse { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {::sse_encode(self.good, serializer); -::sse_encode(self.opaque, serializer);} +::sse_encode(self.opaque, serializer); +>::sse_encode(self.option_opaque, serializer);} } impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_sync_sse_moi::StructWithGoodAndOpaqueFieldTwinSyncSseMoi { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {::sse_encode(self.good, serializer); -::sse_encode(self.opaque, serializer);} +::sse_encode(self.opaque, serializer); +>::sse_encode(self.option_opaque, serializer);} } impl SseEncode for crate::api::pseudo_manual::mirror_twin_sync_sse::StructWithHashMap { diff --git a/frb_example/pure_dart/rust/src/frb_generated.web.rs b/frb_example/pure_dart/rust/src/frb_generated.web.rs index bf3cd0e525..406a36d657 100644 --- a/frb_example/pure_dart/rust/src/frb_generated.web.rs +++ b/frb_example/pure_dart/rust/src/frb_generated.web.rs @@ -6714,13 +6714,14 @@ impl .unwrap(); assert_eq!( self_.length(), - 2, - "Expected 2 elements, got {}", + 3, + "Expected 3 elements, got {}", self_.length() ); crate::api::pseudo_manual::rust_auto_opaque_twin_moi::StructWithGoodAndOpaqueFieldTwinMoi { good: self_.get(0).cst_decode(), opaque: self_.get(1).cst_decode(), + option_opaque: self_.get(2).cst_decode(), } } } @@ -6734,13 +6735,14 @@ impl CstDecode crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync { let self_ = self.dyn_into::().unwrap(); - assert_eq!(self_.length(), 2, "Expected 2 elements, got {}", self_.length()); - crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync{good: self_.get(0).cst_decode(),opaque: self_.get(1).cst_decode()} + assert_eq!(self_.length(), 3, "Expected 3 elements, got {}", self_.length()); + crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync{good: self_.get(0).cst_decode(),opaque: self_.get(1).cst_decode(),option_opaque: self_.get(2).cst_decode()} } } impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncMoi { let self_ = self.dyn_into::().unwrap(); - assert_eq!(self_.length(), 2, "Expected 2 elements, got {}", self_.length()); - crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncMoi{good: self_.get(0).cst_decode(),opaque: self_.get(1).cst_decode()} + assert_eq!(self_.length(), 3, "Expected 3 elements, got {}", self_.length()); + crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async_moi::StructWithGoodAndOpaqueFieldTwinRustAsyncMoi{good: self_.get(0).cst_decode(),opaque: self_.get(1).cst_decode(),option_opaque: self_.get(2).cst_decode()} } } impl @@ -6775,19 +6777,19 @@ impl .unwrap(); assert_eq!( self_.length(), - 2, - "Expected 2 elements, got {}", + 3, + "Expected 3 elements, got {}", self_.length() ); - crate::api::pseudo_manual::rust_auto_opaque_twin_sync::StructWithGoodAndOpaqueFieldTwinSync{good: self_.get(0).cst_decode(),opaque: self_.get(1).cst_decode()} + crate::api::pseudo_manual::rust_auto_opaque_twin_sync::StructWithGoodAndOpaqueFieldTwinSync{good: self_.get(0).cst_decode(),opaque: self_.get(1).cst_decode(),option_opaque: self_.get(2).cst_decode()} } } impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::api::pseudo_manual::rust_auto_opaque_twin_sync_moi::StructWithGoodAndOpaqueFieldTwinSyncMoi { let self_ = self.dyn_into::().unwrap(); - assert_eq!(self_.length(), 2, "Expected 2 elements, got {}", self_.length()); - crate::api::pseudo_manual::rust_auto_opaque_twin_sync_moi::StructWithGoodAndOpaqueFieldTwinSyncMoi{good: self_.get(0).cst_decode(),opaque: self_.get(1).cst_decode()} + assert_eq!(self_.length(), 3, "Expected 3 elements, got {}", self_.length()); + crate::api::pseudo_manual::rust_auto_opaque_twin_sync_moi::StructWithGoodAndOpaqueFieldTwinSyncMoi{good: self_.get(0).cst_decode(),opaque: self_.get(1).cst_decode(),option_opaque: self_.get(2).cst_decode()} } } impl CstDecode diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart index 040c99a432..932229fc75 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_rust_async.dart @@ -447,14 +447,16 @@ class StructWithExplicitAutoOpaqueFieldTwinRustAsync { class StructWithGoodAndOpaqueFieldTwinRustAsync { final String good; final NonCloneSimpleTwinRustAsync opaque; + final NonCloneSimpleTwinRustAsync? optionOpaque; const StructWithGoodAndOpaqueFieldTwinRustAsync({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -462,5 +464,6 @@ class StructWithGoodAndOpaqueFieldTwinRustAsync { other is StructWithGoodAndOpaqueFieldTwinRustAsync && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart index 707c067077..9b6b44d865 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/pseudo_manual/rust_auto_opaque_twin_sync.dart @@ -408,14 +408,16 @@ class StructWithExplicitAutoOpaqueFieldTwinSync { class StructWithGoodAndOpaqueFieldTwinSync { final String good; final NonCloneSimpleTwinSync opaque; + final NonCloneSimpleTwinSync? optionOpaque; const StructWithGoodAndOpaqueFieldTwinSync({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -423,5 +425,6 @@ class StructWithGoodAndOpaqueFieldTwinSync { other is StructWithGoodAndOpaqueFieldTwinSync && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart_pde/lib/src/rust/api/rust_auto_opaque.dart b/frb_example/pure_dart_pde/lib/src/rust/api/rust_auto_opaque.dart index 3572528009..3c2a1bff74 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/api/rust_auto_opaque.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/api/rust_auto_opaque.dart @@ -422,14 +422,16 @@ class StructWithExplicitAutoOpaqueFieldTwinNormal { class StructWithGoodAndOpaqueFieldTwinNormal { final String good; final NonCloneSimpleTwinNormal opaque; + final NonCloneSimpleTwinNormal? optionOpaque; const StructWithGoodAndOpaqueFieldTwinNormal({ required this.good, required this.opaque, + this.optionOpaque, }); @override - int get hashCode => good.hashCode ^ opaque.hashCode; + int get hashCode => good.hashCode ^ opaque.hashCode ^ optionOpaque.hashCode; @override bool operator ==(Object other) => @@ -437,5 +439,6 @@ class StructWithGoodAndOpaqueFieldTwinNormal { other is StructWithGoodAndOpaqueFieldTwinNormal && runtimeType == other.runtimeType && good == other.good && - opaque == other.opaque; + opaque == other.opaque && + optionOpaque == other.optionOpaque; } diff --git a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart index 80a35ad7c0..5c1ac5507c 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart @@ -33505,6 +33505,30 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return dco_decode_application_env(raw); } + @protected + NonCloneSimpleTwinNormal + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinNormal; + } + + @protected + NonCloneSimpleTwinRustAsync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinRustAsync; + } + + @protected + NonCloneSimpleTwinSync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as NonCloneSimpleTwinSync; + } + @protected Duration dco_decode_box_autoadd_Chrono_Duration(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -38127,6 +38151,39 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return raw == null ? null : dco_decode_String(raw); } + @protected + NonCloneSimpleTwinNormal? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + raw); + } + + @protected + NonCloneSimpleTwinRustAsync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + raw); + } + + @protected + NonCloneSimpleTwinSync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null + ? null + : dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + raw); + } + @protected Duration? dco_decode_opt_box_autoadd_Chrono_Duration(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -39677,13 +39734,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_struct_with_good_and_opaque_field_twin_normal(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinNormal( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + arr[2]), ); } @@ -39693,13 +39753,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinRustAsync( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + arr[2]), ); } @@ -39708,13 +39771,16 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_struct_with_good_and_opaque_field_twin_sync(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) - throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return StructWithGoodAndOpaqueFieldTwinSync( good: dco_decode_String(arr[0]), opaque: dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( arr[1]), + optionOpaque: + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + arr[2]), ); } @@ -41985,6 +42051,33 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return (sse_decode_application_env(deserializer)); } + @protected + NonCloneSimpleTwinNormal + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + deserializer)); + } + + @protected + NonCloneSimpleTwinRustAsync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + deserializer)); + } + + @protected + NonCloneSimpleTwinSync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + deserializer)); + } + @protected Duration sse_decode_box_autoadd_Chrono_Duration( SseDeserializer deserializer) { @@ -47155,6 +47248,48 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } } + @protected + NonCloneSimpleTwinNormal? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinRustAsync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + deserializer)); + } else { + return null; + } + } + + @protected + NonCloneSimpleTwinSync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + deserializer)); + } else { + return null; + } + } + @protected Duration? sse_decode_opt_box_autoadd_Chrono_Duration( SseDeserializer deserializer) { @@ -48829,8 +48964,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + deserializer); return StructWithGoodAndOpaqueFieldTwinNormal( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -48842,8 +48980,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + deserializer); return StructWithGoodAndOpaqueFieldTwinRustAsync( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -48855,8 +48996,11 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { var var_opaque = sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( deserializer); + var var_optionOpaque = + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + deserializer); return StructWithGoodAndOpaqueFieldTwinSync( - good: var_good, opaque: var_opaque); + good: var_good, opaque: var_opaque, optionOpaque: var_optionOpaque); } @protected @@ -50967,6 +51111,33 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_application_env(self, serializer); } + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + self, serializer); + } + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + self, serializer); + } + @protected void sse_encode_box_autoadd_Chrono_Duration( Duration self, SseSerializer serializer) { @@ -55406,6 +55577,45 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } } + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + self, serializer); + } + } + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + self, serializer); + } + } + @protected void sse_encode_opt_box_autoadd_Chrono_Duration( Duration? self, SseSerializer serializer) { @@ -56847,6 +57057,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + self.optionOpaque, serializer); } @protected @@ -56857,6 +57069,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + self.optionOpaque, serializer); } @protected @@ -56866,6 +57080,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(self.good, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( self.opaque, serializer); + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + self.optionOpaque, serializer); } @protected diff --git a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.io.dart b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.io.dart index 96499cd461..f8f0c7fba3 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.io.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.io.dart @@ -1108,6 +1108,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ApplicationEnv dco_decode_box_application_env(dynamic raw); + @protected + NonCloneSimpleTwinNormal + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw); + + @protected + NonCloneSimpleTwinSync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw); + @protected Duration dco_decode_box_autoadd_Chrono_Duration(dynamic raw); @@ -2893,6 +2908,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected String? dco_decode_opt_String(dynamic raw); + @protected + NonCloneSimpleTwinNormal? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw); + + @protected + NonCloneSimpleTwinSync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw); + @protected Duration? dco_decode_opt_box_autoadd_Chrono_Duration(dynamic raw); @@ -4421,6 +4451,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ApplicationEnv sse_decode_box_application_env(SseDeserializer deserializer); + @protected + NonCloneSimpleTwinNormal + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer); + @protected Duration sse_decode_box_autoadd_Chrono_Duration(SseDeserializer deserializer); @@ -6465,6 +6510,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected String? sse_decode_opt_String(SseDeserializer deserializer); + @protected + NonCloneSimpleTwinNormal? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer); + @protected Duration? sse_decode_opt_box_autoadd_Chrono_Duration( SseDeserializer deserializer); @@ -8136,6 +8196,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_application_env( ApplicationEnv self, SseSerializer serializer); + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_Chrono_Duration( Duration self, SseSerializer serializer); @@ -10114,6 +10189,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_opt_String(String? self, SseSerializer serializer); + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync? self, SseSerializer serializer); + @protected void sse_encode_opt_box_autoadd_Chrono_Duration( Duration? self, SseSerializer serializer); diff --git a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.web.dart b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.web.dart index 0eade0fb2f..45b78536f6 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.web.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.web.dart @@ -1107,6 +1107,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ApplicationEnv dco_decode_box_application_env(dynamic raw); + @protected + NonCloneSimpleTwinNormal + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw); + + @protected + NonCloneSimpleTwinSync + dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw); + @protected Duration dco_decode_box_autoadd_Chrono_Duration(dynamic raw); @@ -2892,6 +2907,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected String? dco_decode_opt_String(dynamic raw); + @protected + NonCloneSimpleTwinNormal? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + dynamic raw); + + @protected + NonCloneSimpleTwinRustAsync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + dynamic raw); + + @protected + NonCloneSimpleTwinSync? + dco_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + dynamic raw); + @protected Duration? dco_decode_opt_box_autoadd_Chrono_Duration(dynamic raw); @@ -4420,6 +4450,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected ApplicationEnv sse_decode_box_application_env(SseDeserializer deserializer); + @protected + NonCloneSimpleTwinNormal + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSync + sse_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer); + @protected Duration sse_decode_box_autoadd_Chrono_Duration(SseDeserializer deserializer); @@ -6464,6 +6509,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected String? sse_decode_opt_String(SseDeserializer deserializer); + @protected + NonCloneSimpleTwinNormal? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinRustAsync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + SseDeserializer deserializer); + + @protected + NonCloneSimpleTwinSync? + sse_decode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + SseDeserializer deserializer); + @protected Duration? sse_decode_opt_box_autoadd_Chrono_Duration( SseDeserializer deserializer); @@ -8135,6 +8195,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { void sse_encode_box_application_env( ApplicationEnv self, SseSerializer serializer); + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync self, SseSerializer serializer); + + @protected + void + sse_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync self, SseSerializer serializer); + @protected void sse_encode_box_autoadd_Chrono_Duration( Duration self, SseSerializer serializer); @@ -10113,6 +10188,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_opt_String(String? self, SseSerializer serializer); + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + NonCloneSimpleTwinNormal? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + NonCloneSimpleTwinRustAsync? self, SseSerializer serializer); + + @protected + void + sse_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + NonCloneSimpleTwinSync? self, SseSerializer serializer); + @protected void sse_encode_opt_box_autoadd_Chrono_Duration( Duration? self, SseSerializer serializer); diff --git a/frb_example/pure_dart_pde/rust/src/frb_generated.rs b/frb_example/pure_dart_pde/rust/src/frb_generated.rs index 66948c1ab8..44c5fd1655 100644 --- a/frb_example/pure_dart_pde/rust/src/frb_generated.rs +++ b/frb_example/pure_dart_pde/rust/src/frb_generated.rs @@ -28388,6 +28388,39 @@ impl SseDecode for Option { } } +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + impl SseDecode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -30226,9 +30259,11 @@ impl SseDecode for crate::api::rust_auto_opaque::StructWithGoodAndOpaqueFieldTwi fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); + let mut var_optionOpaque = >::sse_decode(deserializer); return crate::api::rust_auto_opaque::StructWithGoodAndOpaqueFieldTwinNormal { good: var_good, opaque: var_opaque, + option_opaque: var_optionOpaque, }; } } @@ -30237,7 +30272,8 @@ impl SseDecode for crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async:: // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); -return crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync{good: var_good, opaque: var_opaque};} +let mut var_optionOpaque = >::sse_decode(deserializer); +return crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque};} } impl SseDecode @@ -30247,7 +30283,8 @@ impl SseDecode fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_good = ::sse_decode(deserializer); let mut var_opaque = ::sse_decode(deserializer); - return crate::api::pseudo_manual::rust_auto_opaque_twin_sync::StructWithGoodAndOpaqueFieldTwinSync{good: var_good, opaque: var_opaque}; + let mut var_optionOpaque = >::sse_decode(deserializer); + return crate::api::pseudo_manual::rust_auto_opaque_twin_sync::StructWithGoodAndOpaqueFieldTwinSync{good: var_good, opaque: var_opaque, option_opaque: var_optionOpaque}; } } @@ -37683,6 +37720,7 @@ impl flutter_rust_bridge::IntoDart [ self.good.into_into_dart().into_dart(), self.opaque.into_into_dart().into_dart(), + self.option_opaque.into_into_dart().into_dart(), ] .into_dart() } @@ -37707,7 +37745,8 @@ impl flutter_rust_bridge::IntoDart for crate::api::pseudo_manual::rust_auto_opaq fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ self.good.into_into_dart().into_dart(), -self.opaque.into_into_dart().into_dart() +self.opaque.into_into_dart().into_dart(), +self.option_opaque.into_into_dart().into_dart() ].into_dart() } } @@ -37725,6 +37764,7 @@ impl flutter_rust_bridge::IntoDart [ self.good.into_into_dart().into_dart(), self.opaque.into_into_dart().into_dart(), + self.option_opaque.into_into_dart().into_dart(), ] .into_dart() } @@ -43768,6 +43808,36 @@ impl SseEncode for Option { } } +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + impl SseEncode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -45347,13 +45417,15 @@ impl SseEncode for crate::api::rust_auto_opaque::StructWithGoodAndOpaqueFieldTwi fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.good, serializer); ::sse_encode(self.opaque, serializer); + >::sse_encode(self.option_opaque, serializer); } } impl SseEncode for crate::api::pseudo_manual::rust_auto_opaque_twin_rust_async::StructWithGoodAndOpaqueFieldTwinRustAsync { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {::sse_encode(self.good, serializer); -::sse_encode(self.opaque, serializer);} +::sse_encode(self.opaque, serializer); +>::sse_encode(self.option_opaque, serializer);} } impl SseEncode @@ -45363,6 +45435,7 @@ impl SseEncode fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.good, serializer); ::sse_encode(self.opaque, serializer); + >::sse_encode(self.option_opaque, serializer); } } From 177a619c663f88a3fb81d3307707c30d6e7704e2 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:53:28 +0800 Subject: [PATCH 35/50] fix: err --- .../wire/rust/spec_generator/codec/cst/decoder/ty/boxed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/codec/cst/decoder/ty/boxed.rs b/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/codec/cst/decoder/ty/boxed.rs index f891b139d7..92f6b193d4 100644 --- a/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/codec/cst/decoder/ty/boxed.rs +++ b/frb_codegen/src/library/codegen/generator/wire/rust/spec_generator/codec/cst/decoder/ty/boxed.rs @@ -64,7 +64,7 @@ impl<'a> WireRustCodecCstGeneratorDecoderTrait for BoxedWireRustCodecCstGenerato if self.ir.inner.is_primitive() || matches!( *self.ir.inner, - IrType::RustOpaque(_) | IrType::DartOpaque(_) + IrType::RustOpaque(_) | IrType::RustAutoOpaque(_) | IrType::DartOpaque(_) ) { Acc { From c56f5c57b649b7eb1894742bb7bdbb5d3ec89ab9 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:56:18 +0800 Subject: [PATCH 36/50] chore: codegen --- frb_example/pure_dart/frb_generated.h | 12 +-- .../lib/src/rust/frb_generated.io.dart | 84 +++++++++++++------ .../pure_dart/rust/src/frb_generated.io.rs | 18 ++-- 3 files changed, 78 insertions(+), 36 deletions(-) diff --git a/frb_example/pure_dart/frb_generated.h b/frb_example/pure_dart/frb_generated.h index 248141fc64..2ce4df831f 100644 --- a/frb_example/pure_dart/frb_generated.h +++ b/frb_example/pure_dart/frb_generated.h @@ -12571,17 +12571,17 @@ void frbgen_frb_example_pure_dart_rust_arc_decrement_strong_count_RustOpaque_i32 struct wire_cst_application_env *frbgen_frb_example_pure_dart_cst_new_box_application_env(void); -uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi(void); +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi(uintptr_t value); -uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal(void); +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal(uintptr_t value); -uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync(void); +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync(uintptr_t value); -uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi(void); +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi(uintptr_t value); -uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync(void); +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync(uintptr_t value); -uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi(void); +uintptr_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi(uintptr_t value); int64_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_Chrono_Duration(int64_t value); diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart index 7fee8d12d1..14101ed2dd 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart @@ -88475,76 +88475,112 @@ class RustLibWire implements BaseWire { .asFunction Function()>(); ffi.Pointer - cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi() { - return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi(); + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + int value, + ) { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + value, + ); } late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoiPtr = - _lookup Function()>>( + _lookup< + ffi + .NativeFunction Function(ffi.UintPtr)>>( 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi'); late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi = _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoiPtr - .asFunction Function()>(); + .asFunction Function(int)>(); ffi.Pointer - cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal() { - return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal(); + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + int value, + ) { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + value, + ); } late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormalPtr = - _lookup Function()>>( + _lookup< + ffi + .NativeFunction Function(ffi.UintPtr)>>( 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal'); late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal = _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormalPtr - .asFunction Function()>(); + .asFunction Function(int)>(); ffi.Pointer - cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync() { - return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync(); + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + int value, + ) { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + value, + ); } late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncPtr = - _lookup Function()>>( + _lookup< + ffi + .NativeFunction Function(ffi.UintPtr)>>( 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync'); late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync = _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncPtr - .asFunction Function()>(); + .asFunction Function(int)>(); ffi.Pointer - cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi() { - return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi(); + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + int value, + ) { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + value, + ); } late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoiPtr = - _lookup Function()>>( + _lookup< + ffi + .NativeFunction Function(ffi.UintPtr)>>( 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi'); late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi = _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoiPtr - .asFunction Function()>(); + .asFunction Function(int)>(); ffi.Pointer - cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync() { - return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync(); + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + int value, + ) { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + value, + ); } late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncPtr = - _lookup Function()>>( + _lookup< + ffi + .NativeFunction Function(ffi.UintPtr)>>( 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync'); late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync = _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncPtr - .asFunction Function()>(); + .asFunction Function(int)>(); ffi.Pointer - cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi() { - return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi(); + cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + int value, + ) { + return _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + value, + ); } late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoiPtr = - _lookup Function()>>( + _lookup< + ffi + .NativeFunction Function(ffi.UintPtr)>>( 'frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi'); late final _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi = _cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoiPtr - .asFunction Function()>(); + .asFunction Function(int)>(); ffi.Pointer cst_new_box_autoadd_Chrono_Duration( int value, diff --git a/frb_example/pure_dart/rust/src/frb_generated.io.rs b/frb_example/pure_dart/rust/src/frb_generated.io.rs index 12fc0e9764..cfe89f718c 100644 --- a/frb_example/pure_dart/rust/src/frb_generated.io.rs +++ b/frb_example/pure_dart/rust/src/frb_generated.io.rs @@ -39351,38 +39351,44 @@ pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_application_env( #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + value: usize, ) -> *mut usize { - flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) } #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + value: usize, ) -> *mut usize { - flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) } #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + value: usize, ) -> *mut usize { - flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) } #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + value: usize, ) -> *mut usize { - flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) } #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + value: usize, ) -> *mut usize { - flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) } #[no_mangle] pub extern "C" fn frbgen_frb_example_pure_dart_cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + value: usize, ) -> *mut usize { - flutter_rust_bridge::for_generated::new_leak_box_ptr(usize::new_with_null_ptr()) + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) } #[no_mangle] From bda8ea1438860298dba20154b8c3e14d646283dd Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 14:58:52 +0800 Subject: [PATCH 37/50] fix: more --- .../wire/dart/spec_generator/codec/cst/encoder/ty/boxed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/cst/encoder/ty/boxed.rs b/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/cst/encoder/ty/boxed.rs index 447f30fa9a..343297ea01 100644 --- a/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/cst/encoder/ty/boxed.rs +++ b/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/cst/encoder/ty/boxed.rs @@ -18,7 +18,7 @@ impl<'a> WireDartCodecCstGeneratorEncoderTrait for BoxedWireDartCodecCstGenerato if self.ir.inner.is_primitive() || matches!( *self.ir.inner, - IrType::RustOpaque(_) | IrType::DartOpaque(_) + IrType::RustOpaque(_) | IrType::RustAutoOpaque(_) | IrType::DartOpaque(_) ) { format!( From a31d8f83d5e6244c6fa847c8842cccecdb38b73a Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 15:00:46 +0800 Subject: [PATCH 38/50] chore: codegen --- .../lib/src/rust/frb_generated.io.dart | 54 +++++++++---------- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart index 14101ed2dd..96070ad126 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart @@ -16499,11 +16499,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( NonCloneSimpleTwinMoi raw) { // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire - .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi(); - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( - raw, ptr.ref); - return ptr; + return wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + raw)); } @protected @@ -16511,11 +16510,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( NonCloneSimpleTwinNormal raw) { // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire - .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal(); - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( - raw, ptr.ref); - return ptr; + return wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + raw)); } @protected @@ -16523,11 +16521,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( NonCloneSimpleTwinRustAsync raw) { // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire - .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync(); - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( - raw, ptr.ref); - return ptr; + return wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + raw)); } @protected @@ -16535,11 +16532,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( NonCloneSimpleTwinRustAsyncMoi raw) { // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire - .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi(); - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( - raw, ptr.ref); - return ptr; + return wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + raw)); } @protected @@ -16547,11 +16543,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( NonCloneSimpleTwinSync raw) { // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire - .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync(); - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( - raw, ptr.ref); - return ptr; + return wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + raw)); } @protected @@ -16559,11 +16554,10 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( NonCloneSimpleTwinSyncMoi raw) { // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire - .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi(); - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( - raw, ptr.ref); - return ptr; + return wire + .cst_new_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + raw)); } @protected From 625c9126dcb6b2e75ae164ba71582a9fa1f73edc Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 16:11:30 +0800 Subject: [PATCH 39/50] fix: more --- .../wire/dart/spec_generator/codec/cst/encoder/ty/boxed.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/cst/encoder/ty/boxed.rs b/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/cst/encoder/ty/boxed.rs index 343297ea01..51bfc4f3c3 100644 --- a/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/cst/encoder/ty/boxed.rs +++ b/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/cst/encoder/ty/boxed.rs @@ -52,7 +52,7 @@ impl<'a> WireDartCodecCstGeneratorEncoderTrait for BoxedWireDartCodecCstGenerato } else if !self.ir.inner.is_primitive() && !matches!( *self.ir.inner, - IrType::RustOpaque(_) | IrType::DartOpaque(_) + IrType::RustOpaque(_) | IrType::RustAutoOpaque(_) | IrType::DartOpaque(_) ) && !is_empty_struct(self) { From 0bc99c28ea1067c3b045d1e33c446d34c8570a47 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 16:13:31 +0800 Subject: [PATCH 40/50] chore: codegen --- .../lib/src/rust/frb_generated.io.dart | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart index 96070ad126..87adfce600 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart @@ -21760,54 +21760,6 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { cst_api_fill_to_wire_application_env(apiObj, wireObj.ref); } - @protected - void - cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( - NonCloneSimpleTwinMoi apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( - apiObj, wireObj.ref); - } - - @protected - void - cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( - NonCloneSimpleTwinNormal apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( - apiObj, wireObj.ref); - } - - @protected - void - cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( - NonCloneSimpleTwinRustAsync apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( - apiObj, wireObj.ref); - } - - @protected - void - cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( - NonCloneSimpleTwinRustAsyncMoi apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( - apiObj, wireObj.ref); - } - - @protected - void - cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( - NonCloneSimpleTwinSync apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( - apiObj, wireObj.ref); - } - - @protected - void - cst_api_fill_to_wire_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( - NonCloneSimpleTwinSyncMoi apiObj, ffi.Pointer wireObj) { - cst_api_fill_to_wire_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( - apiObj, wireObj.ref); - } - @protected void cst_api_fill_to_wire_box_autoadd_a_twin_normal( ATwinNormal apiObj, ffi.Pointer wireObj) { From 8b441489f2918b06c058ba389e5c73ac9668d36f Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 16:17:31 +0800 Subject: [PATCH 41/50] feat: more --- frb_codegen/src/library/codegen/ir/ty/rust_auto_opaque.rs | 6 ++++++ frb_codegen/src/library/codegen/ir/ty/rust_opaque.rs | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frb_codegen/src/library/codegen/ir/ty/rust_auto_opaque.rs b/frb_codegen/src/library/codegen/ir/ty/rust_auto_opaque.rs index df6875da44..506a97aed6 100644 --- a/frb_codegen/src/library/codegen/ir/ty/rust_auto_opaque.rs +++ b/frb_codegen/src/library/codegen/ir/ty/rust_auto_opaque.rs @@ -1,4 +1,6 @@ +use super::rust_opaque::RUST_OPAQUE_AS_PRIMITIVE; use crate::codegen::ir::namespace::Namespace; +use crate::codegen::ir::ty::primitive::IrTypePrimitive; use crate::codegen::ir::ty::rust_opaque::{IrTypeRustOpaque, NameComponent}; use crate::codegen::ir::ty::{IrContext, IrType, IrTypeTrait}; use serde::Serialize; @@ -51,6 +53,10 @@ impl IrTypeTrait for IrTypeRustAutoOpaque { fn self_namespace(&self) -> Option { Some(self.inner.namespace.clone()) } + + fn as_primitive(&self) -> Option<&IrTypePrimitive> { + Some(&RUST_OPAQUE_AS_PRIMITIVE) + } } impl IrTypeRustAutoOpaque { diff --git a/frb_codegen/src/library/codegen/ir/ty/rust_opaque.rs b/frb_codegen/src/library/codegen/ir/ty/rust_opaque.rs index 517ac49177..d7827bdf83 100644 --- a/frb_codegen/src/library/codegen/ir/ty/rust_opaque.rs +++ b/frb_codegen/src/library/codegen/ir/ty/rust_opaque.rs @@ -84,10 +84,12 @@ impl IrTypeTrait for IrTypeRustOpaque { // Because we are using usize on the wirre fn as_primitive(&self) -> Option<&IrTypePrimitive> { - Some(&IrTypePrimitive::Usize) + Some(&RUST_OPAQUE_AS_PRIMITIVE) } } +pub(super) const RUST_OPAQUE_AS_PRIMITIVE: IrTypePrimitive = IrTypePrimitive::Usize; + impl IrRustOpaqueInner { pub(crate) fn safe_ident(&self) -> String { lazy_static! { From 4d4dcb27c7fe2d19501ef6fb71127d4535af8792 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 16:20:05 +0800 Subject: [PATCH 42/50] chore: codegen --- .../lib/src/rust/frb_generated.io.dart | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart index 87adfce600..53b88d20e5 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.io.dart @@ -16495,7 +16495,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( NonCloneSimpleTwinMoi raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -16506,7 +16506,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( NonCloneSimpleTwinNormal raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -16517,7 +16517,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( NonCloneSimpleTwinRustAsync raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -16528,7 +16528,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( NonCloneSimpleTwinRustAsyncMoi raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -16539,7 +16539,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( NonCloneSimpleTwinSync raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -16550,7 +16550,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( NonCloneSimpleTwinSyncMoi raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -20494,7 +20494,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( NonCloneSimpleTwinMoi? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -20505,7 +20505,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( NonCloneSimpleTwinNormal? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -20516,7 +20516,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( NonCloneSimpleTwinRustAsync? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -20527,7 +20527,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( NonCloneSimpleTwinRustAsyncMoi? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -20538,7 +20538,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( NonCloneSimpleTwinSync? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -20549,7 +20549,7 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { } @protected - ffi.Pointer + ffi.Pointer cst_encode_opt_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( NonCloneSimpleTwinSyncMoi? raw) { // Codec=Cst (C-struct based), see doc to use other codecs From 85e8881d4b0b887e82a8d670355d90d97c6abddb Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 16:22:25 +0800 Subject: [PATCH 43/50] chore: bump version --- .github/workflows/ci.yaml | 30 ++++++++++++++--------------- .github/workflows/post_release.yaml | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b98c4aa69f..c78f3f6251 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,14 +4,14 @@ on: push: branches: - master - pull_request: {} - workflow_dispatch: {} + pull_request: { } + workflow_dispatch: { } env: CARGO_TERM_COLOR: always FRB_MAIN_RUST_VERSION: 1.74.0 FRB_MAIN_DART_VERSION: 3.3.0 - FRB_MAIN_FLUTTER_VERSION: 3.19.0 + FRB_MAIN_FLUTTER_VERSION: 3.19.2 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -187,10 +187,10 @@ jobs: - frb_example--flutter_via_create - frb_example--flutter_via_integrate exclude: - - {image: windows-2019, package: frb_example--deliberate_bad} - - {image: macos-11, package: frb_example--deliberate_bad} - - {image: windows-2019, package: frb_example--flutter_via_integrate} - - {image: macos-11, package: frb_example--flutter_via_integrate} + - { image: windows-2019, package: frb_example--deliberate_bad } + - { image: macos-11, package: frb_example--deliberate_bad } + - { image: windows-2019, package: frb_example--flutter_via_integrate } + - { image: macos-11, package: frb_example--flutter_via_integrate } steps: # setup @@ -530,7 +530,7 @@ jobs: # tests the MSRV # run on all rust packages, though only needed for frb_rust and frb_codegen - image: ubuntu-latest - # update this, if a later MSRV is needed + # update this, if a later MSRV is needed version: 1.74.0 steps: @@ -581,12 +581,12 @@ jobs: - frb_example--dart_build_rs - frb_example--deliberate_bad exclude: - - {image: windows-2019, package: frb_utils} - - {image: macos-11, package: frb_utils} - - {image: windows-2019, package: tools--frb_internal} - - {image: macos-11, package: tools--frb_internal} - - {image: windows-2019, package: frb_example--deliberate_bad} - - {image: macos-11, package: frb_example--deliberate_bad} + - { image: windows-2019, package: frb_utils } + - { image: macos-11, package: frb_utils } + - { image: windows-2019, package: tools--frb_internal } + - { image: macos-11, package: tools--frb_internal } + - { image: windows-2019, package: frb_example--deliberate_bad } + - { image: macos-11, package: frb_example--deliberate_bad } steps: # setup @@ -756,7 +756,7 @@ jobs: device: - "pixel" - "Nexus 6" - api-level: [29] + api-level: [ 29 ] steps: # setup diff --git a/.github/workflows/post_release.yaml b/.github/workflows/post_release.yaml index 2949a7a384..f61fa5cab1 100644 --- a/.github/workflows/post_release.yaml +++ b/.github/workflows/post_release.yaml @@ -13,7 +13,7 @@ env: CARGO_TERM_COLOR: always FRB_MAIN_RUST_VERSION: 1.74.0 FRB_MAIN_DART_VERSION: 3.3.0 - FRB_MAIN_FLUTTER_VERSION: 3.19.0 + FRB_MAIN_FLUTTER_VERSION: 3.19.2 jobs: test_mimic_quickstart: From 9a1a985d680753d8287e120abedbf57f0f0b5b0d Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 16:45:57 +0800 Subject: [PATCH 44/50] chore: loosen --- frb_example/deliberate_bad/pubspec.lock | 2 +- frb_example/deliberate_bad/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frb_example/deliberate_bad/pubspec.lock b/frb_example/deliberate_bad/pubspec.lock index b703251cdb..94ea9d7892 100644 --- a/frb_example/deliberate_bad/pubspec.lock +++ b/frb_example/deliberate_bad/pubspec.lock @@ -679,4 +679,4 @@ packages: source: hosted version: "2.1.1" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.2.0 <4.0.0" diff --git a/frb_example/deliberate_bad/pubspec.yaml b/frb_example/deliberate_bad/pubspec.yaml index 5cc2fd8c1f..bde5415b07 100644 --- a/frb_example/deliberate_bad/pubspec.yaml +++ b/frb_example/deliberate_bad/pubspec.yaml @@ -3,7 +3,7 @@ description: flutter rust bridge example version: 1.0.0 publish_to: none environment: - sdk: '>=3.3.0 <4.0.0' + sdk: '>=3.2.0 <4.0.0' dependencies: lints: ^2.0.1 flutter_rust_bridge: From b3a962010d1aabeee0d409b3dca9594e9085ee4b Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 16:51:54 +0800 Subject: [PATCH 45/50] fix: further --- .../wire/dart/spec_generator/codec/dco/decoder/ty/boxed.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/dco/decoder/ty/boxed.rs b/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/dco/decoder/ty/boxed.rs index cc53f3add0..d749a47c81 100644 --- a/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/dco/decoder/ty/boxed.rs +++ b/frb_codegen/src/library/codegen/generator/wire/dart/spec_generator/codec/dco/decoder/ty/boxed.rs @@ -15,6 +15,7 @@ impl<'a> WireDartCodecDcoGeneratorDecoderTrait for BoxedWireDartCodecDcoGenerato StructRef(_) | DartOpaque(_) | RustOpaque(_) + | RustAutoOpaque(_) | EnumRef(_) | Primitive(IrTypePrimitive::I64 | IrTypePrimitive::U64 | IrTypePrimitive::Usize) | Delegate(IrTypeDelegate::Array(_) | IrTypeDelegate::PrimitiveEnum { .. }) => { From 9964713ee762fdc16af9e516b632586120980bdd Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 16:54:11 +0800 Subject: [PATCH 46/50] chore: codegen --- .../pure_dart/lib/src/rust/frb_generated.dart | 36 ++++++++++++------- .../lib/src/rust/frb_generated.dart | 9 +++-- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/frb_example/pure_dart/lib/src/rust/frb_generated.dart b/frb_example/pure_dart/lib/src/rust/frb_generated.dart index 131d2bd663..f16888201f 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.dart @@ -80959,7 +80959,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinMoi; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinMoi( + raw); } @protected @@ -80967,7 +80968,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinNormal; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + raw); } @protected @@ -80975,7 +80977,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinRustAsync; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + raw); } @protected @@ -80983,7 +80986,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinRustAsyncMoi; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncMoi( + raw); } @protected @@ -80991,7 +80995,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinRustAsyncSse; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSse( + raw); } @protected @@ -80999,7 +81004,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinRustAsyncSseMoi; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsyncSseMoi( + raw); } @protected @@ -81007,7 +81013,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinSse; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSse( + raw); } @protected @@ -81015,7 +81022,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinSseMoi; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSseMoi( + raw); } @protected @@ -81023,7 +81031,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinSync; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + raw); } @protected @@ -81031,7 +81040,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinSyncMoi; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncMoi( + raw); } @protected @@ -81039,7 +81049,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinSyncSse; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSse( + raw); } @protected @@ -81047,7 +81058,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinSyncSseMoi; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSyncSseMoi( + raw); } @protected diff --git a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart index 5c1ac5507c..784eac5fa9 100644 --- a/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart +++ b/frb_example/pure_dart_pde/lib/src/rust/frb_generated.dart @@ -33510,7 +33510,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinNormal; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinNormal( + raw); } @protected @@ -33518,7 +33519,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinRustAsync; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinRustAsync( + raw); } @protected @@ -33526,7 +33528,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { dco_decode_box_autoadd_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return raw as NonCloneSimpleTwinSync; + return dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockNonCloneSimpleTwinSync( + raw); } @protected From 526e01730e699c97c101d93768f9d452c8b57123 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 21:27:22 +0800 Subject: [PATCH 47/50] chore: more codegen --- frb_example/pure_dart_pde/test/with_vm_service_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frb_example/pure_dart_pde/test/with_vm_service_test.dart b/frb_example/pure_dart_pde/test/with_vm_service_test.dart index 2a9a0e3312..2c7a01c336 100644 --- a/frb_example/pure_dart_pde/test/with_vm_service_test.dart +++ b/frb_example/pure_dart_pde/test/with_vm_service_test.dart @@ -108,7 +108,7 @@ Future main() async { Future Function(DroppableTwinNormal)? extra, }) async { DroppableTwinNormal? object = - await DroppableTwinNormal.newDroppableTwinNormal(); + await DroppableTwinNormal.newTwinNormal(); final weakRef = WeakReference(object); await extra?.call(object); From 39e5eb2f593026d4cc45e06bab434c4d7e07e01f Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 21:31:52 +0800 Subject: [PATCH 48/50] chore: lint --- frb_example/pure_dart/rust/src/api/constructor.rs | 2 ++ frb_example/pure_dart_pde/rust/src/api/constructor.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/frb_example/pure_dart/rust/src/api/constructor.rs b/frb_example/pure_dart/rust/src/api/constructor.rs index e4d8c3f3d1..c19f1623b1 100644 --- a/frb_example/pure_dart/rust/src/api/constructor.rs +++ b/frb_example/pure_dart/rust/src/api/constructor.rs @@ -1,5 +1,7 @@ // FRB_INTERNAL_GENERATOR: {"forbiddenDuplicatorModes": ["sync", "rustAsync", "sse", "sync sse", "rustAsync sse"]} +#![allow(clippy::new_without_default)] + use flutter_rust_bridge::frb; pub struct ConstructorTranslatableStructTwinNormal { diff --git a/frb_example/pure_dart_pde/rust/src/api/constructor.rs b/frb_example/pure_dart_pde/rust/src/api/constructor.rs index b25d02188d..90d40604ec 100644 --- a/frb_example/pure_dart_pde/rust/src/api/constructor.rs +++ b/frb_example/pure_dart_pde/rust/src/api/constructor.rs @@ -2,6 +2,8 @@ // FRB_INTERNAL_GENERATOR: {"forbiddenDuplicatorModes": ["sync", "rustAsync", "sse", "sync sse", "rustAsync sse"]} +#![allow(clippy::new_without_default)] + use flutter_rust_bridge::frb; pub struct ConstructorTranslatableStructTwinNormal { From dd2910921478000d10aa4bce24a9ab68213a84f1 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 21:43:44 +0800 Subject: [PATCH 49/50] chore: more lint --- .../generator/api_dart/spec_generator/class/method.rs | 2 +- .../api_dart/spec_generator/class/ty/structure.rs | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/method.rs b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/method.rs index 29a6e4b589..bac7176ecb 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/method.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/method.rs @@ -124,7 +124,7 @@ fn generate_signature( &ApiDartGenerator::new(func.output.clone(), context).dart_api_type(), ); let method_name = if default_constructor_mode.is_some() { - format!("newInstance") + "newInstance".to_owned() } else { method_info.actual_method_name.to_case(Case::Camel) }; diff --git a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/structure.rs b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/structure.rs index 571fa2b137..eae5d9f0d3 100644 --- a/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/structure.rs +++ b/frb_codegen/src/library/codegen/generator/api_dart/spec_generator/class/ty/structure.rs @@ -21,20 +21,14 @@ impl<'a> ApiDartGeneratorClassTrait for StructRefApiDartGenerator<'a> { Some(ApiDartGeneratedClass { namespace: src.name.namespace.clone(), code: if src.using_freezed() { - self.generate_mode_freezed( - src, - &comments, - &metadata, - &methods, - &constructor_postfix, - ) + self.generate_mode_freezed(src, &comments, &metadata, &methods, constructor_postfix) } else { self.generate_mode_non_freezed( src, &comments, &metadata, &methods, - &constructor_postfix, + constructor_postfix, ) }, needs_freezed: src.using_freezed(), From b96fd8fc553f8786cb1f0dda2feade5a87aff795 Mon Sep 17 00:00:00 2001 From: fzyzcjy Date: Wed, 6 Mar 2024 21:46:29 +0800 Subject: [PATCH 50/50] chore: changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index abe89ab3c3..be74f64f80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ * Please refer to https://fzyzcjy.github.io/flutter_rust_bridge/guides/miscellaneous/whats-new for what's changed in V2. * Allow specifying pubspec.yaml location in build.rs #1797 (thanks @HalidOdat) * Hint how to only run build.rs if api directory changes #1794 (thanks @HalidOdat) +* Improve procedure macros #1800 #1676 (thanks @Desdaemon) +* Add support for ffigen upgrades #1799 #1757 (thanks @aran) +* Improve hints when structs are in lib.rs #1802 #1579 (thanks @h3x4d3c1m4l) +* Improve scenarios when opaque-by-default is more natural #1805 +* Improve behavior of constructor #1804 +* Fix when using non-opaque struct + option + opaque inner type #1803 ## 2.0.0-dev.25