Closed DevAdalat closed 1 month ago
Hi! Thanks for opening your first issue here! :smile:
Hi, you are welcome!
Doc: https://cjycode.com/flutter_rust_bridge/manual/miscellaneous/web-cross-origin
You can search how to add the headers in http.serve
I wanted to update you that I have resolved the issue. I used the static-web-server with some custom configuration, and now everything is working in release mode.
I will be closing this issue.
Thanks for your support!
You are welcome!
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.
Describe the bug
First, thank you for this great package and all the hard work behind it!
When running my Flutter web app using python3 -m http.server after flutter build, I encounter the following error during the initialization of Rust in release mode:
Failed to initialize RustLib Buffers cannot be shared due to missing cross-origin headers. Please refer to https://fzyzcjy.github.io/flutter_rust_bridge/manual/miscellaneous
However, it works in debug mode, where I am passing the --web-header argument. How can I run it in release mode?
I used this command to build and run application: flutter_rust_bridge_codegen create webtest flutter_rust_bridge_codegen build-web --release flutter build web cd build/web && python3 -m http.serve
If this is not a bug, could you please guide me on how to fix this or how to run it in release mode?
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/dart_minimal example package according to your needs.
Logs
Expected behavior
RustLib should initialize successfully without cross-origin header issues in release mode
Generated binding code
No response
OS
Ubuntu 22.04
Version of
flutter_rust_bridge_codegen
2.5.0
Flutter info
No response
Version of
clang++
No response
Additional context
No response