0

My project structure is something like this:

├── build_bin_a.rs
├── Cargo.lock
├── Cargo.toml
├── crates
│   ├── some-crate-a
│   ├── some-crate-b
│   └── .... #etc
├── src
│    ├── bin
│    │   └── some_bin_a.rs
│    │   └── some_bin_b.rs
│    └── lib.rs
└── ...

And I need to configure a build script for only one binary target. In this case I need to configure build_bin_a.rs build script for src/bin/some-bin-a.rs binary target.

Is there any way to achieve it?

al3x
  • 589
  • 1
  • 4
  • 16
  • What do you mean by 'configure a build script' does it need different settings for that single target? Do you want it to run only for that target? – cafce25 Aug 26 '23 at 23:49
  • exactly I want to execute this build script only for that single target. I mean, I don't want the build script to run unless I build that binary target. – al3x Aug 26 '23 at 23:50
  • 1
    This question is about dependencies, but the solutions are similar to your issue: https://stackoverflow.com/q/35711044/6274355 – drewtato Aug 27 '23 at 00:01
  • thanks probably the closest thing to what I need is to turn the binary as its own package, although it would not be ideal because I do not want to complicate more the structure of my project, but for now I think it works for me. – al3x Aug 27 '23 at 00:06

1 Answers1

0

This is issue #1430, not supported currently. Your best bet is to put the binary in a different package.

Chayim Friedman
  • 47,971
  • 5
  • 48
  • 77