feat: add wit-bindgen-sample
This commit is contained in:
15
__wasm/wit-bindgen-sample/engine/src/lib.rs
Normal file
15
__wasm/wit-bindgen-sample/engine/src/lib.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
wit_bindgen_rust::export!("../exports.wit");
|
||||
wit_bindgen_rust::import!("../container.wit");
|
||||
|
||||
struct Exports;
|
||||
|
||||
impl exports::Exports for Exports {
|
||||
fn eval_javascript(s: String) -> String {
|
||||
// let a = container::fetch("");
|
||||
"".into()
|
||||
}
|
||||
}
|
||||
|
||||
fn fetch_from_host(config: &str) -> String {
|
||||
container::fetch(config)
|
||||
}
|
||||
Reference in New Issue
Block a user