Skip to content
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

Explain how to create a Flutter package with Rust (instead of an app) #845

Closed
fzyzcjy opened this issue Nov 15, 2022 · 5 comments · Fixed by #899
Closed

Explain how to create a Flutter package with Rust (instead of an app) #845

fzyzcjy opened this issue Nov 15, 2022 · 5 comments · Fixed by #899

Comments

@fzyzcjy
Copy link
Owner

fzyzcjy commented Nov 15, 2022

Currently we have a lot of doc if we want to create a flutter app with rust. but no doc or template yet for flutter packages.

related: #819 (reply in thread)

@buraktabn
Copy link

Take a look at Isar. I believe it can help what you're trying to achieve.

@fzyzcjy
Copy link
Owner Author

fzyzcjy commented Nov 17, 2022

@buraktabn Hi thanks for the link! Indeed flutter_rust_bridge does support packages since day one - because that's how I personally use it. It is just lacking doc and template because my personal usage depends on my internal python-based tooling which is surely not suitable for external devs.

@GregoryConrad
Copy link
Contributor

GregoryConrad commented Dec 5, 2022

@fzyzcjy Since I have done this entire process already, using the latest recommended approaches where possible, I think I would be willing to take this issue on sometime soon. Isar is a good starting point (and indeed I used it for reference in certain places my library); however, I found better ways to take care of some things related to Rust interop that Isar does not do (mostly distributing binaries separately).

In the meantime, if anyone comes across this issue before I can tackle the documentation, take a look at my library, mimir for an example of how to make a Dart-only base and then a Flutter library built directly on top of it for ease of use.

Some related issues that I still need to work out in mimir before I can solidly make said documentation:

Edit: I hopefully will tackle web support in my project in several weeks. But, before I do that, expect a PR for documentation on how to do make a library in ~2 weeks once I finish my school's finals week.

@GregoryConrad
Copy link
Contributor

GregoryConrad commented Dec 9, 2022

Highly related: dart-lang/sdk#50565

I will write the documentation for the current solution soon (& link to the above issue in the docs) but Native Assets would be the proper solution going forward.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants