Skip to content

library "librust_lib_my_app.so" not found on flutter 3.32.0 Android #2739

@deretame

Description

@deretame

Describe the bug

E/flutter ( 2704): [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'librust_lib_my_app.so': dlopen failed: library "librust_lib_my_app.so" not found
E/flutter ( 2704): #0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:43)
E/flutter ( 2704): #1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:22:12)
E/flutter ( 2704): #2      new ExternalLibrary.open (package:flutter_rust_bridge/src/platform_types/_io.dart:42:47)
E/flutter ( 2704): #3      loadExternalLibraryRaw (package:flutter_rust_bridge/src/loader/_io.dart:56:28)
E/flutter ( 2704): #4      loadExternalLibrary (package:flutter_rust_bridge/src/loader/_io.dart:14:10)
E/flutter ( 2704): #5      BaseEntrypoint._loadDefaultExternalLibrary (package:flutter_rust_bridge/src/main_components/entrypoint.dart:141:13)
E/flutter ( 2704): #6      BaseEntrypoint.initImpl (package:flutter_rust_bridge/src/main_components/entrypoint.dart:48:31)
E/flutter ( 2704): #7      RustLib.init (package:my_app/src/rust/frb_generated.dart:27:20)
E/flutter ( 2704): #8      main (package:my_app/main.dart:6:17)
E/flutter ( 2704): #9      _runMain.<anonymous closure> (dart:ui/hooks.dart:320:23)
E/flutter ( 2704): #10     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:314:19)
E/flutter ( 2704): #11     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:193:12)
E/flutter ( 2704):

Steps to reproduce

flutter_rust_bridge_codegen create my_app
flutter run

Logs

⚡windy ❯❯ flutter_rust_bridge_codegen generate
[2025-05-21T05:08:57.787Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\main.rs:25] cli=Cli { verbose: false, command: Generate(GenerateCommandArgs { watch: false, primary: GenerateCommandArgsPrimary { config_file: None, rust_input: None, dart_output: None, c_output: None, duplicated_c_output: None, rust_root: None, rust_output: None, dart_entrypoint_class_name: None, dart_format_line_length: None, dart_preamble: None, rust_preamble: None, no_dart_enums_style: false, no_add_mod_to_lib: false, llvm_path: None, llvm_compiler_opts: None, dart_root: None, no_build_runner: false, extra_headers: None, no_web: false, no_deps_check: false, default_external_library_loader_web_prefix: None, no_dart3: false, full_dep: false, default_rust_opaque_codec: None, local: false, enable_lifetime: false, type_64bit_int: false, no_default_dart_async: false, no_auto_upgrade_dependency: false, parse_const: false, no_dart_format: false, no_dart_fix: false, no_rust_format: false, stop_on_error: false, dump: None, dump_all: false, rust_features: None } }) }
[2025-05-21T05:08:57.788Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\config\config_parser.rs:51] Found config file flutter_rust_bridge.yaml
[2025-05-21T05:08:57.788Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\mod.rs:24] config=Config { base_dir: Some(""), rust_input: Some("crate::api"), dart_output: Some("lib/src/rust"), c_output: None, duplicated_c_output: None, rust_root: Some("rust/"), rust_output: None, dart_entrypoint_class_name: None, dart_format_line_length: None, dart_preamble: None, rust_preamble: None, dart_enums_style: None, add_mod_to_lib: None, llvm_path: None, llvm_compiler_opts: None, dart_root: None, build_runner: None, extra_headers: None, web: None, deps_check: None, dart3: None, full_dep: None, default_rust_opaque_codec: None, local: None, default_external_library_loader_web_prefix: None, dart_type_rename: None, enable_lifetime: None, type_64bit_int: None, default_dart_async: None, auto_upgrade_dependency: None, parse_const: None, dart_format: None, dart_fix: None, rust_format: None, stop_on_error: None, dump: None, dump_all: None, rust_features: None } meta_config=MetaConfig { watch: false }
[2025-05-21T05:08:57.789Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\config\internal_config_parser\mod.rs:34] InternalConfig.parse base_dir="C:\\Users\\windy\\my_app"
[2025-05-21T05:09:01.747Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\mod.rs:27] internal_config=InternalConfig { controller: ControllerInternalConfig { watch: false, watching_paths: ["\\\\?\\C:\\Users\\windy\\my_app\\rust\\src"], exclude_paths: ["\\\\?\\C:\\Users\\windy\\my_app\\rust\\src\\frb_generated.rs"], max_count: None }, preparer: PreparerInternalConfig { dart_root: "\\\\?\\C:\\Users\\windy\\my_app", deps_check: true, needs_ffigen: false }, parser: ParserInternalConfig { hir: ParserHirInternalConfig { rust_input_namespace_pack: RustInputNamespacePack { rust_input_namespace_prefixes: [Namespace { joined_path: "crate::api" }], rust_output_path_namespace: Namespace { joined_path: "crate::frb_generated" } }, rust_crate_dir: "\\\\?\\C:\\Users\\windy\\my_app\\rust", third_party_crate_names: [], rust_features: None, parse_const: false }, mir: ParserMirInternalConfig { rust_input_namespace_pack: RustInputNamespacePack { rust_input_namespace_prefixes: [Namespace { joined_path: "crate::api" }], rust_output_path_namespace: Namespace { joined_path: "crate::frb_generated" } }, force_codec_mode_pack: Some(CodecModePack { dart2rust: Pde, rust2dart: Pde }), default_stream_sink_codec: Sse, default_rust_opaque_codec: Moi, stop_on_error: false, enable_lifetime: false, type_64bit_int: false, default_dart_async: true } }, generator: GeneratorInternalConfig { api_dart: GeneratorApiDartInternalConfig { dart_enums_style: true, dart3: true, dart_decl_base_output_path: "\\\\?\\C:\\Users\\windy\\my_app\\lib\\src\\rust", dart_impl_output_path: TargetOrCommonMap { common: "\\\\?\\C:\\Users\\windy\\my_app\\lib\\src\\rust\\frb_generated.dart", io: "\\\\?\\C:\\Users\\windy\\my_app\\lib\\src\\rust\\frb_generated.io.dart", web: "\\\\?\\C:\\Users\\windy\\my_app\\lib\\src\\rust\\frb_generated.web.dart" }, dart_entrypoint_class_name: "RustLib", dart_preamble: "", dart_type_rename: {} }, wire: GeneratorWireInternalConfig { dart: GeneratorWireDartInternalConfig { has_ffigen: false, web_enabled: true, llvm_path: ["/opt/homebrew/opt/llvm", "/usr/local/opt/llvm", "/usr/lib/llvm-9", "/usr/lib/llvm-10", "/usr/lib/llvm-11", "/usr/lib/llvm-12", "/usr/lib/llvm-13", "/usr/lib/llvm-14", "/usr/lib/", "/usr/lib64/", "C:/Program Files/llvm", "C:/msys64/mingw64"], llvm_compiler_opts: "", dart_root: "\\\\?\\C:\\Users\\windy\\my_app", extra_headers: "", dart_impl_output_path: TargetOrCommonMap { common: "\\\\?\\C:\\Users\\windy\\my_app\\lib\\src\\rust\\frb_generated.dart", io: "\\\\?\\C:\\Users\\windy\\my_app\\lib\\src\\rust\\frb_generated.io.dart", web: "\\\\?\\C:\\Users\\windy\\my_app\\lib\\src\\rust\\frb_generated.web.dart" }, dart_output_class_name_pack: DartOutputClassNamePack { entrypoint_class_name: "RustLib", api_class_name: "RustLibApi", api_impl_class_name: "RustLibApiImpl", api_impl_platform_class_name: "RustLibApiImplPlatform", wire_class_name: "RustLibWire", wasm_module_name: "RustLibWasmModule" }, default_external_library_loader: GeneratorWireDartDefaultExternalLibraryLoaderInternalConfig { stem: "rust_lib_my_app", io_directory: "rust/target/release/", web_prefix: "pkg/" }, c_symbol_prefix: "frbgen_my_app_" }, rust: GeneratorWireRustInternalConfig { rust_crate_dir: "\\\\?\\C:\\Users\\windy\\my_app\\rust", web_enabled: true, rust_output_path: "\\\\?\\C:\\Users\\windy\\my_app\\rust\\src\\frb_generated.rs", c_symbol_prefix: "frbgen_my_app_", has_ffigen: false, default_stream_sink_codec: Sse, default_rust_opaque_codec: Moi, rust_preamble: "" }, c: GeneratorWireCInternalConfig { enable: false, rust_crate_dir: "\\\\?\\C:\\Users\\windy\\my_app\\rust", rust_output_path: "\\\\?\\C:\\Users\\windy\\my_app\\rust\\src\\frb_generated.rs", c_output_path: None, c_symbol_prefix: "frbgen_my_app_" } } }, polisher: PolisherInternalConfig { duplicated_c_output_path: [], dart_format_line_length: 80, dart_format: true, dart_fix: true, rust_format: true, add_mod_to_lib: true, build_runner: true, web_enabled: true, dart_output: "\\\\?\\C:\\Users\\windy\\my_app\\lib\\src\\rust", dart_root: "\\\\?\\C:\\Users\\windy\\my_app", rust_crate_dir: "\\\\?\\C:\\Users\\windy\\my_app\\rust", rust_output_path: "\\\\?\\C:\\Users\\windy\\my_app\\rust\\src\\frb_generated.rs", c_output_path: None, enable_auto_upgrade: true }, dumper: DumperInternalConfig { dump_contents: [], dump_directory: "\\\\?\\C:\\Users\\windy\\my_app\\rust\\target\\frb_dump" } }
[2025-05-21T05:09:01.748Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\utils\dart_repository\dart_repo.rs:21] Guessing toolchain the runner is run into
[2025-05-21T05:09:01.749Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:137] execute command: bin=powershell args="-noprofile -command & \"fvm\" \"--version\"" current_dir=None cmd="powershell" "-noprofile" "-command" "& \"fvm\" \"--version\""
[2025-05-21T05:09:02.108Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:148] command="powershell" "-noprofile" "-command" "& \"fvm\" \"--version\"" stdout=3.2.1
 stderr=
[2025-05-21T05:09:02.109Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:137] execute command: bin=powershell args="-noprofile -command & \"fvm\" \"flutter\" \"--version\"" current_dir=None cmd="powershell" "-noprofile" "-command" "& \"fvm\" \"flutter\" \"--version\""
[2025-05-21T05:09:04.512Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:148] command="powershell" "-noprofile" "-command" "& \"fvm\" \"flutter\" \"--version\"" stdout=Flutter 3.32.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision be698c48a6 (33 hours ago) • 2025-05-19 12:59:14 -0700
Engine • revision 1881800949 (35 hours ago) • 2025-05-19 10:54:07 -0700
Tools • Dart 3.8.0 • DevTools 2.45.1
 stderr=
[2025-05-21T05:09:04.514Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\cargo_expand\mod.rs:27] run_cargo_expand manifest_dir= rust_crate_dir="\\\\?\\C:\\Users\\windy\\my_app\\rust"
[2025-05-21T05:09:04.514Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\cargo_expand\real.rs:65] Running cargo expand in '"\\\\?\\C:\\Users\\windy\\my_app\\rust"'
[2025-05-21T05:09:04.515Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:137] execute command: bin=cargo args="expand --lib --theme=none --ugly" current_dir=Some("\\\\?\\C:\\Users\\windy\\my_app\\rust") cmd="cargo" "expand" "--lib" "--theme=none" "--ugly"
[2025-05-21T05:09:24.383Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:148] command="cargo" "expand" "--lib" "--theme=none" "--ugly" stdout=#![feature(prelude_import)]
#[prelude_import]
use std::prelude::rust_2021::*;
#[macro_use]
extern crate std;
pub mod api {
    pub mod simple {
        #[doc = "frb_encoded(235b6672622873796e63295d)"]
        pub fn greet(name: String) -> String {
            ::alloc::__export::must_use({
                    let res =
                        ::alloc::fmt::format(format_args!("Hello, {0}!", name));
                    res
                })
        }
        #[doc = "frb_encoded(235b66726228696e6974295d)"]
        pub fn init_app() { flutter_rust_bridge::setup_default_user_utils(); }
    }
}
mod frb_generated {
    #![allow(non_camel_case_types, unused, non_snake_case,
    clippy::needless_return, clippy::redundant_closure_call,
    clippy::redundant_closure, clippy::useless_conversion, clippy::unit_arg,
    clippy::unused_unit, clippy::double_parens, clippy::let_and_return,
    clippy::too_many_arguments, clippy::match_single_binding,
    clippy::clone_on_copy, clippy::let_unit_value, clippy::deref_addrof,
    clippy::explicit_auto_deref, clippy::borrow_deref_ref,
    clippy::needless_borrow)]
    use flutter_rust_bridge::for_generated::byteorder::{
        NativeEndian, ReadBytesExt, WriteBytesExt,
    };
    use flutter_rust_bridge::for_generated::{
        transform_result_dco, Lifetimeable, Lockable,
    };
    use flutter_rust_bridge::{Handler, IntoIntoDart};
    #[doc(hidden)]
    pub(crate) struct FrbWrapper<T>(T);
    impl<T: Clone> Clone for FrbWrapper<T> {
        fn clone(&self) -> Self { FrbWrapper(self.0.clone()) }
    }
    impl<T: PartialEq> PartialEq for FrbWrapper<T> {
        fn eq(&self, other: &Self) -> bool { self.0.eq(&other.0) }
    }
    impl<T: Eq> Eq for FrbWrapper<T> {}
    impl<T: std::hash::Hash> std::hash::Hash for FrbWrapper<T> {
        fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
            self.0.hash(state)
        }
    }
    impl<T> From<T> for FrbWrapper<T> {
        fn from(t: T) -> Self { FrbWrapper(t) }
    }
    use std::collections::HashMap;
    use std::marker::PhantomData;
    use std::sync::Arc;
    pub struct MoiArc<T: ?Sized + MoiArcValue> {
        object_id: Option<ObjectId>,
        value: Option<Arc<T>>,
        _phantom: PhantomData<T>,
    }
    #[automatically_derived]
    impl<T: ::core::fmt::Debug + ?Sized + MoiArcValue> ::core::fmt::Debug for
        MoiArc<T> {
        #[inline]
        fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
            ::core::fmt::Formatter::debug_struct_field3_finish(f, "MoiArc",
                "object_id", &self.object_id, "value", &self.value,
                "_phantom", &&self._phantom)
        }
    }
    impl<T: ?Sized + MoiArcValue> Drop for MoiArc<T> {
        fn drop(&mut self) {
            if let Some(object_id) = self.object_id {
                    Self::decrement_strong_count(object_id);
                }
        }
    }
    impl<T: ?Sized + MoiArcValue> AsRef<T> for MoiArc<T> {
        fn as_ref(&self) -> &T { self.value.as_ref().unwrap().as_ref() }
    }
    impl<T: ?Sized + MoiArcValue>
        ::flutter_rust_bridge::for_generated::BaseArc<T> for MoiArc<T> {
        fn new(value: T) -> Self where T: Sized {
            let mut pool = T::get_pool().write().unwrap();
            let object_id = pool.id_generator.next_id();
            let value = Arc::new(value);
            let old_value =
                pool.map.insert(object_id,
                    MoiArcPoolValue { ref_count: 1, value: value.clone() });
            if !old_value.is_none() {
                    ::core::panicking::panic("assertion failed: old_value.is_none()")
                };
            Self {
                object_id: Some(object_id),
                value: Some(value),
                _phantom: PhantomData,
            }
        }
        fn try_unwrap(mut self) -> Result<T, Self> where T: Sized {
            let pool = &mut T::get_pool().write().unwrap();
            if pool.map.get(&self.object_id.unwrap()).unwrap().ref_count == 1
                    {
                    Self::decrement_strong_count_raw(self.object_id.unwrap(),
                        pool);
                    self.object_id.take().unwrap();
                    Ok(Arc::into_inner(self.value.take().unwrap()).unwrap())
                } else { Err(self) }
        }
        fn into_inner(self) -> Option<T> where T: Sized {
            self.try_unwrap().ok()
        }
        fn into_raw(mut self) -> usize { self.object_id.take().unwrap() }
    }
    impl<T: ?Sized + MoiArcValue> Clone for MoiArc<T> {
        fn clone(&self) -> Self {
            Self::increment_strong_count(self.object_id.unwrap());
            Self {
                object_id: self.object_id,
                value: self.value.clone(),
                _phantom: PhantomData,
            }
        }
    }
    impl<T: ?Sized + MoiArcValue> MoiArc<T> {
        pub(crate) fn from_raw(raw: usize) -> Self where T: Sized {
            let map = &T::get_pool().read().unwrap().map;
            Self {
                object_id: Some(raw),
                value: Some(map.get(&raw).unwrap().value.clone()),
                _phantom: PhantomData,
            }
        }
        pub fn increment_strong_count(raw: usize) {
            let map = &mut T::get_pool().write().unwrap().map;
            map.get_mut(&raw).unwrap().ref_count += 1;
        }
        pub fn decrement_strong_count(raw: usize) {
            let mut pool = T::get_pool().write().unwrap();
            let object = Self::decrement_strong_count_raw(raw, &mut pool);
            drop(pool);
            drop(object);
        }
        fn decrement_strong_count_raw(raw: usize,
            pool: &mut MoiArcPoolInner<T>) -> Option<MoiArcPoolValue<T>> {
            let value = pool.map.get_mut(&raw).unwrap();
            value.ref_count -= 1;
            if value.ref_count == 0 { pool.map.remove(&raw) } else { None }
        }
    }
    pub trait MoiArcValue: 'static {
        fn get_pool()
        -> &'static MoiArcPool<Self>;
    }
    type ObjectId = usize;
    pub type MoiArcPool<T> = std::sync::RwLock<MoiArcPoolInner<T>>;
    pub struct MoiArcPoolInner<T: ?Sized> {
        map: HashMap<ObjectId, MoiArcPoolValue<T>>,
        id_generator: IdGenerator,
    }
    impl<T: ?Sized> Default for MoiArcPoolInner<T> {
        fn default() -> Self {
            Self { map: HashMap::new(), id_generator: Default::default() }
        }
    }
    struct IdGenerator {
        next_id: ObjectId,
    }
    impl Default for IdGenerator {
        fn default() -> Self { Self { next_id: Self::MIN_ID } }
    }
    impl IdGenerator {
        const MIN_ID: ObjectId = 1;
        const MAX_ID: ObjectId = 2147483600;
        fn next_id(&mut self) -> ObjectId {
            let ans = self.next_id;
            self.next_id =
                if self.next_id >= Self::MAX_ID {
                        Self::MIN_ID
                    } else { self.next_id + 1 };
            ans
        }
    }
    impl<T: ?Sized> MoiArcPoolInner<T> {}
    struct MoiArcPoolValue<T: ?Sized> {
        ref_count: i32,
        value: Arc<T>,
    }
    use ::flutter_rust_bridge::for_generated::decode_rust_opaque_nom;
    fn decode_rust_opaque_moi<T: MoiArcValue + Send + Sync>(ptr: usize)
        -> RustOpaqueMoi<T> {
        RustOpaqueMoi::from_arc(MoiArc::<T>::from_raw(ptr))
    }
    use ::flutter_rust_bridge::for_generated::StdArc;
    use ::flutter_rust_bridge::RustOpaqueNom;
    /// Please refer to `RustOpaque` for doc.
    pub type RustOpaqueMoi<T> =
        ::flutter_rust_bridge::for_generated::RustOpaqueBase<T, MoiArc<T>>;
    /// A wrapper to support [arbitrary Rust types](https://cjycode.com/flutter_rust_bridge/guides/types/arbitrary).
    pub type RustOpaque<T> = RustOpaqueMoi<T>;
    use ::flutter_rust_bridge::RustAutoOpaqueNom;
    /// Please refer to `RustAutoOpaque` for doc.
    pub type RustAutoOpaqueMoi<T> =
        ::flutter_rust_bridge::for_generated::RustAutoOpaqueBase<T,
        MoiArc<::flutter_rust_bridge::for_generated::RustAutoOpaqueInner<T>>>;
    /// Usually this is unneeded, and just write down arbitrary types.
    /// However, when you need arbitrary types at places that are not supported yet,
    /// use `RustOpaqueOpaque<YourArbitraryType>`.
    pub type RustAutoOpaque<T> = RustAutoOpaqueMoi<T>;
    pub trait CstDecode<T> {
        fn cst_decode(self)
        -> T;
    }
    impl<T, S> CstDecode<Option<T>> for *mut S where *mut S: CstDecode<T> {
        fn cst_decode(self) -> Option<T> {
            (!self.is_null()).then(|| self.cst_decode())
        }
    }
    pub trait SseDecode {
        fn sse_decode(deserializer:
            &mut ::flutter_rust_bridge::for_generated::SseDeserializer)
        -> Self;
    }
    pub trait SseEncode {
        fn sse_encode(self,
        serializer: &mut ::flutter_rust_bridge::for_generated::SseSerializer);
    }
    fn transform_result_sse<T, E>(raw: Result<T, E>)
        ->
            Result<::flutter_rust_bridge::for_generated::Rust2DartMessageSse,
            ::flutter_rust_bridge::for_generated::Rust2DartMessageSse> where
        T: SseEncode, E: SseEncode {
        use ::flutter_rust_bridge::for_generated::{Rust2DartAction, SseCodec};
        match raw {
            Ok(raw) =>
                Ok(SseCodec::encode(Rust2DartAction::Success,
                        |serializer| { raw.sse_encode(serializer) })),
            Err(raw) =>
                Err(SseCodec::encode(Rust2DartAction::Error,
                        |serializer| { raw.sse_encode(serializer) })),
        }
    }
    pub struct StreamSink<T,
        Rust2DartCodec: ::flutter_rust_bridge::for_generated::BaseCodec =
        ::flutter_rust_bridge::for_generated::SseCodec> {
        base: ::flutter_rust_bridge::for_generated::StreamSinkBase<T,
        Rust2DartCodec>,
    }
    #[automatically_derived]
    impl<T: ::core::clone::Clone, Rust2DartCodec: ::core::clone::Clone +
        ::flutter_rust_bridge::for_generated::BaseCodec> ::core::clone::Clone
        for StreamSink<T, Rust2DartCodec> {
        #[inline]
        fn clone(&self) -> StreamSink<T, Rust2DartCodec> {
            StreamSink { base: ::core::clone::Clone::clone(&self.base) }
        }
    }
    impl<T, Rust2DartCodec: ::flutter_rust_bridge::for_generated::BaseCodec>
        StreamSink<T, Rust2DartCodec> {
        pub fn deserialize(raw: String) -> Self {
            Self {
                base: ::flutter_rust_bridge::for_generated::StreamSinkBase::deserialize(raw),
            }
        }
    }
    impl<T> StreamSink<T, ::flutter_rust_bridge::for_generated::DcoCodec> {
        pub fn add<T2>(&self, value: T)
            -> Result<(), ::flutter_rust_bridge::Rust2DartSendError> where
            T: ::flutter_rust_bridge::IntoIntoDart<T2>,
            T2: ::flutter_rust_bridge::IntoDart {
            self.add_raw(::flutter_rust_bridge::for_generated::Rust2DartAction::Success,
                value)
        }
        pub fn add_error<TR, T2>(&self, value: TR)
            -> Result<(), ::flutter_rust_bridge::Rust2DartSendError> where
            TR: ::flutter_rust_bridge::IntoIntoDart<T2>,
            T2: ::flutter_rust_bridge::IntoDart {
            self.add_raw(::flutter_rust_bridge::for_generated::Rust2DartAction::Error,
                value)
        }
        fn add_raw<TR,
            T2>(&self,
            action: ::flutter_rust_bridge::for_generated::Rust2DartAction,
            value: TR)
            -> Result<(), ::flutter_rust_bridge::Rust2DartSendError> where
            TR: ::flutter_rust_bridge::IntoIntoDart<T2>,
            T2: ::flutter_rust_bridge::IntoDart {
            self.base.add_raw(::flutter_rust_bridge::for_generated::DcoCodec::encode(action,
                    value.into_into_dart()))
        }
    }
    impl<T> StreamSink<T, ::flutter_rust_bridge::for_generated::SseCodec>
        where T: SseEncode {
        pub fn add(&self, value: T)
            -> Result<(), ::flutter_rust_bridge::Rust2DartSendError> {
            self.add_raw(::flutter_rust_bridge::for_generated::Rust2DartAction::Success,
                value)
        }
        pub fn add_error<TR: SseEncode>(&self, value: TR)
            -> Result<(), ::flutter_rust_bridge::Rust2DartSendError> {
            self.add_raw(::flutter_rust_bridge::for_generated::Rust2DartAction::Error,
                value)
        }
        pub fn add_raw<TR: SseEncode>(&self,
            action: ::flutter_rust_bridge::for_generated::Rust2DartAction,
            value: TR)
            -> Result<(), ::flutter_rust_bridge::Rust2DartSendError> {
            self.base.add_raw(::flutter_rust_bridge::for_generated::SseCodec::encode(action,
                    |serializer| value.sse_encode(serializer)))
        }
    }
    impl<T, Rust2DartCodec: ::flutter_rust_bridge::for_generated::BaseCodec>
        ::flutter_rust_bridge::IntoIntoDart<StreamSink<T, Rust2DartCodec>> for
        StreamSink<T, Rust2DartCodec> {
        fn into_into_dart(self) -> StreamSink<T, Rust2DartCodec> {
            ::core::panicking::panic("internal error: entered unreachable code")
        }
    }
    impl<T, Rust2DartCodec: ::flutter_rust_bridge::for_generated::BaseCodec>
        ::flutter_rust_bridge::IntoDart for StreamSink<T, Rust2DartCodec> {
        fn into_dart(self) -> ::flutter_rust_bridge::for_generated::DartAbi {
            ::core::panicking::panic("internal error: entered unreachable code")
        }
    }
    pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.10.0";
    pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 =
        -1918914929;
    #[allow(missing_copy_implementations)]
    #[allow(non_camel_case_types)]
    #[allow(dead_code)]
    pub struct FLUTTER_RUST_BRIDGE_HANDLER {
        __private_field: (),
    }
    #[doc(hidden)]
    pub static FLUTTER_RUST_BRIDGE_HANDLER: FLUTTER_RUST_BRIDGE_HANDLER =
        FLUTTER_RUST_BRIDGE_HANDLER { __private_field: () };
    impl ::lazy_static::__Deref for FLUTTER_RUST_BRIDGE_HANDLER {
        type Target =
            ::flutter_rust_bridge::DefaultHandler<::flutter_rust_bridge::for_generated::SimpleThreadPool>;
        fn deref(&self)
            ->
                &::flutter_rust_bridge::DefaultHandler<::flutter_rust_bridge::for_generated::SimpleThreadPool> {
            #[inline(always)]
            fn __static_ref_initialize()
                ->
                    ::flutter_rust_bridge::DefaultHandler<::flutter_rust_bridge::for_generated::SimpleThreadPool> {
                {
                    match (&FLUTTER_RUST_BRIDGE_CODEGEN_VERSION,
                            &flutter_rust_bridge::for_generated::FLUTTER_RUST_BRIDGE_RUNTIME_VERSION)
                        {
                        (left_val, right_val) => {
                            if !(*left_val == *right_val) {
                                    let kind = ::core::panicking::AssertKind::Eq;
                                    ::core::panicking::assert_failed(kind, &*left_val,
                                        &*right_val,
                                        ::core::option::Option::Some(format_args!("Please ensure flutter_rust_bridge\'s codegen ({0}) and runtime ({1}) versions are the same",
                                                FLUTTER_RUST_BRIDGE_CODEGEN_VERSION,
                                                flutter_rust_bridge::for_generated::FLUTTER_RUST_BRIDGE_RUNTIME_VERSION)));
                                }
                        }
                    };
                    ::flutter_rust_bridge::DefaultHandler::new_simple(Default::default())
                }
            }
            #[inline(always)]
            fn __stability()
                ->
                    &'static ::flutter_rust_bridge::DefaultHandler<::flutter_rust_bridge::for_generated::SimpleThreadPool> {
                static LAZY:
                    ::lazy_static::lazy::Lazy<::flutter_rust_bridge::DefaultHandler<::flutter_rust_bridge::for_generated::SimpleThreadPool>>
                    =
                    ::lazy_static::lazy::Lazy::INIT;
                LAZY.get(__static_ref_initialize)
            }
            __stability()
        }
    }
    impl ::lazy_static::LazyStatic for FLUTTER_RUST_BRIDGE_HANDLER {
        fn initialize(lazy: &Self) { let _ = &**lazy; }
    }
    fn wire__crate__api__simple__greet_impl(ptr_:
            flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
        rust_vec_len_: i32, data_len_: i32)
        -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
        FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::SseCodec,
            _>(flutter_rust_bridge::for_generated::TaskInfo {
                debug_name: "greet",
                port: None,
                mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
            },
            move ||
                {
                    let message =
                        unsafe {
                            flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_,
                                rust_vec_len_, data_len_)
                        };
                    let mut deserializer =
                        flutter_rust_bridge::for_generated::SseDeserializer::new(message);
                    let api_name = <String>::sse_decode(&mut deserializer);
                    deserializer.end();
                    transform_result_sse::<_,
                            ()>((move ||
                                    {
                                        let output_ok =
                                            Result::<_, ()>::Ok(crate::api::simple::greet(api_name))?;
                                        Ok(output_ok)
                                    })())
                })
    }
    fn wire__crate__api__simple__init_app_impl(port_:
            flutter_rust_bridge::for_generated::MessagePort,
        ptr_:
            flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
        rust_vec_len_: i32, data_len_: i32) {
        FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::SseCodec,
            _,
            _>(flutter_rust_bridge::for_generated::TaskInfo {
                debug_name: "init_app",
                port: Some(port_),
                mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
            },
            move ||
                {
                    let message =
                        unsafe {
                            flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_,
                                rust_vec_len_, data_len_)
                        };
                    let mut deserializer =
                        flutter_rust_bridge::for_generated::SseDeserializer::new(message);
                    deserializer.end();
                    move |context|
                        {
                            transform_result_sse::<_,
                                    ()>((move ||
                                            {
                                                let output_ok =
                                                    Result::<_, ()>::Ok({ crate::api::simple::init_app(); })?;
                                                Ok(output_ok)
                                            })())
                        }
                })
    }
    impl SseDecode for String {
        fn sse_decode(deserializer:
                &mut flutter_rust_bridge::for_generated::SseDeserializer)
            -> Self {
            let mut inner = <Vec<u8>>::sse_decode(deserializer);
            return String::from_utf8(inner).unwrap();
        }
    }
    impl SseDecode for Vec<u8> {
        fn sse_decode(deserializer:
                &mut flutter_rust_bridge::for_generated::SseDeserializer)
            -> Self {
            let mut len_ = <i32>::sse_decode(deserializer);
            let mut ans_ = ::alloc::vec::Vec::new();
            for idx_ in 0..len_ { ans_.push(<u8>::sse_decode(deserializer)); }
            return ans_;
        }
    }
    impl SseDecode for u8 {
        fn sse_decode(deserializer:
                &mut flutter_rust_bridge::for_generated::SseDeserializer)
            -> Self {
            deserializer.cursor.read_u8().unwrap()
        }
    }
    impl SseDecode for () {
        fn sse_decode(deserializer:
                &mut flutter_rust_bridge::for_generated::SseDeserializer)
            -> Self {}
    }
    impl SseDecode for i32 {
        fn sse_decode(deserializer:
                &mut flutter_rust_bridge::for_generated::SseDeserializer)
            -> Self {
            deserializer.cursor.read_i32::<NativeEndian>().unwrap()
        }
    }
    impl SseDecode for bool {
        fn sse_decode(deserializer:
                &mut flutter_rust_bridge::for_generated::SseDeserializer)
            -> Self {
            deserializer.cursor.read_u8().unwrap() != 0
        }
    }
    fn pde_ffi_dispatcher_primary_impl(func_id: i32,
        port: flutter_rust_bridge::for_generated::MessagePort,
        ptr:
            flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
        rust_vec_len: i32, data_len: i32) {
        match func_id {
            2 =>
                wire__crate__api__simple__init_app_impl(port, ptr,
                    rust_vec_len, data_len),
            _ =>
                ::core::panicking::panic("internal error: entered unreachable code"),
        }
    }
    fn pde_ffi_dispatcher_sync_impl(func_id: i32,
        ptr:
            flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
        rust_vec_len: i32, data_len: i32)
        -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
        match func_id {
            1 =>
                wire__crate__api__simple__greet_impl(ptr, rust_vec_len,
                    data_len),
            _ =>
                ::core::panicking::panic("internal error: entered unreachable code"),
        }
    }
    impl SseEncode for String {
        fn sse_encode(self,
            serializer:
                &mut flutter_rust_bridge::for_generated::SseSerializer) {
            <Vec<u8>>::sse_encode(self.into_bytes(), serializer);
        }
    }
    impl SseEncode for Vec<u8> {
        fn sse_encode(self,
            serializer:
                &mut flutter_rust_bridge::for_generated::SseSerializer) {
            <i32>::sse_encode(self.len() as _, serializer);
            for item in self { <u8>::sse_encode(item, serializer); }
        }
    }
    impl SseEncode for u8 {
        fn sse_encode(self,
            serializer:
                &mut flutter_rust_bridge::for_generated::SseSerializer) {
            serializer.cursor.write_u8(self).unwrap();
        }
    }
    impl SseEncode for () {
        fn sse_encode(self,
            serializer:
                &mut flutter_rust_bridge::for_generated::SseSerializer) {}
    }
    impl SseEncode for i32 {
        fn sse_encode(self,
            serializer:
                &mut flutter_rust_bridge::for_generated::SseSerializer) {
            serializer.cursor.write_i32::<NativeEndian>(self).unwrap();
        }
    }
    impl SseEncode for bool {
        fn sse_encode(self,
            serializer:
                &mut flutter_rust_bridge::for_generated::SseSerializer) {
            serializer.cursor.write_u8(self as _).unwrap();
        }
    }
    #[cfg(not(target_family = "wasm"))]
    mod io {
        use super::*;
        use flutter_rust_bridge::for_generated::byteorder::{
            NativeEndian, ReadBytesExt, WriteBytesExt,
        };
        use flutter_rust_bridge::for_generated::{
            transform_result_dco, Lifetimeable, Lockable,
        };
        use flutter_rust_bridge::{Handler, IntoIntoDart};
        pub trait NewWithNullPtr {
            fn new_with_null_ptr()
            -> Self;
        }
        impl<T> NewWithNullPtr for *mut T {
            fn new_with_null_ptr() -> Self { std::ptr::null_mut() }
        }
        #[no_mangle]
        pub extern "C" fn frb_get_rust_content_hash() -> i32 {
            FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH
        }
        #[unsafe(no_mangle)]
        pub extern "C" fn frb_pde_ffi_dispatcher_primary(func_id: i32,
            port_: i64, ptr_: *mut u8, rust_vec_len_: i32, data_len_: i32) {
            pde_ffi_dispatcher_primary_impl(func_id, port_, ptr_,
                rust_vec_len_, data_len_)
        }
        #[unsafe(no_mangle)]
        pub extern "C" fn frb_pde_ffi_dispatcher_sync(func_id: i32,
            ptr_: *mut u8, rust_vec_len_: i32, data_len_: i32)
            -> ::flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
            pde_ffi_dispatcher_sync_impl(func_id, ptr_, rust_vec_len_,
                data_len_)
        }
        #[unsafe(no_mangle)]
        pub extern "C" fn frb_dart_fn_deliver_output(call_id: i32,
            ptr_: *mut u8, rust_vec_len_: i32, data_len_: i32) {
            let message =
                unsafe {
                    ::flutter_rust_bridge::for_generated::Dart2RustMessageSse::from_wire(ptr_,
                        rust_vec_len_, data_len_)
                };
            FLUTTER_RUST_BRIDGE_HANDLER.dart_fn_handle_output(call_id,
                message)
        }
    }
    #[cfg(not(target_family = "wasm"))]
    pub use io::*;
}
 stderr=   Compiling proc-macro2 v1.0.70
   Compiling unicode-ident v1.0.12
   Compiling version_check v0.9.4
   Compiling typenum v1.17.0
   Compiling cc v1.0.83
   Compiling autocfg v1.1.0
   Compiling futures-core v0.3.29
   Compiling futures-task v0.3.29
   Compiling futures-channel v0.3.29
   Compiling futures-util v0.3.29
    Checking futures-sink v0.3.29
    Checking pin-project-lite v0.2.13
    Checking futures-io v0.3.29
    Checking memchr v2.6.4
   Compiling anyhow v1.0.75
    Checking pin-utils v0.1.0
    Checking rustc-demangle v0.1.23
   Compiling generic-array v0.14.7
   Compiling cfg-if v1.0.0
   Compiling slab v0.4.9
    Checking num_cpus v1.16.0
   Compiling build-target v0.4.0
   Compiling portable-atomic v1.11.0
   Compiling hex v0.4.3
   Compiling backtrace v0.3.69
   Compiling dart-sys v4.1.5
    Checking atomic v0.5.3
   Compiling flutter_rust_bridge v2.10.0
    Checking tokio v1.34.0
    Checking threadpool v1.8.1
    Checking log v0.4.20
    Checking byteorder v1.5.0
    Checking lazy_static v1.4.0
   Compiling quote v1.0.33
   Compiling syn v2.0.39
    Checking allo-isolate v0.1.27
   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling digest v0.10.7
   Compiling md-5 v0.10.6
   Compiling futures-macro v0.3.29
   Compiling flutter_rust_bridge_macros v2.10.0
   Compiling delegate-attr v0.3.0
    Checking futures-executor v0.3.29
    Checking futures v0.3.29
    Checking rust_lib_my_app v0.1.0 (C:\Users\windy\my_app\rust)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 19.40s


[2025-05-21T05:09:24.391Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\function\real\mod.rs:140] parse_function function name: "greet"
[2025-05-21T05:09:24.391Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\function\real\lifetime.rs:36] parse_function_lifetime name=greet inputs_lifetimes=[[]] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [false] }
[2025-05-21T05:09:24.391Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\ty\ty.rs:12] TypeParserWithContext.parse_type ty=String ans=Delegate(String)
[2025-05-21T05:09:24.392Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\ty\ty.rs:12] TypeParserWithContext.parse_type ty=String ans=Delegate(String)
[2025-05-21T05:09:24.392Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\function\real\mod.rs:140] parse_function function name: "init_app"
[2025-05-21T05:09:24.392Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\function\real\lifetime.rs:36] parse_function_lifetime name=init_app inputs_lifetimes=[] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [] }
[2025-05-21T05:09:24.393Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\function\real\mod.rs:140] parse_function function name: "greet"
[2025-05-21T05:09:24.394Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\function\real\lifetime.rs:36] parse_function_lifetime name=greet inputs_lifetimes=[[]] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [false] }
[2025-05-21T05:09:24.394Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\ty\ty.rs:12] TypeParserWithContext.parse_type ty=String ans=Delegate(String)
[2025-05-21T05:09:24.395Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\ty\ty.rs:12] TypeParserWithContext.parse_type ty=String ans=Delegate(String)
[2025-05-21T05:09:24.395Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\function\real\mod.rs:140] parse_function function name: "init_app"
[2025-05-21T05:09:24.395Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\codegen\parser\mir\parser\function\real\lifetime.rs:36] parse_function_lifetime name=init_app inputs_lifetimes=[] output_lifetimes=[] ans=ParseFunctionLifetimeOutput { needs_extend_lifetime_per_arg: [] }
[2025-05-21T05:09:24.401Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\dart_fix.rs:11] execute dart_fix base_path="\\\\?\\C:\\Users\\windy\\my_app\\lib\\src\\rust"
[2025-05-21T05:09:24.401Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:137] execute command: bin=powershell args="-noprofile -command & \"dart\" \"fix\" \"--apply\" \".\"" current_dir=Some("\\\\?\\C:\\Users\\windy\\my_app\\lib\\src\\rust") cmd="powershell" "-noprofile" "-command" "& \"dart\" \"fix\" \"--apply\" \".\""
[2025-05-21T05:09:27.761Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:148] command="powershell" "-noprofile" "-command" "& \"dart\" \"fix\" \"--apply\" \".\"" stdout=Computing fixes in rust...
Nothing to fix!
 stderr=
[2025-05-21T05:09:27.762Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\dart_format.rs:24] execute dart_format paths=["lib\\src\\rust\\frb_generated.web.dart", "lib\\src\\rust\\frb_generated.dart", "lib\\src\\rust\\api\\simple.dart", "lib\\src\\rust\\frb_generated.io.dart"] line_length=80
[2025-05-21T05:09:27.763Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:137] execute command: bin=powershell args="-noprofile -command & \"dart\" \"format\" \"--line-length\" \"80\" \"lib\\\\src\\\\rust\\\\frb_generated.web.dart\" \"lib\\\\src\\\\rust\\\\frb_generated.dart\" \"lib\\\\src\\\\rust\\\\api\\\\simple.dart\" \"lib\\\\src\\\\rust\\\\frb_generated.io.dart\"" current_dir=Some("\\\\?\\C:\\Users\\windy\\my_app") cmd="powershell" "-noprofile" "-command" "& \"dart\" \"format\" \"--line-length\" \"80\" \"lib\\\\src\\\\rust\\\\frb_generated.web.dart\" \"lib\\\\src\\\\rust\\\\frb_generated.dart\" \"lib\\\\src\\\\rust\\\\api\\\\simple.dart\" \"lib\\\\src\\\\rust\\\\frb_generated.io.dart\""
[2025-05-21T05:09:29.908Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:148] command="powershell" "-noprofile" "-command" "& \"dart\" \"format\" \"--line-length\" \"80\" \"lib\\\\src\\\\rust\\\\frb_generated.web.dart\" \"lib\\\\src\\\\rust\\\\frb_generated.dart\" \"lib\\\\src\\\\rust\\\\api\\\\simple.dart\" \"lib\\\\src\\\\rust\\\\frb_generated.io.dart\"" stdout=Formatted lib\\src\\rust\\frb_generated.web.dart
Formatted lib\\src\\rust\\frb_generated.dart
Formatted lib\\src\\rust\\api\\simple.dart
Formatted lib\\src\\rust\\frb_generated.io.dart
Formatted 4 files (4 changed) in 0.31 seconds.
 stderr=
[2025-05-21T05:09:29.910Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\format_rust.rs:9] execute format_rust paths=["src\\frb_generated.rs"]
[2025-05-21T05:09:29.910Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:137] execute command: bin=powershell args="-noprofile -command & \"rustfmt\" \"--edition\" \"2018\" \"src\\\\frb_generated.rs\"" current_dir=Some("\\\\?\\C:\\Users\\windy\\my_app\\rust") cmd="powershell" "-noprofile" "-command" "& \"rustfmt\" \"--edition\" \"2018\" \"src\\\\frb_generated.rs\""
[2025-05-21T05:09:30.316Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\command_runner.rs:148] command="powershell" "-noprofile" "-command" "& \"rustfmt\" \"--edition\" \"2018\" \"src\\\\frb_generated.rs\"" stdout= stderr=
[2025-05-21T05:09:30.317Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\utils\dart_repository\dart_repo.rs:21] Guessing toolchain the runner is run into
[2025-05-21T05:09:30.318Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\utils\dart_repository\dart_repo.rs:68] Checking presence of flutter_rust_bridge in dependencies at "\\\\?\\C:\\Users\\windy\\my_app"
[2025-05-21T05:09:30.319Z DEBUG C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\utils\dart_repository\dart_repo.rs:93] Checking presence of flutter_rust_bridge in dependencies at "\\\\?\\C:\\Users\\windy\\my_app"
[19.9s] Parse
  └── [19.9s] Cargo expand & syn parse
  └── [0.0s] Parse HIR
  └── [0.0s] Parse MIR
[0.0s] Generate
[5.9s] Polish
  └── [3.4s] Run Dart fix
  └── [2.1s] Run Dart formatter
  └── [0.4s] Run Rust formatter
  └── [0.0s] Auto upgrade                                                                                               Done!

Expected behavior

this all log

 DESKTOP-SHBSIST       7.978s   1:01 PM   
 ⚡windy ❯❯ flutter_rust_bridge_codegen create my_app
[2025-05-21T05:02:36.581Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\flutter.rs:31] Execute `fvm flutter create my_app --template app` (this may take a while)
[2025-05-21T05:02:41.565Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\integration\creator.rs:45] Step: Inject flutter_rust_bridge related code
[2025-05-21T05:02:41.566Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\integration\integrator.rs:37] Overlay template onto project
[2025-05-21T05:02:41.609Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\integration\integrator.rs:65] Modify file permissions
[2025-05-21T05:02:41.609Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\integration\integrator.rs:68] Add pub dependencies
[2025-05-21T05:02:41.928Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\flutter.rs:46] Execute `fvm flutter pub add rust_lib_my_app --path=rust_builder` inside None (this may take a while)
[2025-05-21T05:02:46.664Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\flutter.rs:46] Execute `fvm flutter pub add flutter_rust_bridge:2.10.0` inside None (this may take a while)
[2025-05-21T05:02:51.565Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\flutter.rs:46] Execute `fvm flutter pub add integration_test --dev --sdk=flutter` inside None (this may take a while)
[2025-05-21T05:02:56.363Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\integration\integrator.rs:76] Setup cargokit dependencies
[2025-05-21T05:02:56.363Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\commands\flutter.rs:63] Execute `flutter pub get` inside "C:\\Users\\windy\\my_app\\rust_builder\\cargokit\\build_tool" (this may take a while)
[2025-05-21T05:03:00.191Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\integration\integrator.rs:79] Apply Dart fixes
[2025-05-21T05:03:08.782Z INFO C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\flutter_rust_bridge_codegen-2.10.0\src\library\integration\integrator.rs:82] Format Dart code
 DESKTOP-SHBSIST       35.003s   1:03 PM   
 ⚡windy ❯❯ flutter run
Error: No pubspec.yaml file found.
This command should be run from the root of your Flutter project.
 DESKTOP-SHBSIST       2.065s   1:03 PM   
 ⚡windy ❯❯ cd .\my_app\
 DESKTOP-SHBSIST    \my_app   3ms   1:03 PM   
 ⚡windy ❯❯ flutter run
Resolving dependencies...
Downloading packages...
  leak_tracker 10.0.9 (11.0.1 available)
  leak_tracker_flutter_testing 3.0.9 (3.0.10 available)
  leak_tracker_testing 3.0.1 (3.0.2 available)
  lints 5.1.1 (6.0.0 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  meta 1.16.0 (1.17.0 available)
  test_api 0.7.4 (0.7.6 available)
  vector_math 2.1.4 (2.1.5 available)
Got dependencies!
8 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib\main.dart on SM A5360 in debug mode...
Your project is configured with Android NDK 26.3.11579264, but the following plugin(s) depend on a different Android NDK version:
- rust_lib_my_app requires Android NDK 27.0.12077973
Fix this issue by using the highest Android NDK version (they are backward compatible).
Add the following to C:\Users\windy\my_app\android\app\build.gradle.kts:

    android {
        ndkVersion = "27.0.12077973"
        ...
    }
Flutter plugin not found, CargoKit plugin will not be applied.
Running Gradle task 'assembleDebug'...                             29.6s
✓ Built build\app\outputs\flutter-apk\app-debug.apk
Installing build\app\outputs\flutter-apk\app-debug.apk...          648ms
I/flutter ( 2704): [IMPORTANT:flutter/shell/platform/android/android_context_gl_impeller.cc(94)] Using the Impeller rendering backend (OpenGLES).
E/flutter ( 2704): [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Invalid argument(s): Failed to load dynamic library 'librust_lib_my_app.so': dlopen failed: library "librust_lib_my_app.so" not found
E/flutter ( 2704): #0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:43)
E/flutter ( 2704): #1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:22:12)
E/flutter ( 2704): #2      new ExternalLibrary.open (package:flutter_rust_bridge/src/platform_types/_io.dart:42:47)
E/flutter ( 2704): #3      loadExternalLibraryRaw (package:flutter_rust_bridge/src/loader/_io.dart:56:28)
E/flutter ( 2704): #4      loadExternalLibrary (package:flutter_rust_bridge/src/loader/_io.dart:14:10)
E/flutter ( 2704): #5      BaseEntrypoint._loadDefaultExternalLibrary (package:flutter_rust_bridge/src/main_components/entrypoint.dart:141:13)
E/flutter ( 2704): #6      BaseEntrypoint.initImpl (package:flutter_rust_bridge/src/main_components/entrypoint.dart:48:31)
E/flutter ( 2704): #7      RustLib.init (package:my_app/src/rust/frb_generated.dart:27:20)
E/flutter ( 2704): #8      main (package:my_app/main.dart:6:17)
E/flutter ( 2704): #9      _runMain.<anonymous closure> (dart:ui/hooks.dart:320:23)
E/flutter ( 2704): #10     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:314:19)
E/flutter ( 2704): #11     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:193:12)
E/flutter ( 2704):
Syncing files to device SM A5360...                                108ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on SM A5360 is available at: http://127.0.0.1:58022/zMGDVtSJgiQ=/

Generated binding code

OS

windows

Version of flutter_rust_bridge_codegen

No response

Flutter info

⚡windy ❯❯ flutter doctor -v
[!] Flutter (Channel stable, 3.32.0, on Microsoft Windows [版本 10.0.26100.4061], locale zh-CN) [791ms]
    • Flutter version 3.32.0 on channel stable at C:\Users\windy\fvm\default
    ! Warning: `flutter` on your path resolves to C:\Users\windy\fvm\versions\3.32.0\bin\flutter, which is not inside
      your current Flutter SDK checkout at C:\Users\windy\fvm\default. Consider adding C:\Users\windy\fvm\default\bin to
      the front of your path.
    ! Warning: `dart` on your path resolves to C:\Users\windy\fvm\versions\3.32.0\bin\dart, which is not inside your
      current Flutter SDK checkout at C:\Users\windy\fvm\default. Consider adding C:\Users\windy\fvm\default\bin to the
      front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision be698c48a6 (34 hours ago), 2025-05-19 12:59:14 -0700
    • Engine revision 1881800949
    • Dart version 3.8.0
    • DevTools version 2.45.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly
      to perform update checks and upgrades.

[✓] Windows Version (Windows 11 or higher, 24H2, 2009) [5.3s]

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [3.1s]
    • Android SDK at C:\Users\windy\AppData\Local\Android\sdk
    • Platform android-36, build-tools 36.0.0
    • Java binary at: C:\Users\windy\AppData\Local\Programs\Android Studio\jbr\bin\java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [237ms]
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.14.0) [236ms]
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.14.36109.1
    • Windows 10 SDK version 10.0.26100.0

[✓] Android Studio (version 2024.3.2) [137ms]
    • Android Studio at C:\Users\windy\AppData\Local\Programs\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)

[✓] IntelliJ IDEA Ultimate Edition (version 2025.1) [136ms]
    • IntelliJ at C:\Users\windy\AppData\Local\Programs\IntelliJ IDEA Ultimate
    • Flutter plugin version 85.3.2
    • Dart plugin version 251.25410.28

[✓] VS Code (version 1.100.2) [25ms]
    • VS Code at C:\Users\windy\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.110.0

[✓] Connected device (4 available) [339ms]
    • SM A5360 (mobile) • 192.168.2.8:5555 • android-x64    • Android 12 (API 32)
    • Windows (desktop) • windows          • windows-x64    • Microsoft Windows [版本 10.0.26100.4061]
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 136.0.7103.114
    • Edge (web)        • edge             • web-javascript • Microsoft Edge 136.0.3240.76

[✓] Network resources [587ms]
    • All expected network resources are available.

Version of clang++

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaitingWaiting for responses, PR, further discussions, upstream release, etcbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions