File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
component-model/src/design Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,15 @@ binary `.wasm` file.
2222
2323A core module usually corresponds to a single binary ` .wasm ` file.
2424Here's what the ` file ` command outputs for a sample ` .wasm ` file:
25+
2526``` console
2627$ file adder.wasm
2728adder.wasm: WebAssembly (wasm) binary module version 0x1 (MVP)
2829```
30+
2931The file can also be inspected
3032using [ the ` wasm-tools ` CLI] ( https://github.com/bytecodealliance/wasm-tools ) :
33+
3134``` console
3235$ wasm-tools print adder.wasm | head -1
3336(module
@@ -151,12 +154,15 @@ Conceptually, a component is a WebAssembly binary
151154that is restricted to interact
152155only through the modules' imported and exported functions.
153156Components use a different binary format:
157+
154158``` console
155159$ file add.component.wasm
156160add.component.wasm: WebAssembly (wasm) binary module version 0x1000d
157161```
162+
158163Inspecting the file with the ` wasm-tools ` CLI
159164shows more clearly that it contains a component:
165+
160166```
161167$ wasm-tools print add.component.wasm | head -1
162168(component
You can’t perform that action at this time.
0 commit comments