File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
component-model/src/design Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ Here's what the `file` command outputs for a sample `.wasm` file:
2626$ file adder.wasm
2727adder.wasm: WebAssembly (wasm) binary module version 0x1 (MVP)
2828```
29+ The file can also be inspected
30+ using [ the ` wasm-tools ` CLI] ( https://github.com/bytecodealliance/wasm-tools ) :
31+ ``` console
32+ $ wasm-tools print adder.wasm | head -1
33+ (module
34+ ```
2935
3036A core module is a set of definitions.
3137Kinds of definitions include:
@@ -144,7 +150,18 @@ Conceptually, a component is a WebAssembly binary
144150(which may or may not contain modules)
145151that is restricted to interact
146152only through the modules' imported and exported functions.
147- Components use a different binary format.
153+ Components use a different binary format:
154+ ``` console
155+ $ file add.component.wasm
156+ add.component.wasm: WebAssembly (wasm) binary module version 0x1000d
157+ ```
158+ Inspecting the file with the ` wasm-tools ` CLI
159+ shows more clearly that it contains a component:
160+ ```
161+ $ wasm-tools print add.component.wasm | head -1
162+ (component
163+ ```
164+
148165Compared to core modules, components also use a richer
149166mechanism by default for expressing the types of functions: _ interfaces_ .
150167
You can’t perform that action at this time.
0 commit comments