-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: allow crates to depend on a binary crate #4316
Comments
‘Me too.’ I have a test harness crate that involves, as part of its setup, running some binaries, then running some code that talks to them. These binaries are generated by cargo from within the same workspace. As it stands, I can't just run |
Because it depends on another crate binary, and Cargo does not expose binaries from dependencies. (rust-lang/cargo#4316)
Because it depends on another crate binary, and Cargo does not expose binaries from dependencies. (rust-lang/cargo#4316)
Because it depends on another crate binary, and Cargo does not expose binaries from dependencies. (rust-lang/cargo#4316)
This is useful in a variety of situations such as: * Embedding one binary into another (i.e. BIOS, kernel) * Testing using a third-party utility (i.e. nc) Fixes rust-lang#4316.
This is useful in a variety of situations such as: * Embedding one binary into another (i.e. BIOS, kernel) * Testing using a third-party utility (i.e. nc) Fixes rust-lang#4316.
I'd love to have this as well. Ideally, it would support a mechanism similar to the metadata that FFI crates provide, where it's possible for the depending crate's build script to get the path to the binary for the dependency. |
Since I see this has been proposed a few times, but closed due to finding other solutions, let me explain a use case where I want this feature.
I have one crate (named asm-executor) that implements an execution oracle for assembly programs--you pass in an assembly-language program and a list of x86 machine states, and it outputs the results of running that assembly language on those x86 machine states (by running it on the CPU directly, no emulation). Since it's designed to handle memory accesses, I'd much rather execute the program in a separate address space to minimize "forbidden" address maps, and the easiest way of doing this is a binary.
This means I need some way of being able to say that I can depend on the crate in such a way that I can execute the binary contained within.
The text was updated successfully, but these errors were encountered: