Desdaemon / flutter_rust_bridge_template

Template for Flutter + Rust integration with flutter_rust_bridge.
https://desdaemon.github.io/flutter_rust_bridge_template/
Apache License 2.0
120 stars 63 forks source link

Automatically link imported crates to binary #40

Closed temeddix closed 1 year ago

temeddix commented 1 year ago

With this change in corrosion https://github.com/corrosion-rs/corrosion/pull/312, it is now possible to retrieve the list of imported crates by corrosion. This means that we do not need to manually do target_link_libraries one by one, crate by crate.

If the folder native is just a normal library crate, this PR wouldn't make such a big difference. However, if the native folder is a workspace crate, it means that many library crates are under that directory.

In short, with this PR, both situations are covered.

Desdaemon commented 1 year ago

Sweet! Thanks for your contribution, will check it out soon.