Component Model /
WASI update
June 6, 2024
Agenda
Preview 2
Preview 2 - Component Model includes…
Preview 2 - Component Linking
.c
clang -c
.o
.c
clang -c
.o
ar
.a
.a
ar
…
ld
core�module
…
core�module
ld
component
component-�ld
wasm-�compose
component
component-
ld
…
component
“shared-everything linking”
“shared-nothing linking”
“static linking”
“dynamic linking”
.wit
wit-�bindgen
.h
type.o
(component type embedded in custom section)
Preview 2 - WASI includes…
Preview 2 - Related standard proposals
Preview 2 - Implementation status
Developer Preview plan -- timeline (aspirational)
2024
2025
2026
2023
Preview 2
Preview 3
1.0rc
From the Oct 2023 CG presentation:
Platforms release Preview 2 support
Platforms release Preview 3 support (either alongside Preview 2 or converting 2→3, or first one then the other)
Same as before
but X+1
Start advancing C-M in the CG
(starting with Stage 2)
Developer Preview plan -- timeline (aspirational)
2024
2025
2026
2023
Preview 2
Preview 3
1.0rc
Updated:
Preview 2
Preview 3
1.0rc
0.2.1
0.2.2
0.2.* …
(0.2.0)
(0.3.0)
What’s next
What’s next
What’s next
parse+resolve
(component� (import “wasi:filesystem/types” (instance …))
…
)
(module� (import “wasi:filesystem/types” “descriptor.read”� (func (param i32 i64 i64 i32))
…
)
Canonical ABI
<:
<:
wasi-sdk --target=wasm32-wasip2-module ☃
wasi-sdk --target=wasm32-wasip2-component ☃
.c
.c
.c
clang
.o.wasm
.o.wasm
.o.wasm
core�module
wasm-ld
component
wasm-�component-ld
wasm-tools�component�new
^^ both official Preview 2 “targets”
or: GOOS=wasip2 -buildmode=module|component ☃
Access to full component-model feature set:
Easy to add to existing core wasm engines�or if you don’t benefit from components
package wasi:cli;
world command {
import wasi:filesystem/types;
…
}
component�runtime
supports
core-only�runtime
supports
(plan of record since day 1)
What’s next
WASI standardization question