Proposal: allow crates to depend on a binary crate · Issue #4316 · rust-lang/cargo (original) (raw)
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.