-
Notifications
You must be signed in to change notification settings - Fork 105
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
Interaction with Rust workspaces #17
Comments
The current use-case is geared towards having 1 Cargo.toml act as a bridge between a Bazel Workspace and Cargo. The immediate solution is to collate your Cargo.toml`s and use BUILD files instead (or in addition). There is some thought to alternatives in #12 |
It isn't possible to collate all Cargo.tomls in my use-case because I have several crates that generate libraries. Using a cargo workspace is currently the only way for this to work if you want to avoid duplicated target directories with redundant crate compilation. |
When I say collate them, I meant their dependencies, the raze toml is just telling cargo vendor what to download and raze what to generate build files for. At some point you'll replace all other Cargo.toml with BUILD files. This should be functionally identical to a cargo workspace, though it may be more difficult to explicitly use multiple versions of an external crate. |
My problem partly seemed to be that the root workspace Cargo.toml had sway over the Cargo.toml in the raze package. I'm required to include it in the workspace manifest since it's a subdirectory. This pulls in the workspace lock file which also incorrectly wants to include my crates from the repo as vendored dependencies. |
i also think |
Several years later I've come back to this one, and palfrey/potboiler#32 adds Bazel support (mostly using |
I've got a project (https://github.com/palfrey/potboiler) I'm testing out using cargo-raze to build, but it uses Cargo workspaces to separate sub-projects and that doesn't seem to interact well with cargo-raze. I've added a top-level WORKSPACE and the generated BUILD for a Remote genmode only seems to contain the dependencies from one of the sub-folder Cargo.toml's. Experimentation seems to indicate it's whichever one is listed first in the [workspace] "members" key.
Any thoughts on how to get this to read from all of them?
The text was updated successfully, but these errors were encountered: