Skip to content

feat: support out_dir in config#2271

Open
CatBraaain wants to merge 1 commit intoaxodotdev:mainfrom
CatBraaain:feat-support-out-dir
Open

feat: support out_dir in config#2271
CatBraaain wants to merge 1 commit intoaxodotdev:mainfrom
CatBraaain:feat-support-out-dir

Conversation

@CatBraaain
Copy link

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:

readme: Option<Utf8PathBuf>,
authors: Option<Vec<String>>,
binaries: Option<Vec<String>>,
out_dir: Option<String>,
Copy link
Author

@CatBraaain CatBraaain Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I named this field out_dir to match GenericBuildStep.out_dir, but if allowed, I personally think bin_dir would be more readable.

@CatBraaain
Copy link
Author

@ashleygwilliams
This PR introduces a change that is very important for non-Rust projects.
Once this is merged, I’m planning to adopt it in my own project.
If possible, I’d really appreciate it if you could take a look at this with priority.
When you have time, I’d really appreciate a prioritized review.

Have a good day!

@mistydemeo
Copy link
Contributor

Hi! Sorry, I haven't had the time to review this, but I'm going to try to get to it soon.

expected_binaries,
working_dir: package.package_root.clone(),
out_dir: package.package_root.clone(),
out_dir: package
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reviewing. I’ve updated the code to assign out_dir to a variable and branch with if let Some(...) as recommended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments