worker-sys 0.8.0

Low-level extern definitions / FFI bindings to the Cloudflare Workers JS Runtime.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use js_sys::Promise;
use wasm_bindgen::prelude::*;

#[wasm_bindgen]
extern "C" {
    #[wasm_bindgen(extends=::js_sys::Object, js_name=Ai)]
    #[derive(Debug, Clone, PartialEq, Eq)]
    pub type Ai;

    #[wasm_bindgen(structural, method, js_class=Ai, js_name=run)]
    pub fn run(this: &Ai, model: &str, input: JsValue) -> Promise;
}