Skip to content

feat: support out_dir in config - #2271

Merged
mistydemeo merged 1 commit into
axodotdev:mainfrom
CatBraaain:feat-support-out-dir
Feb 21, 2026
Merged

mistydemeo merged 1 commit into
axodotdev:mainfrom
CatBraaain:feat-support-out-dir

Conversation

@CatBraaain

Copy link
Copy Markdown
Contributor

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:

Comment thread axoproject/src/generic.rs
readme: Option<Utf8PathBuf>,
authors: Option<Vec<String>>,
binaries: Option<Vec<String>>,
out_dir: Option<String>,

@CatBraaain CatBraaain Jan 31, 2026 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor 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
Copy Markdown
Contributor

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

Comment thread cargo-dist/src/build/generic.rs Outdated
expected_binaries,
working_dir: package.package_root.clone(),
out_dir: package.package_root.clone(),
out_dir: package

Copy link
Copy Markdown
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
Copy Markdown
Contributor 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.

@mistydemeo mistydemeo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@mistydemeo
mistydemeo merged commit e2a1750 into axodotdev:main Feb 21, 2026
17 checks passed
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