feat: with wasm executor

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-08-28 21:13:50 +02:00
parent 541b9b22d2
commit dd80ebb577
11 changed files with 1320 additions and 130 deletions

View File

@@ -0,0 +1,2 @@
[build]
target = "wasm32-wasi"

View File

@@ -0,0 +1,15 @@
[package]
name = "agent-ping"
repository.workspace = true
description.workspace = true
readme.workspace = true
license-file.workspace = true
authors.workspace = true
version.workspace = true
edition.workspace = true
[lib]
crate-type = ["cdylib"]
[dependencies]
wit-bindgen = { git = "https://github.com/bytecodealliance/wit-bindgen", tag = "wit-bindgen-0.10.0" }

View File

@@ -0,0 +1,15 @@
wit_bindgen::generate!({
world: "host",
exports: {
world: MyHost,
},
});
struct MyHost;
impl Host for MyHost {
fn run() {
print("Hello, world!");
}
}

View File

@@ -0,0 +1,7 @@
package example:host
world host {
import print: func(msg: string)
export run: func()
}