@@ -42,6 +42,9 @@ information during the build:
42
42
43
43
The output goes to stdout in the JSON object per line format. The ` reason ` field
44
44
distinguishes different kinds of messages.
45
+ The ` package_id ` field is a unique identifier for referring to the package, and
46
+ as the ` --package ` argument to many commands. The syntax grammar can be found in
47
+ chapter [ Package ID Specifications] .
45
48
46
49
The ` --message-format ` option can also take additional formatting values which
47
50
alter the way the JSON messages are computed and rendered. See the description
@@ -53,6 +56,7 @@ messages.
53
56
54
57
[ build command documentation ] : ../commands/cargo-build.md
55
58
[ cargo_metadata ] : https://crates.io/crates/cargo_metadata
59
+ [ Package ID Specifications ] : ./pkgid-spec.md
56
60
57
61
### Compiler messages
58
62
@@ -66,7 +70,7 @@ structure:
66
70
/* The "reason" indicates the kind of message. */
67
71
" reason" : " compiler-message" ,
68
72
/* The Package ID, a unique identifier for referring to the package. */
69
- " package_id" : " my-package 0.1.0 (path+ file:///path/to/my-package) " ,
73
+ " package_id" : " file:///path/to/my-package#0.1.0 " ,
70
74
/* Absolute path to the package manifest. */
71
75
" manifest_path" : " /path/to/my-package/Cargo.toml" ,
72
76
/* The Cargo target (lib, bin, example, etc.) that generated the message. */
@@ -135,7 +139,7 @@ following structure:
135
139
/* The "reason" indicates the kind of message. */
136
140
" reason" : " compiler-artifact" ,
137
141
/* The Package ID, a unique identifier for referring to the package. */
138
- " package_id" : " my-package 0.1.0 (path+ file:///path/to/my-package) " ,
142
+ " package_id" : " file:///path/to/my-package#0.1.0 " ,
139
143
/* Absolute path to the package manifest. */
140
144
" manifest_path" : " /path/to/my-package/Cargo.toml" ,
141
145
/* The Cargo target (lib, bin, example, etc.) that generated the artifacts.
@@ -204,7 +208,7 @@ may be found in [the chapter on build scripts](build-scripts.md).
204
208
/* The "reason" indicates the kind of message. */
205
209
" reason" : " build-script-executed" ,
206
210
/* The Package ID, a unique identifier for referring to the package. */
207
- " package_id" : " my-package 0.1.0 (path+ file:///path/to/my-package) " ,
211
+ " package_id" : " file:///path/to/my-package#0.1.0 " ,
208
212
/* Array of libraries to link, as indicated by the `cargo::rustc-link-lib`
209
213
instruction. Note that this may include a "KIND=" prefix in the string
210
214
where KIND is the library kind.
0 commit comments