Conversation
| readme: Option<Utf8PathBuf>, | ||
| authors: Option<Vec<String>>, | ||
| binaries: Option<Vec<String>>, | ||
| out_dir: Option<String>, |
There was a problem hiding this comment.
I named this field out_dir to match GenericBuildStep.out_dir, but if allowed, I personally think bin_dir would be more readable.
|
@ashleygwilliams Have a good day! |
|
Hi! Sorry, I haven't had the time to review this, but I'm going to try to get to it soon. |
cargo-dist/src/build/generic.rs
Outdated
| expected_binaries, | ||
| working_dir: package.package_root.clone(), | ||
| out_dir: package.package_root.clone(), | ||
| out_dir: package |
There was a problem hiding this comment.
I think it would make sense to have an assignment that checks if package.out_dir is defined, and branch based on that. So, up earlier in the file, you might do something like:
let out_dir = if let Some(dir) = package.out_dir {
package.package_root.join(dir)
} else {
package.package_root.clone()
};And then pass that out_dir here.
There was a problem hiding this comment.
Thanks for the reviewing. I’ve updated the code to assign out_dir to a variable and branch with if let Some(...) as recommended.
4a472fc to
beba227
Compare
beba227 to
8a3e222
Compare
dist-workspace.toml now supports package.out-dir.
Previously, for non-Rust projects, binaries were assumed to be placed directly under the root. With this change, build artifacts can be stored in an arbitrary folder.
Related issues: