Replies: 2 comments
-
Sorry about that, I haven't been able to keep up with the new v2 updates recently so some of the code might be broken. You could try using the last v1 version while I fix the template. |
Beta Was this translation helpful? Give feedback.
0 replies
-
No need to apologize. Thank you! I am trying to get some C properly compiled by rust and all dynamically linked and cross device for at least android and apple. Its all mind boggling to me, but I appreciate seeing somethings that works - despite it needing a bit of an update. Its great code. Thanks again. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there,
I'm just trying to get things rolling with minimal cross-development. I've got the project cloned on a POPOS Jimmy Linux distro and flutter_rust_bridge set up. Right now, I'm just focusing on building it for Linux before moving on to Android. When I run flutter run, I'm hitting a snag with ffi.dart. One error was a missing semicolon, and the rest are as follows:
Launching lib/main.dart on Linux in debug mode...
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
ERROR: lib/ffi.dart:22:33: Error: Member not found: 'operatingSystem'.
ERROR: final _dylib = switch (Platform.operatingSystem) {
ERROR: ^^^^^^^^^^^^^^^
ERROR: lib/ffi.dart:27:48: Error: Member not found: 'operatingSystem'.
ERROR: 'unsupported operating system ${Platform.operatingSystem}',
ERROR: ^^^^^^^^^^^^^^^
ERROR: lib/ffi.dart:31:31: Error: The argument type 'String' can't be assigned to the parameter type 'DynamicLibrary'.
ERROR: - 'DynamicLibrary' is from 'dart:ffi'.
ERROR: final Native api = NativeImpl(_dylib);
ERROR: ^
ERROR: Target kernel_snapshot failed: Exception
Building Linux application...
Exception: Build process failed
Additionally, when I try running the flutter_rust_bridge generate command as instructed:
flutter_rust_bridge_codegen --rust-input native/src/api.rs --dart-output ./lib/bridge_generated.dart --dart-decl-output ./lib/bridge_definitions.dart
I get this error:
error: unexpected argument '--rust-input' found
For context, here's the Flutter version info:
flutter --version
Flutter 3.16.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 41456452f2 (2 weeks ago) • 2024-01-25 10:06:23 -0800
Engine • revision f40e976bed
Tools • Dart 3.2.6 • DevTools 2.28.5
BRIDGE:
flutter_rust_bridge_codegen 2.0.0-dev.22
Targets Installed:
aarch64-linux-android (installed)
arm-linux-androideabi (installed)
armv7-linux-androideabi (installed)
i686-linux-android (installed)
x86_64-linux-android (installed)
x86_64-unknown-linux-gnu (installed)
Apologies if this seems like a newbie question. I'm getting back into programming after a few years, and I'm much more comfortable with Python.
Beta Was this translation helpful? Give feedback.
All reactions