feat: init commit, wait wit-bindgen supports host wasmtime
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.idea/
|
||||
wit-bindgen/
|
||||
|
||||
# ---> macOS
|
||||
|
||||
13
interface.wit
Normal file
13
interface.wit
Normal file
@@ -0,0 +1,13 @@
|
||||
interface imports {
|
||||
thunk: func()
|
||||
}
|
||||
|
||||
interface exports {
|
||||
thunk: func()
|
||||
}
|
||||
|
||||
world smoke {
|
||||
import imports: imports
|
||||
default export exports
|
||||
}
|
||||
|
||||
@@ -9,5 +9,9 @@ edition = "2021"
|
||||
crate-type = ['cdylib']
|
||||
|
||||
[dependencies]
|
||||
wit-bindgen-core = { path = '../wit-bindgen/crates/bindgen-core' }
|
||||
wit-bindgen-guest-rust = { path = '../wit-bindgen/crates/guest-rust' }
|
||||
boa_engine = "0.16.0"
|
||||
getrandom = { version = "0.2.8", features = ["js"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
wit_bindgen_guest_rust::generate!("../interface.wit");
|
||||
|
||||
struct Exports;
|
||||
|
||||
export_smoke!(Exports);
|
||||
|
||||
impl smoke::Smoke for Exports {
|
||||
fn thunk() {
|
||||
imports::thunk();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user