-
Notifications
You must be signed in to change notification settings - Fork 300
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
capacity overflow when send large Uint8List to rust(> 2gb) #2404
Comments
Hi! Thanks for opening your first issue here! 😄 |
Hmm interesting. Looks like vec_resize caused that. Firstly, could you please install LLVM (https://cjycode.com/flutter_rust_bridge/manual/ffigen-troubleshooting#llvm-needs-to-be-installed) and enable Secondly, curious why do you need to transfer 2GB data? Maybe we can discuss and see whether it is really needed (or maybe e.g. things can live on Rust side without moving to Dart side) |
Firstly, thank you for your response. I enabled the configuration and reran
Secondly, In my current situation where I need to transfer 2GB of data, I need to implement an encryption and decryption function. The content being processed is quite large. For the PC platform, I can use files for transmission, but for other platforms like the Web, it's not feasible to use files for transmission. Therefore, I'm passing a &[u8] array as the input parameter, and the return value is also the same type of array. |
I see. But I am worried about:
For this specific scenario, I personally suggest to implement some chunking mechanism. For example, chunk 2GB into many 10MB blocks, and encrypt/decrypt each of them separately. |
Thank you very much for your suggestion. I should consider modifying my design to process the content in chunks. |
You are welcome! |
Close since this seems to be solved. Feel free to reopen if needed! |
Describe the bug
In flutter capacity overflow when send large Uint8List to rust(> 2gb)
Steps to reproduce
Hint: A simple way to reproduce is to clone and modify the https://github.com/fzyzcjy/flutter_rust_bridge/tree/master/frb_example/flutter_via_create example package according to your needs.
Logs
Expected behavior
No response
Generated binding code
No response
OS
MacOS 15.1 Apple chip
Version of
flutter_rust_bridge_codegen
2.6.0
Flutter info
Version of
clang++
Apple clang version 16.0.0 (clang-1600.0.26.3)
Additional context
No response
The text was updated successfully, but these errors were encountered: