pub fn new(
        initials: FeatureSet<'g>,
        features_only: FeatureSet<'g>,
        opts: &CargoOptions<'_>,
    ) -> Result<Self, Error> {
        let build_state = CargoSetBuildState::new(initials.graph().package_graph, opts)?;
        Ok(build_state.build(initials, features_only))
    }
Simulates a Cargo build of this feature set, with the given options.

The feature sets are expected to be entirely within the workspace. Its behavior outside the
workspace isn't defined and may be surprising.

`CargoSet::new` takes two `FeatureSet` instances:
* `initials`, from which dependencies are followed to build the `CargoSet`.
* `features_only`, which are additional inputs that are only used for feature
unification. This may be used to simulate, e.g. `cargo build --package foo --package bar`,
when you only care about the results of `foo` but specifying `bar` influences the build.

Note that even if a package is in `features_only`, it may be included in the final build set
through other means (for example, if it is also in `initials` or it is a dependency of one
of them).

In many cases `features_only` is empty -- in that case you may wish to use
`FeatureSet::into_cargo_set()`, and it may be more convenient to use that if the code is
written in a "fluent" style.
guppy/src/graph/cargo/cargo_api.rs