Skip to content

Commit

Permalink
Add semicolons to WIT (#91)
Browse files Browse the repository at this point in the history
Signed-off-by: Thorsten Hans <thorsten.hans@gmail.com>
  • Loading branch information
ThorstenHans authored Dec 17, 2023
1 parent 1a25eaa commit e76b2d3
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 107 deletions.
4 changes: 2 additions & 2 deletions component-model/examples/example-host/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ This is a native Rust CLI application that can run components of the following
parameters.

```wit
package example:component
package example:component;
world example {
export add: func(x: s32, y: s32) -> s32
export add: func(x: s32, y: s32) -> s32;
}
```

Expand Down
4 changes: 2 additions & 2 deletions component-model/examples/example-host/add.wit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package example:component
package example:component;

world example {
export add: func(x: s32, y: s32) -> s32
export add: func(x: s32, y: s32) -> s32;
}
12 changes: 6 additions & 6 deletions component-model/examples/tutorial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ add an `op` enum that delineates each operator. The following example interface
has an `add` operation:

```wit
package docs:calculator@0.1.0
package docs:calculator@0.1.0;
interface calculate {
enum op {
add,
}
eval-expression: func(op: op, x: u32, y: u32) -> u32
eval-expression: func(op: op, x: u32, y: u32) -> u32;
}
interface add {
add: func(a: u32, b: u32) -> u32
add: func(a: u32, b: u32) -> u32;
}
world adder {
export add
export add;
}
world calculator {
export calculate
import add
export calculate;
import add;
}
```

Expand Down
16 changes: 8 additions & 8 deletions component-model/examples/tutorial/wit/calculator.wit
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
package docs:calculator@0.1.0
package docs:calculator@0.1.0;

interface calculate {
enum op {
add,
}
eval-expression: func(op: op, x: u32, y: u32) -> u32
eval-expression: func(op: op, x: u32, y: u32) -> u32;
}

interface add {
add: func(a: u32, b: u32) -> u32
add: func(a: u32, b: u32) -> u32;
}

world adder {
export add
export add;
}

world calculator {
export calculate
import add
export calculate;
import add;
}

world app {
import calculate
}
import calculate;
}
16 changes: 8 additions & 8 deletions component-model/src/creating-and-consuming/composing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@ When you compose components, you wire up the imports of one "primary" component

For example, consider two components with the following worlds:

```
```wit
// component `validator`
package docs:validator@0.1.0
package docs:validator@0.1.0;
interface validator {
validate-text: func(text: string) -> string
validate-text: func(text: string) -> string;
}
world {
export validator
import docs:regex/match@0.1.0
export validator;
import docs:regex/match@0.1.0;
}
// component 'regex'
package docs:regex@0.1.0
package docs:regex@0.1.0;
interface match {
first-match: func(regex: string, text: string) -> string
first-match: func(regex: string, text: string) -> string;
}
world {
export match
export match;
}
```

Expand Down
Loading

0 comments on commit e76b2d3

Please sign in to comment.