feat: update us
This commit is contained in:
@@ -2,8 +2,6 @@ use anyhow::Result;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use wasmtime::{Config, Engine, Instance, Linker, Module, Store};
|
||||
|
||||
use container::*;
|
||||
|
||||
wit_bindgen_wasmtime::export!("../container.wit");
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
@@ -20,7 +18,7 @@ struct JsResult {
|
||||
#[derive(Default)]
|
||||
pub struct MyContainer;
|
||||
|
||||
impl Container for MyContainer {
|
||||
impl container::Container for MyContainer {
|
||||
fn fetch(&mut self, s: &str) -> String {
|
||||
println!("fetch arguments: {}", s);
|
||||
let url: String = s.chars().skip(1).take(s.len() - 2).collect();
|
||||
@@ -46,7 +44,6 @@ impl Container for MyContainer {
|
||||
|
||||
wit_bindgen_wasmtime::import!("../exports.wit");
|
||||
|
||||
|
||||
fn main() -> Result<()> {
|
||||
use exports::*;
|
||||
let wasm = "../engine/target/wasm32-unknown-unknown/debug/engine.wasm";
|
||||
|
||||
Reference in New Issue
Block a user