@@ -373,6 +373,78 @@ impl ApplyLayer for AppConfigInheritable {
373
373
}
374
374
}
375
375
376
+ /// The internal representation of the [package] table from dist[-workspace].toml.
377
+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
378
+ #[ serde( rename_all = "kebab-case" ) ]
379
+ pub struct PackageTable {
380
+ /// The name of the package.
381
+ pub name : String ,
382
+ /// The version of the package. Syntax must be a valid Cargo SemVer Version.
383
+ pub version : String ,
384
+ /// A brief description of the package.
385
+ pub description : Option < String > ,
386
+ /// The authors of the package.
387
+ pub authors : Option < Vec < String > > ,
388
+ /// A URL to the repository hosting this package.
389
+ pub repository : Option < String > ,
390
+ /// A URL to the homepage of the package.
391
+ pub homepage : Option < String > ,
392
+ /// A URL to the documentation of the package.
393
+ pub documentation : Option < String > ,
394
+ /// A relative path to the changelog file for your package.
395
+ pub changelog : Option < String > ,
396
+ /// A relative path to the readme file for your package.
397
+ pub readme : Option < String > ,
398
+ /// The license(s) of your package, in SPDX format.
399
+ pub license : Option < String > ,
400
+ /// Relative paths to the license files for your package.
401
+ pub license_files : Option < Vec < String > > ,
402
+ /// Names of binaries (without the extension) your package is expected
403
+ /// to build and distribute.
404
+ pub binaries : Option < Vec < String > > ,
405
+ /// Names of c-style static libraries (without the extension) your
406
+ /// package is expected to build and distribute.
407
+ pub cstaticlibs : Option < Vec < String > > ,
408
+ /// Names of c-style dynamic libraries (without the extension) your
409
+ /// package is expected to build and distribute.
410
+ pub cdylibs : Option < Vec < String > > ,
411
+ /// A command to run in your package's root directory to build its
412
+ /// binaries, cstaticlibs, and cdylibs.
413
+ pub build_command : Option < Vec < String > > ,
414
+ }
415
+
416
+ /// The internal representation of dist.toml.
417
+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
418
+ #[ serde( rename_all = "kebab-case" ) ]
419
+ pub struct DistConfig {
420
+ /// The `[package]` table from dist.toml.
421
+ pub package : Option < PackageTable > ,
422
+ /// The `[dist]` table from dist.toml.
423
+ pub dist : TomlLayer ,
424
+ }
425
+
426
+ /// The internal representation of the [workspace] table from dist-workspace.toml.
427
+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
428
+ #[ serde( rename_all = "kebab-case" ) ]
429
+ pub struct WorkspaceTable {
430
+ /// The various projects/workspaces/packages to be managed by dist.
431
+ pub members : Vec < String > ,
432
+ }
433
+
434
+ /// The internal representation of dist-workspace.toml.
435
+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
436
+ #[ serde( rename_all = "kebab-case" ) ]
437
+ pub struct DistWorkspaceConfig {
438
+ /// The `[workspace]` table.
439
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
440
+ pub workspace : Option < WorkspaceTable > ,
441
+ /// The `[dist]` table
442
+ pub dist : TomlLayer ,
443
+ /// The `[package]` table.
444
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
445
+ pub package : Option < PackageTable > ,
446
+ }
447
+
376
448
/// The "raw" input from a toml file containing config
377
449
#[ derive( Debug , Clone , Serialize , Deserialize ) ]
378
450
#[ serde( rename_all = "kebab-case" ) ]
0 commit comments