diff --git a/component-model/src/design/why-component-model.md b/component-model/src/design/why-component-model.md index 17ffeba3..af0a57b9 100644 --- a/component-model/src/design/why-component-model.md +++ b/component-model/src/design/why-component-model.md @@ -22,12 +22,15 @@ binary `.wasm` file. A core module usually corresponds to a single binary `.wasm` file. Here's what the `file` command outputs for a sample `.wasm` file: + ```console $ file adder.wasm adder.wasm: WebAssembly (wasm) binary module version 0x1 (MVP) ``` + The file can also be inspected using [the `wasm-tools` CLI](https://github.com/bytecodealliance/wasm-tools): + ```console $ wasm-tools print adder.wasm | head -1 (module @@ -151,12 +154,15 @@ Conceptually, a component is a WebAssembly binary that is restricted to interact only through the modules' imported and exported functions. Components use a different binary format: + ```console $ file add.component.wasm add.component.wasm: WebAssembly (wasm) binary module version 0x1000d ``` + Inspecting the file with the `wasm-tools` CLI shows more clearly that it contains a component: + ``` $ wasm-tools print add.component.wasm | head -1 (component