You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,18 +23,18 @@ config.locale = "fr-FR"
23
23
24
24
[component.translator]
25
25
uri = "./lib/translator.wasm"
26
-
imports = ["http", "io"]
26
+
imports = ["http"]
27
27
28
28
[capability.http]
29
-
uri = "wasmtime:http"
30
-
31
-
[capability.io]
32
-
uri = "wasmtime:io"
29
+
type = "wasi:http"
33
30
```
34
31
35
32
</td>
36
33
</tr></table>
37
34
35
+
> [!NOTE]
36
+
> This project is still in an early design phase. All configurations and implementations are subject to change.
37
+
38
38
## Core Concepts
39
39
40
40
The best way to learn the core concepts of Composable Runtime is to go through the step-by-step overview in the [Sailing the 7 Cs with Composable Runtime](examples/7cs/README.md) example.
Copy file name to clipboardExpand all lines: examples/7cs/README.md
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,7 +124,7 @@ $ ./run.sh 3
124
124
</td>
125
125
<td>
126
126
127
-
Host capabilities provide the interfaces a component needs to interact with the external world. For example, the `wasmtime:http` capability enables a component to make outgoing HTTP requests.
127
+
Host capabilities provide the interfaces a component needs to interact with the external world. For example, the `wasi:http` capability enables a component to make outgoing HTTP requests.
128
128
129
129
The translator is now replaced with one that calls an external HTTP API. The `translate-api.js` implementation is slightly less simplistic as it also knows how to translate "World" into the same handful of languages.
130
130
@@ -142,7 +142,7 @@ uri = "./lib/capable-translator.wasm"
142
142
imports = ["http-client"]
143
143
144
144
[capability.http-client]
145
-
uri = "wasmtime:http"
145
+
type = "wasi:http"
146
146
```
147
147
148
148
```
@@ -185,7 +185,7 @@ uri = "./lib/logging-advice.wasm"
185
185
imports = ["logging-stdout"]
186
186
187
187
[capability.http-client]
188
-
uri = "wasmtime:http"
188
+
type = "wasi:http"
189
189
```
190
190
191
191
```
@@ -240,7 +240,7 @@ uri = "./lib/logging-advice.wasm"
240
240
imports = ["logging-stdout"]
241
241
242
242
[capability.http-client]
243
-
uri = "wasmtime:http"
243
+
type = "wasi:http"
244
244
```
245
245
246
246
```
@@ -304,7 +304,7 @@ path = "/hello"
304
304
channel = "names"
305
305
306
306
[capability.http-client]
307
-
uri = "wasmtime:http"
307
+
type = "wasi:http"
308
308
```
309
309
**ops.toml**:
310
310
@@ -319,11 +319,7 @@ And finally, the shared `infra.toml` used for examples 4-7:
Copy file name to clipboardExpand all lines: examples/otel/README.md
+13-16Lines changed: 13 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,12 +41,12 @@ interface endpoint {
41
41
}
42
42
```
43
43
44
-
The endpoint is generic gRPC (OTLP-agnostic, hence the `otel-to-grpc` component). It just sends raw bytes to a named path. Path keys like `logs` and `traces` map to gRPC service paths via config, either in the `host:grpc` capability definition, or the `grpc-to-http` component definition:
44
+
The endpoint is generic gRPC (OTLP-agnostic, hence the `otel-to-grpc` component). It just sends raw bytes to a named path. Path keys like `logs` and `traces` map to gRPC service paths via config, either in the `grpc` capability definition, or the `grpc-to-http` component definition:
The "grpc" definition with `uri = "host:grpc"`creates an instance of the host capability, which the host binary has registered when building the runtime:
79
+
The "grpc" definition creates an instance of the host capability, which the host binary has registered when building the runtime:
Copy file name to clipboardExpand all lines: examples/service/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,12 +35,12 @@ Result: "HOWDY, World!"
35
35
`GreetingService` implements `Service` with three responsibilities:
36
36
37
37
1.**Config handling**: A `ConfigHandler` claims the `[greeting]` category, parsing the `message` property. Config is shared with the service via `Arc<Mutex<...>>`.
38
-
2.**Capability provision**: After config is parsed, `capabilities()` uses `.take()` to pull the message out of the mutex and creates a `GreetingCapability` factory. The factory also reads `uppercase` from the capability's `config.*` sub-table.
38
+
2.**Capability provisioning**: After config is parsed, `capabilities()` uses `.take()` to pull the message out of the mutex and creates a `GreetingCapability` factory. The factory also reads `uppercase` from the capability's properties.
39
39
3.**Lifecycle**: `start()` and `shutdown()` are called around invocation.
0 commit comments