-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasm-compose: update the example for latest tooling. (#941)
This commit updates the `wasm-compose` example to the latest tooling. It updates the examples for the latest `cargo-component` and updates Wasmtime and dependencies to latest. The server also has been updated to use the `bindgen` macro from Wasmtime for generating the server's bindings. Fixes #937.
- Loading branch information
1 parent
4ee705f
commit 07a55c6
Showing
11 changed files
with
100 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file is automatically generated by cargo-component. | ||
# It is not intended for manual editing. | ||
version = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ search-paths: | |
instantiations: | ||
$input: | ||
arguments: | ||
backend: svc | ||
downstream: svc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
record request { | ||
headers: list<tuple<list<u8>, list<u8>>>, | ||
body: list<u8>, | ||
} | ||
interface handler { | ||
record request { | ||
headers: list<tuple<list<u8>, list<u8>>>, | ||
body: list<u8>, | ||
} | ||
|
||
record response { | ||
headers: list<tuple<list<u8>, list<u8>>>, | ||
body: list<u8> | ||
} | ||
|
||
record response { | ||
headers: list<tuple<list<u8>, list<u8>>>, | ||
body: list<u8> | ||
enum error { | ||
bad-request, | ||
} | ||
|
||
execute: func(req: request) -> result<response, error> | ||
} | ||
|
||
enum error { | ||
bad-request, | ||
default world service { | ||
export handler: self.handler | ||
} | ||
|
||
execute: func(req: request) -> result<response, error> | ||
world middleware { | ||
import downstream: self.handler | ||
export handler: self.handler | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file is automatically generated by cargo-component. | ||
# It is not intended for manual editing. | ||
version = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters