fzyzcjy / flutter_rust_bridge

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.
https://fzyzcjy.github.io/flutter_rust_bridge/
MIT License
4.3k stars 301 forks source link

Add docs and warning if user provides absolute rust_crate_dir #2335

Closed Vollbrecht closed 1 month ago

Vollbrecht commented 1 month ago

Changes

Addresses #2334 by adding a warning if a user provides a absolute Path, and extend the documentation on the Clap doc string.

Close #2334 (<--- edited by fzyzcjy to allow github auto close that)

welcome[bot] commented 1 month ago

Hi! Thanks for opening this pull request! :smile:

Vollbrecht commented 1 month ago

I think overall using a relative path in the generated output is the right choice. Though it would be nice if a absolute Path is given that it is handled as such and would internally converted to a relative one.

E.g if a user pass /home/user/rust_app and a user create a project in /home/user/flutter_app than the created rust_app Path would not be /home/user/flutter_app/home/user/rust_app but something like ../rust_app internally.

But i am totally fine if the current behavior is documented like this PR does and emit a warning so users are more aware of it

fzyzcjy commented 1 month ago

Good job!

Totally agree supporting absolute path would be good, while it is usually relative path to maintain portability of the user repo

fzyzcjy commented 1 month ago

@all-contributors please add @Vollbrecht for code

allcontributors[bot] commented 1 month ago

@fzyzcjy

I've put up a pull request to add @Vollbrecht! :tada:

welcome[bot] commented 1 month ago

Hi! Congrats on merging your first pull request! :tada: