pub fn new(builder: &HakariBuilder<'_>) -> Result<Self, TargetSpecError> {
        Ok(Self {
            hakari_package: builder
                .hakari_package()
                .map(|package| package.name().to_string()),
            platforms: builder
                .platforms()
                .map(|triple_str| triple_str.to_owned())
                .collect::<Vec<_>>(),
            resolver: builder.resolver(),
            traversal_excludes: PackageSetSummary::from_package_ids(
                builder.graph(),
                builder.traversal_excludes_only(),
            )
            .expect("all package IDs are valid"),
            final_excludes: PackageSetSummary::from_package_ids(
                builder.graph(),
                builder.final_excludes(),
            )
            .expect("all package IDs are valid"),
            registries: builder
                .registries
                .iter()
                .map(|(name, url)| (name.clone(), url.clone()))
                .collect(),
            unify_target_host: builder.unify_target_host(),
            output_single_feature: builder.output_single_feature(),
            dep_format_version: builder.dep_format_version,
        })
    }
Creates a new `HakariBuilderSummary` from a builder.

Requires the `cli-support` feature to be enabled.

Returns an error if there are any custom platforms. Serializing custom platforms is
currently unsupported.
tools/hakari/src/summaries.rs