diff --git a/CHANGELOG.md b/CHANGELOG.md index 32c9b61cab..e6d6a0de8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 2.7.0 + +* Please refer to https://fzyzcjy.github.io/flutter_rust_bridge/guides/miscellaneous/whats-new for what's changed in V2. +* Remove default case in enums #2439 (thanks @Tienisto) +* Switch from dart-sys-fork to dart-sys #2438 (thanks @evdokimovs) +* Fix call build-web with fvm support #2429 (thanks @SirKrlos) +* Replaced WASM header exception with warning #2423 (thanks @CJBuchel) +* Fix Option Box compilation error in DCO codec #2398 +* Fix call toolchain version with fvm support #2395 (thanks @SirKrlos) +* Doc update and linting: #2423 (thanks @CJBuchel), #2422, #2421, #2349 (thanks @ernstvanderlinden), #2394 + ## 2.6.0 * Please refer to https://fzyzcjy.github.io/flutter_rust_bridge/guides/miscellaneous/whats-new for what's changed in V2. diff --git a/Cargo.toml b/Cargo.toml index 7b1e858902..da76d3f11c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ resolver = "2" version = "2.6.0" edition = "2021" license = "MIT" -description = "High-level memory-safe binding generator for Flutter/Dart <-> Rust" +description = "Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple" repository = "https://github.com/fzyzcjy/flutter_rust_bridge" keywords = ["flutter", "dart", "ffi", "code-generation", "bindings"] categories = ["development-tools::ffi"] diff --git a/frb_codegen/src/library/build_web/mod.rs b/frb_codegen/src/library/build_web/mod.rs index 57abf20d6b..045589f912 100644 --- a/frb_codegen/src/library/build_web/mod.rs +++ b/frb_codegen/src/library/build_web/mod.rs @@ -2,6 +2,7 @@ use crate::command_run; use crate::library::commands::command_runner::{call_shell, call_shell_info, check_exit_code}; +use crate::library::commands::fvm::command_arg_maybe_fvm; use crate::utils::dart_repository::dart_repo::DartRepository; use crate::utils::path_utils::{find_dart_package_dir, path_to_string}; use anyhow::{bail, Context}; @@ -71,7 +72,11 @@ fn dart_run( args: Vec, ) -> anyhow::Result { let handle = { - let mut cmd_args: Vec = vec!["dart".into()]; + let mut cmd_args: Vec = if command_arg_maybe_fvm(None).is_some() { + vec!["fvm".into(), "dart".into()] + } else { + vec!["dart".into()] + }; cmd_args.extend(repo.command_extra_args().into_iter().map_into()); cmd_args.push("run".into()); if dart_coverage { diff --git a/frb_codegen/src/library/codegen/generator/codec/sse/ty/enumeration.rs b/frb_codegen/src/library/codegen/generator/codec/sse/ty/enumeration.rs index 3b57fbd055..e86f2710a3 100644 --- a/frb_codegen/src/library/codegen/generator/codec/sse/ty/enumeration.rs +++ b/frb_codegen/src/library/codegen/generator/codec/sse/ty/enumeration.rs @@ -114,7 +114,7 @@ pub(crate) fn generate_enum_encode_rust_general( lang.switch_expr( self_ref, &variants, - Some(format!("{};", lang.throw_unimplemented(""))), + matches!(lang, Lang::RustLang(_)).then(|| format!("{};", lang.throw_unimplemented(""))), ) } diff --git a/frb_codegen/src/library/utils/logs.rs b/frb_codegen/src/library/utils/logs.rs index c96d41e1d9..647052c60a 100644 --- a/frb_codegen/src/library/utils/logs.rs +++ b/frb_codegen/src/library/utils/logs.rs @@ -39,9 +39,7 @@ pub fn configure_opinionated_logging(path: &str, verbose: bool) -> Result<(), fe .level(LevelFilter::Info) .level_for("cbindgen", LevelFilter::Error) .chain(std::io::stdout()), - // frb-coverage:ignore-start - _ => panic!("only allow \"debug\" or \"info\""), - // frb-coverage:ignore-end + _ => fern_logger.level(level_filter).chain(std::io::stdout()), }; let (max_level, fern_logger) = fern_logger.into_log(); diff --git a/frb_dart/pubspec.yaml b/frb_dart/pubspec.yaml index 321c64d3e7..a38153ceb8 100644 --- a/frb_dart/pubspec.yaml +++ b/frb_dart/pubspec.yaml @@ -1,5 +1,5 @@ name: flutter_rust_bridge -description: High-level memory-safe binding generator for Flutter/Dart <-> Rust +description: Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple version: 2.6.0 repository: https://github.com/fzyzcjy/flutter_rust_bridge environment: diff --git a/frb_example/integrate_third_party/lib/src/rust/frb_generated.dart b/frb_example/integrate_third_party/lib/src/rust/frb_generated.dart index 1057c4233f..81890e1c2b 100644 --- a/frb_example/integrate_third_party/lib/src/rust/frb_generated.dart +++ b/frb_example/integrate_third_party/lib/src/rust/frb_generated.dart @@ -26491,8 +26491,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case AudioContextLatencyCategory_Custom(field0: final field0): sse_encode_i_32(3, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -26618,8 +26616,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(22, serializer); sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerWaveShaperNode( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -26849,8 +26845,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(31, serializer); sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStereoPannerNode( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -26867,8 +26861,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(0, serializer); sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMediaStreamAudioDestinationNode( field0, serializer); - default: - throw UnimplementedError(''); } } 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 fa64ff3f2b..7d4432078b 100644 --- a/frb_example/pure_dart/lib/src/rust/frb_generated.dart +++ b/frb_example/pure_dart/lib/src/rust/frb_generated.dart @@ -152474,8 +152474,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case AbcTwinNormal_JustInt(field0: final field0): sse_encode_i_32(3, serializer); sse_encode_i_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -152496,8 +152494,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case AbcTwinRustAsync_JustInt(field0: final field0): sse_encode_i_32(3, serializer); sse_encode_i_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -152518,8 +152514,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case AbcTwinRustAsyncSse_JustInt(field0: final field0): sse_encode_i_32(3, serializer); sse_encode_i_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -152539,8 +152533,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case AbcTwinSse_JustInt(field0: final field0): sse_encode_i_32(3, serializer); sse_encode_i_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -152560,8 +152552,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case AbcTwinSync_JustInt(field0: final field0): sse_encode_i_32(3, serializer); sse_encode_i_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -152582,8 +152572,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case AbcTwinSyncSse_JustInt(field0: final field0): sse_encode_i_32(3, serializer); sse_encode_i_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -152666,8 +152654,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(y, serializer); case ApplicationMessage_Exit(): sse_encode_i_32(2, serializer); - default: - throw UnimplementedError(''); } } @@ -152763,8 +152749,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyNodeTwinNormal( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -152816,8 +152800,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(field, serializer); case BasicGeneralEnumTwinNormal_Orange(): sse_encode_i_32(1, serializer); - default: - throw UnimplementedError(''); } } @@ -152831,8 +152813,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(field, serializer); case BasicGeneralEnumTwinRustAsync_Orange(): sse_encode_i_32(1, serializer); - default: - throw UnimplementedError(''); } } @@ -152846,8 +152826,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(field, serializer); case BasicGeneralEnumTwinRustAsyncSse_Orange(): sse_encode_i_32(1, serializer); - default: - throw UnimplementedError(''); } } @@ -152861,8 +152839,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(field, serializer); case BasicGeneralEnumTwinSse_Orange(): sse_encode_i_32(1, serializer); - default: - throw UnimplementedError(''); } } @@ -152876,8 +152852,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(field, serializer); case BasicGeneralEnumTwinSync_Orange(): sse_encode_i_32(1, serializer); - default: - throw UnimplementedError(''); } } @@ -152891,8 +152865,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(field, serializer); case BasicGeneralEnumTwinSyncSse_Orange(): sse_encode_i_32(1, serializer); - default: - throw UnimplementedError(''); } } @@ -157070,8 +157042,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(message, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157094,8 +157064,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(message, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157118,8 +157086,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(message, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157142,8 +157108,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(message, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157166,8 +157130,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(message, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157190,8 +157152,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(message, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157208,8 +157168,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(e, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157232,8 +157190,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(e, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157256,8 +157212,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(e, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157274,8 +157228,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(e, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157292,8 +157244,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(e, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157316,8 +157266,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(e, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -157333,8 +157281,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_2_twin_normal( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157350,8 +157296,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_2_twin_rust_async( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157369,8 +157313,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_2_twin_rust_async_sse( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157386,8 +157328,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_2_twin_sse( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157403,8 +157343,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_2_twin_sync( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157420,8 +157358,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_2_twin_sync_sse( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157438,8 +157374,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157456,8 +157390,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157476,8 +157408,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157492,8 +157422,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedError2TwinSse_CustomNested2Number(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157508,8 +157436,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedError2TwinSync_CustomNested2Number(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157526,8 +157452,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157542,8 +157466,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedErrorInnerTwinNormal_Four(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157558,8 +157480,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedErrorInnerTwinRustAsync_Four(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157574,8 +157494,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedErrorInnerTwinRustAsyncSse_Four(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157590,8 +157508,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedErrorInnerTwinSse_Four(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157606,8 +157522,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedErrorInnerTwinSync_Four(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157622,8 +157536,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedErrorInnerTwinSyncSse_Four(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157639,8 +157551,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_inner_twin_normal( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157656,8 +157566,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_inner_twin_rust_async( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157673,8 +157581,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_inner_twin_rust_async_sse( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157690,8 +157596,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_inner_twin_sse( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157707,8 +157611,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_inner_twin_sync( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157724,8 +157626,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_inner_twin_sync_sse( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -157997,8 +157897,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case DistanceTwinNormal_Map(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158012,8 +157910,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case DistanceTwinRustAsync_Map(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158027,8 +157923,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case DistanceTwinRustAsyncSse_Map(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158042,8 +157936,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case DistanceTwinSse_Map(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158057,8 +157949,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case DistanceTwinSync_Map(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158072,8 +157962,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case DistanceTwinSyncSse_Map(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158184,8 +158072,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumDartOpaqueTwinNormal_Opaque(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_DartOpaque(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158200,8 +158086,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumDartOpaqueTwinRustAsync_Opaque(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_DartOpaque(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158216,8 +158100,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumDartOpaqueTwinRustAsyncSse_Opaque(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_DartOpaque(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158232,8 +158114,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumDartOpaqueTwinSse_Opaque(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_DartOpaque(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158248,8 +158128,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumDartOpaqueTwinSync_Opaque(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_DartOpaque(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158264,8 +158142,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumDartOpaqueTwinSyncSse_Opaque(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_DartOpaque(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158291,8 +158167,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinMoi(field0, serializer); case EnumOpaqueTwinMoi_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158325,8 +158199,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinNormal(field0, serializer); case EnumOpaqueTwinNormal_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158359,8 +158231,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinRustAsync(field0, serializer); case EnumOpaqueTwinRustAsync_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158395,8 +158265,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { field0, serializer); case EnumOpaqueTwinRustAsyncMoi_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158431,8 +158299,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { field0, serializer); case EnumOpaqueTwinRustAsyncSse_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158468,8 +158334,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { field0, serializer); case EnumOpaqueTwinRustAsyncSseMoi_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158502,8 +158366,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinSse(field0, serializer); case EnumOpaqueTwinSse_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158536,8 +158398,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinSseMoi(field0, serializer); case EnumOpaqueTwinSseMoi_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158570,8 +158430,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinSync(field0, serializer); case EnumOpaqueTwinSync_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158604,8 +158462,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinSyncMoi(field0, serializer); case EnumOpaqueTwinSyncMoi_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158638,8 +158494,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinSyncSse(field0, serializer); case EnumOpaqueTwinSyncSse_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158672,8 +158526,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinSyncSseMoi(field0, serializer); case EnumOpaqueTwinSyncSseMoi_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -158780,8 +158632,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinMoi( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158797,8 +158647,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158814,8 +158662,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinRustAsync( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158831,8 +158677,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinRustAsyncMoi( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158848,8 +158692,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinRustAsyncSse( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158867,8 +158709,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinRustAsyncSseMoi( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158884,8 +158724,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinSse( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158901,8 +158739,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinSseMoi( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158918,8 +158754,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinSync( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158935,8 +158769,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinSyncMoi( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158952,8 +158784,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinSyncSse( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158969,8 +158799,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinSyncSseMoi( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -158987,8 +158815,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemMixedTwinNormal_C(cField: final cField): sse_encode_i_32(2, serializer); sse_encode_String(cField, serializer); - default: - throw UnimplementedError(''); } } @@ -159005,8 +158831,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemMixedTwinRustAsync_C(cField: final cField): sse_encode_i_32(2, serializer); sse_encode_String(cField, serializer); - default: - throw UnimplementedError(''); } } @@ -159023,8 +158847,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemMixedTwinRustAsyncSse_C(cField: final cField): sse_encode_i_32(2, serializer); sse_encode_String(cField, serializer); - default: - throw UnimplementedError(''); } } @@ -159041,8 +158863,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemMixedTwinSse_C(cField: final cField): sse_encode_i_32(2, serializer); sse_encode_String(cField, serializer); - default: - throw UnimplementedError(''); } } @@ -159059,8 +158879,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemMixedTwinSync_C(cField: final cField): sse_encode_i_32(2, serializer); sse_encode_String(cField, serializer); - default: - throw UnimplementedError(''); } } @@ -159077,8 +158895,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemMixedTwinSyncSse_C(cField: final cField): sse_encode_i_32(2, serializer); sse_encode_String(cField, serializer); - default: - throw UnimplementedError(''); } } @@ -159093,8 +158909,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemStructTwinNormal_B(bField: final bField): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(bField, serializer); - default: - throw UnimplementedError(''); } } @@ -159109,8 +158923,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemStructTwinRustAsync_B(bField: final bField): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(bField, serializer); - default: - throw UnimplementedError(''); } } @@ -159125,8 +158937,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemStructTwinRustAsyncSse_B(bField: final bField): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(bField, serializer); - default: - throw UnimplementedError(''); } } @@ -159141,8 +158951,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemStructTwinSse_B(bField: final bField): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(bField, serializer); - default: - throw UnimplementedError(''); } } @@ -159157,8 +158965,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemStructTwinSync_B(bField: final bField): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(bField, serializer); - default: - throw UnimplementedError(''); } } @@ -159173,8 +158979,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemStructTwinSyncSse_B(bField: final bField): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(bField, serializer); - default: - throw UnimplementedError(''); } } @@ -159189,8 +158993,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemTupleTwinNormal_B(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -159205,8 +159007,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemTupleTwinRustAsync_B(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -159221,8 +159021,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemTupleTwinRustAsyncSse_B(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -159237,8 +159035,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemTupleTwinSse_B(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -159253,8 +159049,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemTupleTwinSync_B(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -159269,8 +159063,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemTupleTwinSyncSse_B(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -159693,8 +159485,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case KitchenSinkTwinNormal_Enums(field0: final field0): sse_encode_i_32(5, serializer); sse_encode_weekdays_twin_normal(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -159734,8 +159524,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case KitchenSinkTwinRustAsync_Enums(field0: final field0): sse_encode_i_32(5, serializer); sse_encode_weekdays_twin_rust_async(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -159775,8 +159563,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case KitchenSinkTwinRustAsyncSse_Enums(field0: final field0): sse_encode_i_32(5, serializer); sse_encode_weekdays_twin_rust_async_sse(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -159816,8 +159602,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case KitchenSinkTwinSse_Enums(field0: final field0): sse_encode_i_32(5, serializer); sse_encode_weekdays_twin_sse(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -159857,8 +159641,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case KitchenSinkTwinSync_Enums(field0: final field0): sse_encode_i_32(5, serializer); sse_encode_weekdays_twin_sync(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -159898,8 +159680,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case KitchenSinkTwinSyncSse_Enums(field0: final field0): sse_encode_i_32(5, serializer); sse_encode_weekdays_twin_sync_sse(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -162095,8 +161875,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case MeasureTwinNormal_Distance(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_box_distance_twin_normal(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -162111,8 +161889,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case MeasureTwinRustAsync_Distance(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_box_distance_twin_rust_async(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -162127,8 +161903,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case MeasureTwinRustAsyncSse_Distance(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_box_distance_twin_rust_async_sse(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -162143,8 +161917,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case MeasureTwinSse_Distance(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_box_distance_twin_sse(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -162159,8 +161931,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case MeasureTwinSync_Distance(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_box_distance_twin_sync(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -162175,8 +161945,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case MeasureTwinSyncSse_Distance(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_box_distance_twin_sync_sse(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -164597,8 +164365,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(2, serializer); sse_encode_box_autoadd_list_of_nested_raw_string_mirrored( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165236,8 +165002,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SimpleEnumTwinNormal_Second(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165251,8 +165015,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SimpleEnumTwinRustAsync_Second(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165266,8 +165028,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SimpleEnumTwinRustAsyncSse_Second(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165281,8 +165041,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SimpleEnumTwinSse_Second(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165296,8 +165054,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SimpleEnumTwinSync_Second(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165311,8 +165067,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SimpleEnumTwinSyncSse_Second(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165459,8 +165213,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructTwoWithTraitForDynTwinNormal( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165524,8 +165276,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SpeedTwinNormal_GPS(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165539,8 +165289,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SpeedTwinRustAsync_GPS(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165554,8 +165302,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SpeedTwinRustAsyncSse_GPS(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165568,8 +165314,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SpeedTwinSse_GPS(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165583,8 +165327,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SpeedTwinSync_GPS(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -165598,8 +165340,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SpeedTwinSyncSse_GPS(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } 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 17ff863bb6..55e536e17d 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 @@ -68412,8 +68412,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case AbcTwinNormal_JustInt(field0: final field0): sse_encode_i_32(3, serializer); sse_encode_i_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -68434,8 +68432,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case AbcTwinRustAsync_JustInt(field0: final field0): sse_encode_i_32(3, serializer); sse_encode_i_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -68455,8 +68451,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case AbcTwinSync_JustInt(field0: final field0): sse_encode_i_32(3, serializer); sse_encode_i_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -68518,8 +68512,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(y, serializer); case ApplicationMessage_Exit(): sse_encode_i_32(2, serializer); - default: - throw UnimplementedError(''); } } @@ -68591,8 +68583,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMyNodeTwinNormal( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -68625,8 +68615,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(field, serializer); case BasicGeneralEnumTwinNormal_Orange(): sse_encode_i_32(1, serializer); - default: - throw UnimplementedError(''); } } @@ -68640,8 +68628,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(field, serializer); case BasicGeneralEnumTwinRustAsync_Orange(): sse_encode_i_32(1, serializer); - default: - throw UnimplementedError(''); } } @@ -68655,8 +68641,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_String(field, serializer); case BasicGeneralEnumTwinSync_Orange(): sse_encode_i_32(1, serializer); - default: - throw UnimplementedError(''); } } @@ -70766,8 +70750,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(message, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -70790,8 +70772,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(message, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -70814,8 +70794,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(message, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -70832,8 +70810,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(e, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -70856,8 +70832,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(e, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -70874,8 +70848,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_u_32(e, serializer); sse_encode_Backtrace(backtrace, serializer); - default: - throw UnimplementedError(''); } } @@ -70891,8 +70863,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_2_twin_normal( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -70908,8 +70878,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_2_twin_rust_async( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -70925,8 +70893,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_2_twin_sync( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -70943,8 +70909,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -70961,8 +70925,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -70977,8 +70939,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedError2TwinSync_CustomNested2Number(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -70993,8 +70953,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedErrorInnerTwinNormal_Four(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71009,8 +70967,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedErrorInnerTwinRustAsync_Four(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71025,8 +70981,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case CustomNestedErrorInnerTwinSync_Four(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_u_32(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71042,8 +70996,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_inner_twin_normal( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71059,8 +71011,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_inner_twin_rust_async( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71076,8 +71026,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_box_autoadd_custom_nested_error_inner_twin_sync( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71216,8 +71164,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case DistanceTwinNormal_Map(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71231,8 +71177,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case DistanceTwinRustAsync_Map(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71246,8 +71190,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case DistanceTwinSync_Map(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71310,8 +71252,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumDartOpaqueTwinNormal_Opaque(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_DartOpaque(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71326,8 +71266,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumDartOpaqueTwinRustAsync_Opaque(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_DartOpaque(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71342,8 +71280,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumDartOpaqueTwinSync_Opaque(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_DartOpaque(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71369,8 +71305,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinNormal(field0, serializer); case EnumOpaqueTwinNormal_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -71403,8 +71337,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinRustAsync(field0, serializer); case EnumOpaqueTwinRustAsync_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -71437,8 +71369,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_RustOpaque_RwLockHideDataTwinSync(field0, serializer); case EnumOpaqueTwinSync_Nothing(): sse_encode_i_32(5, serializer); - default: - throw UnimplementedError(''); } } @@ -71503,8 +71433,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinNormal( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71520,8 +71448,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinRustAsync( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71537,8 +71463,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerNonCloneSimpleTwinSync( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71555,8 +71479,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemMixedTwinNormal_C(cField: final cField): sse_encode_i_32(2, serializer); sse_encode_String(cField, serializer); - default: - throw UnimplementedError(''); } } @@ -71573,8 +71495,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemMixedTwinRustAsync_C(cField: final cField): sse_encode_i_32(2, serializer); sse_encode_String(cField, serializer); - default: - throw UnimplementedError(''); } } @@ -71591,8 +71511,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemMixedTwinSync_C(cField: final cField): sse_encode_i_32(2, serializer); sse_encode_String(cField, serializer); - default: - throw UnimplementedError(''); } } @@ -71607,8 +71525,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemStructTwinNormal_B(bField: final bField): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(bField, serializer); - default: - throw UnimplementedError(''); } } @@ -71623,8 +71539,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemStructTwinRustAsync_B(bField: final bField): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(bField, serializer); - default: - throw UnimplementedError(''); } } @@ -71639,8 +71553,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemStructTwinSync_B(bField: final bField): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(bField, serializer); - default: - throw UnimplementedError(''); } } @@ -71655,8 +71567,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemTupleTwinNormal_B(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71671,8 +71581,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemTupleTwinRustAsync_B(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71687,8 +71595,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case EnumWithItemTupleTwinSync_B(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_list_prim_i_32_strict(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71954,8 +71860,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case KitchenSinkTwinNormal_Enums(field0: final field0): sse_encode_i_32(5, serializer); sse_encode_weekdays_twin_normal(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -71995,8 +71899,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case KitchenSinkTwinRustAsync_Enums(field0: final field0): sse_encode_i_32(5, serializer); sse_encode_weekdays_twin_rust_async(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -72036,8 +71938,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case KitchenSinkTwinSync_Enums(field0: final field0): sse_encode_i_32(5, serializer); sse_encode_weekdays_twin_sync(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -73345,8 +73245,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case MeasureTwinNormal_Distance(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_box_distance_twin_normal(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -73361,8 +73259,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case MeasureTwinRustAsync_Distance(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_box_distance_twin_rust_async(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -73377,8 +73273,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case MeasureTwinSync_Distance(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_box_distance_twin_sync(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -74694,8 +74588,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(2, serializer); sse_encode_box_autoadd_list_of_nested_raw_string_mirrored( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -75085,8 +74977,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SimpleEnumTwinNormal_Second(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -75100,8 +74990,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SimpleEnumTwinRustAsync_Second(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -75115,8 +75003,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SimpleEnumTwinSync_Second(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_String(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -75200,8 +75086,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_i_32(1, serializer); sse_encode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerStructTwoWithTraitForDynTwinNormal( field0, serializer); - default: - throw UnimplementedError(''); } } @@ -75244,8 +75128,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SpeedTwinNormal_GPS(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -75259,8 +75141,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SpeedTwinRustAsync_GPS(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } @@ -75274,8 +75154,6 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { case SpeedTwinSync_GPS(field0: final field0): sse_encode_i_32(1, serializer); sse_encode_f_64(field0, serializer); - default: - throw UnimplementedError(''); } } diff --git a/tools/frb_internal/lib/src/makefile_dart/generate.dart b/tools/frb_internal/lib/src/makefile_dart/generate.dart index 6dc4ffeeb3..46c65425b9 100644 --- a/tools/frb_internal/lib/src/makefile_dart/generate.dart +++ b/tools/frb_internal/lib/src/makefile_dart/generate.dart @@ -176,6 +176,7 @@ Future generateInternalBookHelp(GenerateConfig config) async { relativePwd: 'frb_codegen', coverage: config.coverage, coverageName: 'GenerateInternalBookHelp', + extraEnv: {'RUST_LOG': 'error'}, ); File('${exec.pwd}website/docs/generated/_frb-codegen-command-${cmd.isEmpty ? "main" : cmd}.mdx') .writeAsStringSync('```\n${resp.stdout}```'); @@ -379,17 +380,18 @@ Future executeFrbCodegen( bool postRelease = false, required String coverageName, bool nightly = false, + Map? extraEnv, }) async { if (postRelease) { assert(!coverage); return await exec('flutter_rust_bridge_codegen $cmd', - relativePwd: relativePwd); + relativePwd: relativePwd, extraEnv: extraEnv); } else { final outputCodecovPath = '${getCoverageDir(coverageName)}/codecov.json'; final ans = await exec( 'cargo ${nightly ? "+nightly" : ""} ${coverage ? "llvm-cov run --codecov --output-path $outputCodecovPath" : "run"} --manifest-path ${exec.pwd}frb_codegen/Cargo.toml -- $cmd', relativePwd: relativePwd, - extraEnv: {'RUST_BACKTRACE': '1'}, + extraEnv: {'RUST_BACKTRACE': '1', ...?extraEnv}, ); if (coverage) transformCodecovReport(outputCodecovPath); return ans; diff --git a/website/docs/generated/_frb-codegen-command-main.mdx b/website/docs/generated/_frb-codegen-command-main.mdx index d53a5492d7..a88f12585f 100644 --- a/website/docs/generated/_frb-codegen-command-main.mdx +++ b/website/docs/generated/_frb-codegen-command-main.mdx @@ -1,5 +1,5 @@ ``` -High-level memory-safe binding generator for Flutter/Dart <-> Rust +Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple Usage: flutter_rust_bridge_codegen [OPTIONS]