axodotdev / axodotdev/cargo-dist
Support bundling DLLs from $OUT_DIR
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
I'm building a binary distributable that relies on a library crate, which itself dynamically links to SDL2. For windows builds, the build.rs of that library sticks the correct x86_64 or i686 DLLs in the $OUT_DIR location for cargo so they will be present alongside the binary.
Currently the `include` feature would work for this, but I have no way of naming $OUT_DIR in Cargo.toml since it's not set until build time and globs are not supported. Also the specific list of files may change depending on the target platform.
I did see #194 but this request is a bit more limited in scope as these are build artifacts, not a generic random path outside $CARGO_MANIFEST_DIR and the dynamic file list makes this feel like a different feature request.
Contributor guide
Research direction
Start by examining the existing `include` feature and how Cargo.toml paths are resolved, then review the library crate's `build.rs` output in `$OUT_DIR`. Done means cargo-dist can bundle the target-specific DLLs emitted there, including a dynamically determined file list, alongside the distributable binary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100