Skip to content

Commit 8d96fe8

Browse files
authored
Switch to the latest WIT ABI version (#28)
The WIT ABI tooling is changing quickly; e.g., a recent PR modified the syntax of WIT to use `func` instead of `function`. This change updates the WIT definition to use this new syntax and bumps the WIT ABI version in the CI to its latest version.
1 parent ae2ec68 commit 8d96fe8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
- uses: actions/checkout@v2
1414
- uses: WebAssembly/wit-abi-up-to-date@v4
1515
with:
16-
wit-abi-tag: wit-abi-0.2.0
16+
wit-abi-tag: wit-abi-0.4.0

wasi-nn.wit.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ enum execution-target {
8787
}
8888
8989
// Load an opaque sequence of bytes to use for inference.
90-
load: function(builder: graph-builder-array, encoding: graph-encoding, target: execution-target) -> expected<graph, error>
90+
load: func(builder: graph-builder-array, encoding: graph-encoding, target: execution-target) -> expected<graph, error>
9191
```
9292

9393
### Inference
@@ -100,21 +100,21 @@ An inference "session" is encapsulated by a `graph-execution-context`. This stru
100100
resource graph-execution-context
101101
102102
// Create an execution instance of a loaded graph.
103-
init-execution-context: function(graph: graph) -> expected<graph-execution-context, error>
103+
init-execution-context: func(graph: graph) -> expected<graph-execution-context, error>
104104
```
105105

106106
Inputs and outputs to the inference request &mdash; `compute` &mdash; are identified by a numeric
107107
index:
108108

109109
```wit
110110
// Define the inputs to use for inference.
111-
set-input: function(ctx: graph-execution-context, index: u32, tensor: tensor) -> expected<unit, error>
111+
set-input: func(ctx: graph-execution-context, index: u32, tensor: tensor) -> expected<unit, error>
112112
113113
// Compute the inference on the given inputs.
114-
compute: function(ctx: graph-execution-context) -> expected<unit, error>
114+
compute: func(ctx: graph-execution-context) -> expected<unit, error>
115115
116116
// Extract the outputs after inference.
117-
get-output: function(ctx: graph-execution-context, index: u32) -> expected<tensor, error>
117+
get-output: func(ctx: graph-execution-context, index: u32) -> expected<tensor, error>
118118
```
119119

120120
### Errors

0 commit comments

Comments
 (0)