You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have recently been having an issue where we can't easily select components for compilation from a workspace based on target_family. We have a generic server binary that can run on all platforms, and two platform/target specific tools for unix vs windows.
What we would like is a way to say:
[workspace]
members = [
"generic_server"
]
[workspace.cfg(target_family = "unix")]
members += [
"unix tool"
]
[workspace.cfg(target_family = "windows")]
members += [
"windows tool"
]
However, we can't find a way to do this effectively, and even within the tools, we can't do target conditional compilation for libs or bins. This means we are left trying to do cfg based on target family inside the libs and binaries instead which feels a bit messy to us. The alternate is to "de-workspace" our project, but then we lose valuable maintenance features like workspace specified dependencies.
I think it would be a significant improvement for rust/cargo to support such conditional compilation rules in workspaces.
The text was updated successfully, but these errors were encountered:
Hi there,
We have recently been having an issue where we can't easily select components for compilation from a workspace based on target_family. We have a generic server binary that can run on all platforms, and two platform/target specific tools for unix vs windows.
What we would like is a way to say:
However, we can't find a way to do this effectively, and even within the tools, we can't do target conditional compilation for libs or bins. This means we are left trying to do cfg based on target family inside the libs and binaries instead which feels a bit messy to us. The alternate is to "de-workspace" our project, but then we lose valuable maintenance features like workspace specified dependencies.
I think it would be a significant improvement for rust/cargo to support such conditional compilation rules in workspaces.
The text was updated successfully, but these errors were encountered: