feat: add wit-bindgen-sample

This commit is contained in:
2022-07-16 23:38:51 +08:00
parent dd45671b35
commit b0e1a89020
7 changed files with 242 additions and 0 deletions

View 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)
}