Skip to content

Commit e361175

Browse files
author
Luke Wagner
committed
Update Producers Section to match #93
1 parent 20339b5 commit e361175

File tree

1 file changed

+5
-69
lines changed

1 file changed

+5
-69
lines changed

ProducersSection.md

+5-69
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,10 @@
11
# Producers Section
22

3-
The purpose of the producers section is to provide an optional,
4-
highly-structured record of all the distinct tools that were used to produce
5-
a given WebAssembly module. A primary purpose of this record is to allow
6-
broad analysis of toolchain usage in the wild, which can help inform both wasm
7-
producers and consumers.
8-
9-
The producers section is a
10-
[custom section](https://webassembly.github.io/spec/core/binary/modules.html#custom-section)
11-
and thus has no semantic effects and can be stripped at any time.
12-
Since the producers section is relatively small, tools are encouraged to emit
13-
the section or include themselves in an existing section by default, keeping
14-
the producers section even in release builds.
15-
16-
WebAssembly consumers should avoid using the producers section to derive
17-
optimization hints. To ensure portable performance, hints should be
18-
standardized in a separate custom section, probably in the core spec's
19-
[Custom Sections appendix](https://webassembly.github.io/spec/core/appendix/custom.html).
20-
21-
An additional goal of the producers section is to provide a discrete, but
22-
easily-growable [list of known tools/languages](#known-list) for each
23-
record field. This avoids the skew that otherwise happens with unstructured
24-
strings. Unknown names do not invalidate an otherwise-valid producers section.
25-
However, wasm consumers may provide less accurate telemetry results for unknown
26-
names or even emit diagnostics encouraging the name to be put on the known list.
27-
28-
Since version information is useful, but highly-variable, each field value
29-
is accompanied with a version string so that the name can remain stable
30-
over time without requiring frequent updates to the known list.
3+
The producers section provides an optional, structured way to record all of the
4+
distinct tools that were used to produce a given WebAssembly module. The
5+
producers section is a [custom section](https://webassembly.github.io/spec/core/binary/modules.html#custom-section)
6+
and thus has no semantic effects. Size-optimizing toolchains are likely to
7+
strip the producers section from release builds.
318

329
## Custom Section
3310

@@ -71,44 +48,3 @@ the field_name's row.
7148
| `sdk` | [SDK list](#sdks) |
7249

7350
[name-ref]: https://webassembly.github.io/spec/core/binary/values.html#names
74-
75-
## Known list
76-
77-
The following lists contain all the known names for the fields listed above.
78-
**If your tool is not on this list and you'd like it to be, please submit a PR.**
79-
80-
### Source Languages
81-
82-
It is possible for multiple source languages to be present in a single module
83-
when the output of multiple compiled languages are statically linked together.
84-
85-
* `wat`
86-
* `C`
87-
* `C++`
88-
* `Rust`
89-
90-
### Individual Tools
91-
92-
It is possible (and common) for multiple tools to be used in the overall
93-
pipeline that produces and optimizes a given wasm module.
94-
95-
* `wabt`
96-
* `LLVM`
97-
* `clang`
98-
* `lld`
99-
* `Binaryen`
100-
* `rustc`
101-
* `wasm-bindgen`
102-
* `wasm-pack`
103-
104-
### SDKs
105-
106-
While an SDK is technically just another tool, the `sdk` field designates the
107-
top-level "thing" that the developer installs and interacts with directly to
108-
produce the wasm module.
109-
110-
* `Emscripten`
111-
112-
## Text format
113-
114-
TODO

0 commit comments

Comments
 (0)