fzyzcjy / flutter_rust_bridge

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.
https://fzyzcjy.github.io/flutter_rust_bridge/
MIT License
4.14k stars 285 forks source link

[Bug] Trying to load libraries with rust creates error 126 #939

Closed polvallverdu closed 1 year ago

polvallverdu commented 1 year ago

Describe the bug

I'm trying to run some rust code that loads another library. The thing is I'm just getting "Invalid argument(s): Failed to load dynamic library 'native.dll': error code 126". I couldn't find any way of debbuging this deeper.

Codegen logs with RUST_LOG=debug environment variable

[2022-12-29T12:14:50Z DEBUG flutter_rust_bridge_codegen] configs=[Opts { rust_input_path: "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\api.rs", dart_output_path: "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\.\\lib\\bridge_generated.dart", dart_decl_output_path: Some("C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\.\\lib\\bridge_definitions.dart"), c_output_path: ["C:\\Users\\pvall\\AppData\\Local\\Temp\\.tmpUjI3CE.h"], rust_crate_dir: "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native", rust_output_path: "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\bridge_generated.rs", class_name: "Native", dart_format_line_length: 80, skip_add_mod_to_lib: false, 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: "", manifest_path: "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\Cargo.toml", dart_root: Some("C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template"), build_runner: true, block_index: BlockIndex(0), skip_deps_check: false, wasm_enabled: false, inline_rust: false }]
[2022-12-29T12:14:50Z DEBUG lib_flutter_rust_bridge_codegen::source_graph] Trying to parse "\\\\?\\C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\api.rs"
[2022-12-29T12:14:50Z DEBUG lib_flutter_rust_bridge_codegen::source_graph] Trying to parse "\\\\?\\C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\bridge_generated.rs"
[2022-12-29T12:14:50Z WARN  lib_flutter_rust_bridge_codegen::source_graph] Skipping unresolvable module io (tried \\?\C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template\native\src\io.rs, \\?\C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template\native\src\io\mod.rs, \\?\C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template\native\src\bridge_generated\io.rs, \\?\C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template\native\src\bridge_generated\io\mod.rs, )
[2022-12-29T12:14:50Z DEBUG lib_flutter_rust_bridge_codegen::source_graph] Trying to parse "\\\\?\\C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\rubberband\\mod.rs"
[2022-12-29T12:14:50Z DEBUG lib_flutter_rust_bridge_codegen::source_graph] Trying to parse "\\\\?\\C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\rubberband\\rubberband.rs"
[2022-12-29T12:14:50Z DEBUG lib_flutter_rust_bridge_codegen::source_graph] Trying to parse "\\\\?\\C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\rubberband\\bindings.rs"
[2022-12-29T12:14:50Z DEBUG lib_flutter_rust_bridge_codegen::parser] parse_function function name: Ident(rust_release_mode)
[2022-12-29T12:14:50Z DEBUG lib_flutter_rust_bridge_codegen::parser] parse_function function name: Ident(read_file)
[2022-12-29T12:14:50Z DEBUG lib_flutter_rust_bridge_codegen::parser] parse_function function name: Ident(test_rubberband)
[2022-12-29T12:14:50Z DEBUG lib_flutter_rust_bridge_codegen::tools] Guessing toolchain the runner is run into
[2022-12-29T12:14:50Z DEBUG lib_flutter_rust_bridge_codegen::commands] execute command: bin=powershell args="-noprofile -command & \"flutter\" \"--version\"" current_dir=None cmd="powershell" "-noprofile" "-command" "& \"flutter\" \"--version\""
Flutter 3.3.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision eb6d86ee27 (3 months ago) • 2022-10-04 22:31:45 -0700
Engine • revision c08d7d5efc
Tools • Dart 2.18.2 • DevTools 2.15.0
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::commands] command="powershell" "-noprofile" "-command" "& \"flutter\" \"--version\"" stdout= stderr=
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::tools] Checking presence of ffi in dependencies at C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::tools] Checking presence of ffi in dependencies at C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::tools] Checking presence of ffigen in dev_dependencies at C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::tools] Checking presence of ffigen in dev_dependencies at C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template
[2022-12-29T12:14:52Z INFO  lib_flutter_rust_bridge_codegen] Picked config: Opts { rust_input_path: "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\api.rs", dart_output_path: "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\.\\lib\\bridge_generated.dart", dart_decl_output_path: Some("C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\.\\lib\\bridge_definitions.dart"), c_output_path: ["C:\\Users\\pvall\\AppData\\Local\\Temp\\.tmpUjI3CE.h"], rust_crate_dir: "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native", rust_output_path: "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\bridge_generated.rs", class_name: "Native", dart_format_line_length: 80, skip_add_mod_to_lib: false, 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: "", manifest_path: "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\Cargo.toml", dart_root: Some("C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template"), build_runner: true, block_index: BlockIndex(0), skip_deps_check: false, wasm_enabled: false, inline_rust: false }
[2022-12-29T12:14:52Z INFO  lib_flutter_rust_bridge_codegen] Phase: Parse source code to AST, then to IR
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::source_graph] Trying to parse "\\\\?\\C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\api.rs"
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::source_graph] Trying to parse "\\\\?\\C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\bridge_generated.rs"
[2022-12-29T12:14:52Z WARN  lib_flutter_rust_bridge_codegen::source_graph] Skipping unresolvable module io (tried \\?\C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template\native\src\io.rs, \\?\C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template\native\src\io\mod.rs, \\?\C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template\native\src\bridge_generated\io.rs, \\?\C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template\native\src\bridge_generated\io\mod.rs, )
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::source_graph] Trying to parse "\\\\?\\C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\rubberband\\mod.rs"
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::source_graph] Trying to parse "\\\\?\\C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\rubberband\\rubberband.rs"
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::source_graph] Trying to parse "\\\\?\\C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\rubberband\\bindings.rs"
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::parser] parse_function function name: Ident(rust_release_mode)
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::parser] parse_function function name: Ident(read_file)
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::parser] parse_function function name: Ident(test_rubberband)
[2022-12-29T12:14:52Z INFO  lib_flutter_rust_bridge_codegen] Phase: Transform IR
[2022-12-29T12:14:52Z INFO  lib_flutter_rust_bridge_codegen] Phase: Generate Rust code
[2022-12-29T12:14:52Z INFO  lib_flutter_rust_bridge_codegen] Phase: Generate Dart code
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::generator::dart] distinct_input_types=[]
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::generator::dart] distinct_output_types=[Primitive(Bool), Primitive(F32), Primitive(F64), PrimitiveList(IrTypePrimitiveList { primitive: F32 })]
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::commands] execute format_rust path=["C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\bridge_generated.rs"]
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::commands] execute command: bin=rustfmt args="C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\bridge_generated.rs" current_dir=None cmd="rustfmt" "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\bridge_generated.rs"
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::commands] command="rustfmt" "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\native\\src\\bridge_generated.rs" stdout= stderr=
[2022-12-29T12:14:52Z INFO  lib_flutter_rust_bridge_codegen] Phase: Generating Dart bindings for Rust
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::commands] execute cbindgen rust_crate_dir=C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template\native c_output_path=C:\Users\pvall\AppData\Local\Temp\.tmprI4FAv.h
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::commands] cbindgen config: Config {
        header: None,
        includes: [],
        sys_includes: [
            "stdbool.h",
            "stdint.h",
            "stdlib.h",
        ],
        after_includes: Some(
            "typedef struct _Dart_Handle* Dart_Handle;",
        ),
        trailer: None,
        include_guard: None,
        pragma_once: false,
        no_includes: true,
        autogen_warning: None,
        include_version: false,
        namespace: None,
        namespaces: None,
        using_namespaces: None,
        braces: SameLine,
        line_length: 100,
        tab_width: 2,
        line_endings: LF,
        language: C,
        cpp_compat: false,
        style: Both,
        sort_by: None,
        usize_is_size_t: false,
        parse: ParseConfig {
            parse_deps: false,
            include: None,
            exclude: [],
            expand: ParseExpandConfig {
                crates: [],
                all_features: false,
                default_features: true,
                features: None,
                profile: Debug,
            },
            clean: false,
            extra_bindings: [],
        },
        export: ExportConfig {
            include: [],
            exclude: [],
            rename: {},
            pre_body: {},
            body: {},
            prefix: None,
            item_types: [],
            renaming_overrides_prefixing: false,
            mangle: MangleConfig {
                rename_types: None,
                remove_underscores: false,
            },
        },
        macro_expansion: MacroExpansionConfig {
            bitflags: false,
        },
        layout: LayoutConfig {
            packed: None,
            aligned_n: None,
        },
        function: FunctionConfig {
            prefix: None,
            postfix: None,
            must_use: None,
            args: Auto,
            rename_args: None,
            swift_name_macro: None,
            sort_by: None,
            no_return: None,
        },
        structure: StructConfig {
            rename_fields: None,
            derive_constructor: false,
            derive_eq: false,
            derive_neq: false,
            derive_lt: false,
            derive_lte: false,
            derive_gt: false,
            derive_gte: false,
            derive_ostream: false,
            associated_constants_in_body: false,
            must_use: None,
        },
        enumeration: EnumConfig {
            rename_variants: None,
            rename_variant_name_fields: SnakeCase,
            add_sentinel: false,
            prefix_with_name: false,
            derive_helper_methods: false,
            derive_const_casts: false,
            derive_mut_casts: false,
            cast_assert_name: None,
            must_use: None,
            derive_tagged_enum_destructor: false,
            derive_tagged_enum_copy_constructor: false,
            derive_tagged_enum_copy_assignment: false,
            derive_ostream: false,
            enum_class: true,
            private_default_tagged_enum_constructor: false,
        },
        constant: ConstantConfig {
            allow_static_const: true,
            allow_constexpr: true,
            sort_by: None,
        },
        defines: {},
        documentation: true,
        documentation_style: Auto,
        documentation_length: Full,
        pointer: PtrConfig {
            non_null_attribute: None,
        },
        only_target_dependencies: false,
        cython: CythonConfig {
            header: None,
            cimports: {},
        },
    }
[2022-12-29T12:14:52Z DEBUG cbindgen::bindgen::parser] Parsing crate native
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::DartPort.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::DartPostCObjectFnType.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::store_dart_post_cobject.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::get_dart_object.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::drop_dart_object.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::new_dart_opaque.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::init_frb_dart_api_dl.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::DartCObject - opaque (Struct is not marked #[repr(C)] or #[repr(transparent)].).
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::WireSyncReturn.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::wire_rust_release_mode.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::wire_read_file.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::wire_test_rubberband.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::free_WireSyncReturn.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBand - opaque (Struct is not marked #[repr(C)] or #[repr(transparent)].).
[2022-12-29T12:14:52Z WARN  cbindgen::bindgen::parser] Skip native::RUBBERBAND_VERSION - (Unsupported literal expression. ByteStr(LitByteStr { token: b"3.1.2\0" }))
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RUBBERBAND_API_MAJOR_VERSION.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RUBBERBAND_API_MINOR_VERSION.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionProcessOffline.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionProcessRealTime.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionStretchElastic.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionStretchPrecise.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionTransientsCrisp.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionTransientsMixed.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionTransientsSmooth.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionDetectorCompound.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionDetectorPercussive.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionDetectorSoft.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionPhaseLaminar.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionPhaseIndependent.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionThreadingAuto.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionThreadingNever.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionThreadingAlways.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionWindowStandard.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionWindowShort.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionWindowLong.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionSmoothingOff.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionSmoothingOn.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionFormantShifted.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionFormantPreserved.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionPitchHighSpeed.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionPitchHighQuality.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionPitchHighConsistency.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionChannelsApart.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionChannelsTogether.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionEngineFaster.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption_RubberBandOptionEngineFiner.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOption.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandOptions.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandState_.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::RubberBandState.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_new.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_delete.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_reset.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_get_engine_version.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_time_ratio.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_pitch_scale.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_get_time_ratio.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_get_pitch_scale.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_formant_scale.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_get_formant_scale.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_get_preferred_start_pad.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_get_start_delay.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_get_latency.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_transients_option.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_detector_option.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_phase_option.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_formant_option.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_pitch_option.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_expected_input_duration.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_get_samples_required.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_max_process_size.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_key_frame_map.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_study.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_process.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_available.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_retrieve.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_get_channel_count.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_calculate_stretch.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_debug_level.
[2022-12-29T12:14:52Z INFO  cbindgen::bindgen::parser] Take native::rubberband_set_default_debug_level.
[2022-12-29T12:14:52Z WARN  cbindgen::bindgen::ir::ty] Can't find Dart_Handle. This usually means that this type was incompatible or not found.
[2022-12-29T12:14:52Z WARN  cbindgen::bindgen::ir::ty] Can't find Dart_Handle. This usually means that this type was incompatible or not found.
[2022-12-29T12:14:52Z WARN  cbindgen::bindgen::ir::cfg] Missing `[defines]` entry for `target_family = "wasm"` in cbindgen config.
[2022-12-29T12:14:52Z WARN  cbindgen::bindgen::ir::cfg] Missing `[defines]` entry for `target_family = "wasm"` in cbindgen config.
[2022-12-29T12:14:52Z WARN  cbindgen::bindgen::ir::cfg] Missing `[defines]` entry for `target_family = "wasm"` in cbindgen config.
[2022-12-29T12:14:52Z WARN  cbindgen::bindgen::ir::cfg] Missing `[defines]` entry for `target_family = "wasm"` in cbindgen config.
[2022-12-29T12:14:52Z WARN  cbindgen::bindgen::ir::cfg] Missing `[defines]` entry for `target_family = "wasm"` in cbindgen config.
[2022-12-29T12:14:52Z WARN  cbindgen::bindgen::ir::cfg] Missing `[defines]` entry for `target_family = "wasm"` in cbindgen config.
[2022-12-29T12:14:52Z WARN  cbindgen::bindgen::ir::cfg] Missing `[defines]` entry for `target_family = "wasm"` in cbindgen config.
[2022-12-29T12:14:52Z WARN  cbindgen::bindgen::ir::cfg] Missing `[defines]` entry for `target_family = "wasm"` in cbindgen config.
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::commands] execute ffigen c_path=C:\Users\pvall\AppData\Local\Temp\.tmprI4FAv.h dart_path=C:\Users\pvall\AppData\Local\Temp\.tmpIAVDEN 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"]       
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::commands] ffigen config:
            output: 'C:\Users\pvall\AppData\Local\Temp\.tmpIAVDEN'
            name: 'NativeWire'
            description: 'generated by flutter_rust_bridge'
            headers:
              entry-points:
                - 'C:\Users\pvall\AppData\Local\Temp\.tmprI4FAv.h'
              include-directives:
                - 'C:\Users\pvall\AppData\Local\Temp\.tmprI4FAv.h'
            comments: false
            preamble: |
              // ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names

            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'

[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::commands] ffigen config_file: NamedTempFile("C:\\Users\\pvall\\AppData\\Local\\Temp\\.tmpMRKRC9")
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::tools] Guessing toolchain the runner is run into
[2022-12-29T12:14:52Z DEBUG lib_flutter_rust_bridge_codegen::commands] execute command: bin=powershell args="-noprofile -command & \"flutter\" \"pub\" \"run\" \"ffigen\" \"--config\" \"C:\\\\Users\\\\pvall\\\\AppData\\\\Local\\\\Temp\\\\.tmpMRKRC9\"" current_dir=Some("C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template") cmd="powershell" "-noprofile" "-command" "& \"flutter\" \"pub\" \"run\" \"ffigen\" \"--config\" \"C:\\\\Users\\\\pvall\\\\AppData\\\\Local\\\\Temp\\\\.tmpMRKRC9\""
Running in Directory: 'C:\Users\pvall\vscode\flutterrust\flutter_rust_bridge_template'
Input Headers: [C:\Users\pvall\AppData\Local\Temp\.tmprI4FAv.h]
[WARNING]: No definition found for declaration - (Cursor) spelling: _Dart_Handle, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct _Dart_Handle, usr: c:@S@_Dart_Handle
[WARNING]: No definition found for declaration - (Cursor) spelling: _Dart_Handle, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct _Dart_Handle, usr: c:@S@_Dart_Handle
[WARNING]: No definition found for declaration - (Cursor) spelling: DartCObject, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct DartCObject, usr: c:@S@DartCObject
[WARNING]: No definition found for declaration - (Cursor) spelling: DartCObject, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct DartCObject, usr: c:@S@DartCObject
[WARNING]: No definition found for declaration - (Cursor) spelling: _Dart_Handle, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct _Dart_Handle, usr: c:@S@_Dart_Handle
[WARNING]: No definition found for declaration - (Cursor) spelling: _Dart_Handle, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct _Dart_Handle, usr: c:@S@_Dart_Handle
[WARNING]: No definition found for declaration - (Cursor) spelling: _Dart_Handle, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct _Dart_Handle, usr: c:@S@_Dart_Handle
[WARNING]: No definition found for declaration - (Cursor) spelling: _Dart_Handle, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct _Dart_Handle, usr: c:@S@_Dart_Handle
[WARNING]: No definition found for declaration - (Cursor) spelling: DartCObject, kind: 2, kindSpelling: StructDecl, type: 105, typeSpelling: struct DartCObject, usr: c:@S@DartCObject
[WARNING]: Generated declaration '_Dart_Handle' start's with '_' and therefore will be private.
Finished, Bindings generated in C:\Users\pvall\AppData\Local\Temp\.tmpIAVDEN
[2022-12-29T12:14:55Z DEBUG lib_flutter_rust_bridge_codegen::commands] command="powershell" "-noprofile" "-command" "& \"flutter\" \"pub\" \"run\" \"ffigen\" \"--config\" \"C:\\\\Users\\\\pvall\\\\AppData\\\\Local\\\\Temp\\\\.tmpMRKRC9\"" stdout= stderr=
[2022-12-29T12:14:55Z INFO  lib_flutter_rust_bridge_codegen] Phase: Running build_runner
[2022-12-29T12:14:55Z INFO  lib_flutter_rust_bridge_codegen] Phase: Formatting Dart code
[2022-12-29T12:14:55Z DEBUG lib_flutter_rust_bridge_codegen::commands] execute format_dart path=["C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\.\\lib\\bridge_generated.dart", "C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\.\\lib\\bridge_definitions.dart"] line_length=80
[2022-12-29T12:14:55Z DEBUG lib_flutter_rust_bridge_codegen::commands] execute command: bin=powershell args="-noprofile -command & \"dart\" \"format\" \"--line-length\" \"80\" \"C:\\\\Users\\\\pvall\\\\vscode\\\\flutterrust\\\\flutter_rust_bridge_template\\\\.\\\\lib\\\\bridge_generated.dart\" \"C:\\\\Users\\\\pvall\\\\vscode\\\\flutterrust\\\\flutter_rust_bridge_template\\\\.\\\\lib\\\\bridge_definitions.dart\"" current_dir=None cmd="powershell" "-noprofile" "-command" "& \"dart\" \"format\" \"--line-length\" \"80\" \"C:\\\\Users\\\\pvall\\\\vscode\\\\flutterrust\\\\flutter_rust_bridge_template\\\\.\\\\lib\\\\bridge_generated.dart\" \"C:\\\\Users\\\\pvall\\\\vscode\\\\flutterrust\\\\flutter_rust_bridge_template\\\\.\\\\lib\\\\bridge_definitions.dart\""
Formatted C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\.\\lib\\bridge_generated.dart
Formatted C:\\Users\\pvall\\vscode\\flutterrust\\flutter_rust_bridge_template\\.\\lib\\bridge_definitions.dart
Formatted 2 files (2 changed) in 0.26 seconds.
[2022-12-29T12:14:56Z DEBUG lib_flutter_rust_bridge_codegen::commands] command="powershell" "-noprofile" "-command" "& \"dart\" \"format\" \"--line-length\" \"80\" \"C:\\\\Users\\\\pvall\\\\vscode\\\\flutterrust\\\\flutter_rust_bridge_template\\\\.\\\\lib\\\\bridge_generated.dart\" \"C:\\\\Users\\\\pvall\\\\vscode\\\\flutterrust\\\\flutter_rust_bridge_template\\\\.\\\\lib\\\\bridge_definitions.dart\"" stdout= stderr=
[2022-12-29T12:14:56Z INFO  lib_flutter_rust_bridge_codegen] Success!
[2022-12-29T12:14:56Z INFO  flutter_rust_bridge_codegen] Now go and use it :)

To Reproduce

No response

Expected behavior

No response

Generated binding code

No response

OS

Windows

Version of flutter_rust_bridge_codegen

No response

Flutter info

[√] Flutter (Channel stable, 3.3.4, on Microsoft Windows [Version 10.0.22000.1335], locale en-US)
    • Flutter version 3.3.4 on channel stable at C:\CustomProgramData\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision eb6d86ee27 (3 months ago), 2022-10-04 22:31:45 -0700
    • Engine revision c08d7d5efc
    • Dart version 2.18.2
    • DevTools version 2.15.0

[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at C:\Users\pvall\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • CHROME_EXECUTABLE = C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.1)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.4.33110.190
    • Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\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 11.0.12+7-b1504.28-7817840)

[√] IntelliJ IDEA Ultimate Edition (version 2022.2)
    • IntelliJ at C:\Users\pvall\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\222.4345.14
    • 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

[√] VS Code (version 1.74.2)
    • VS Code at C:\Users\pvall\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.44.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.1335]
    • Chrome (web)      • chrome  • web-javascript • unknown
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 102.0.1245.33

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Version of clang++

No response

Version of ffigen

No response

Additional context

No response

welcome[bot] commented 1 year ago

Hi! Thanks for opening your first issue here! :smile:

polvallverdu commented 1 year ago

The app couldn't find the other dll. I don't know on what path it was trying to read from.

github-actions[bot] commented 1 year ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.