-
Notifications
You must be signed in to change notification settings - Fork 21
Add Flutter wallet example scaffold #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, this is not that easy if we do not want to keep updating the Flutter FFI with every small change in everything.
I spend a lot of time thinking about this kind of libraries for rust when I was designing lampo
, and I think the best way is writing the library in rust as a separate module like arkade-ffi
where there is a rust implementation of the API that we want to expose to the user, then use https://pub.dev/packages/flutter_rust_bridge to generate the dart package
An example is https://github.com/vincenzopalazzo/lampo.rs/blob/main/lampo-c-ffi/src/lib.rs
This allow you to keep the type safety of rust because the you need to check only the function parameters, then implement a better error handling that will be lost otherwise (or will be very difficult to keep across ffi channels due the Option
vs Exceptions
)
my goal wasn't to have a solution for production apps or either merge it, just wanted to have a single place I can point people with Rust & Flutter experience what to look into and how the bindings would look like and ability to start hacking on it. At the moment we don't have plans to start a native dart library (pending MuSig2 support) or either official Flutter bindings, so I would postpone the decision and leave to external contributor to iterate on it. Thank you for the insights |
@tiero : is your intention to move https://github.com/ArkLabsHQ/ark-flutter-example into this repository? |
I wanted to have a barebone example close to the actual code here, I was not thinking of a full fledged flutter app. Open to proposals to simplify eventually |
Summary
flutter_wallet_example
folder containing a sample Flutter app and a minimal FFI Rust cratehttps://mutinynet.arkade.sh
Testing
cargo test --all --no-run