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.
When native is a library crate
When native is a workspace crate containing multiple library crates
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 thenative
folder is a workspace crate, it means that many library crates are under that directory.In short, with this PR, both situations are covered.
native
is a library cratenative
is a workspace crate containing multiple library crates