flutter_rust_bridge
flutter_rust_bridge copied to clipboard
init suport array
Close #572
Checklist
- [x] An issue to be fixed by this PR is listed above.
- [x] New tests are added to ensure new features are working. End-to-end tests are usually in the
./frb_example/pure_dart
example, more specifically,rust/src/api.rs
anddart/lib/main.dart
. - [x] The code generator is run and the code is formatted (e.g. via
just refresh_all
). - [ ] If this PR adds/changes features, documentations (in the
./book
folder) are updated. - [x] CI is passing.
Remark for PR creator: If the PR is submitted but the owner (fzyzcjy) does not reply for a few days, maybe he just did not see it, so please ping him.
P.S. As a side remark
After upgrade to 1.37.2, it breaks arrays like... https://github.com/fzyzcjy/flutter_rust_bridge/issues/572
We already have some support on arrays: http://cjycode.com/flutter_rust_bridge/feature/lang_vec.html
👀
@fzyzcjy I see that the CI error is related to a memory leak, and I was wondering how the memory check part works locally?
how the memory check part works locally?
Look at CI script, and mimic it to run locally. https://github.com/fzyzcjy/flutter_rust_bridge/blob/master/.github/workflows/ci.yaml
Btw I am a bit curious: We already have http://cjycode.com/flutter_rust_bridge/feature/lang_vec.html#t-n (https://github.com/fzyzcjy/flutter_rust_bridge/pull/442/files), i.e. array support. So could you please add a bit of doc showing what this PR does in addition to the old code?
Btw I am a bit curious: We already have http://cjycode.com/flutter_rust_bridge/feature/lang_vec.html#t-n, i.e. array support. So could you please add a bit of doc showing what this PR does in addition to the old code?
The previous implementation only supported arrays of the results returned from the rust side , but not parameters , this time it mainly supported parameters as well , which I thought was supported by reading the documentation before , but it didn't support them , so the documentation didn't actually need to be changed this time because what the documentation said misled people into thinking that arrays were originally supported , but in fact only the values returned from the rust side were supported .
I see. Looking forward to merging this PR!
@fzyzcjy Learned from previous experiences and mistakes, the new refactoring has been committed for review.
/cc @Desdaemon @Roms1383 - do you have interest in making a review?
/cc @Desdaemon @Roms1383 - do you have interest in making a review?
next time I'd be honoured but still fully focused on the other PR
Good job! Busy on https://github.com/fzyzcjy/flutter_smooth, will probably merge today if no further problems :)