@@ -13,6 +13,7 @@ use cargo_platform::Platform;
1313use cargo_util:: paths;
1414use cargo_util_schemas:: manifest:: {
1515 self , PackageName , PathBaseName , TomlDependency , TomlDetailedDependency , TomlManifest ,
16+ TomlWorkspace ,
1617} ;
1718use cargo_util_schemas:: manifest:: { RustVersion , StringOrBool } ;
1819use itertools:: Itertools ;
@@ -80,7 +81,8 @@ pub fn read_manifest(
8081 let empty = Vec :: new ( ) ;
8182 let cargo_features = original_toml. cargo_features . as_ref ( ) . unwrap_or ( & empty) ;
8283 let features = Features :: new ( cargo_features, gctx, & mut warnings, source_id. is_path ( ) ) ?;
83- let workspace_config = to_workspace_config ( & original_toml, path, gctx, & mut warnings) ?;
84+ let workspace_config =
85+ to_workspace_config ( & original_toml, path, is_embedded, gctx, & mut warnings) ?;
8486 if let WorkspaceConfig :: Root ( ws_root_config) = & workspace_config {
8587 let package_root = path. parent ( ) . unwrap ( ) ;
8688 gctx. ws_roots
@@ -211,9 +213,14 @@ fn stringify(dst: &mut String, path: &serde_ignored::Path<'_>) {
211213fn to_workspace_config (
212214 original_toml : & manifest:: TomlManifest ,
213215 manifest_file : & Path ,
216+ is_embedded : bool ,
214217 gctx : & GlobalContext ,
215218 warnings : & mut Vec < String > ,
216219) -> CargoResult < WorkspaceConfig > {
220+ if is_embedded {
221+ let ws_root_config = to_workspace_root_config ( & TomlWorkspace :: default ( ) , manifest_file) ;
222+ return Ok ( WorkspaceConfig :: Root ( ws_root_config) ) ;
223+ }
217224 let workspace_config = match (
218225 original_toml. workspace . as_ref ( ) ,
219226 original_toml. package ( ) . and_then ( |p| p. workspace . as_ref ( ) ) ,
0 commit comments