Describe the problem you are trying to solve
I'm writing a subcommand that mirrors cargo, but records things under a time-travelling debugger instead of running them. When someone types cargo rr run I need to get whatever binary cargo would have run.
In #9491 I requested a solution for this specific use case (something like cargo build --default-bin). When looking into replicating the algorithm cargo uses as a workaround I learned cargo doesn't expose the field default_run in cargo metadata.
Describe the solution you'd like
The default_run field under [package] in Cargo.toml is included in cargo metadata
Notes
Based on a cursory look I think this would just require adding a field to SerializedPackage and changing Package::serialized to propagate the field value from Manifest. I'd be happy to file a PR for this.
Describe the problem you are trying to solve
I'm writing a subcommand that mirrors cargo, but records things under a time-travelling debugger instead of running them. When someone types
cargo rr runI need to get whatever binary cargo would have run.In #9491 I requested a solution for this specific use case (something like
cargo build --default-bin). When looking into replicating the algorithm cargo uses as a workaround I learned cargo doesn't expose the fielddefault_runincargo metadata.Describe the solution you'd like
The
default_runfield under[package]inCargo.tomlis included incargo metadataNotes
Based on a cursory look I think this would just require adding a field to
SerializedPackageand changingPackage::serializedto propagate the field value fromManifest. I'd be happy to file a PR for this.