Skip to content

Instantly share code, notes, and snippets.

@goofmint
Created July 3, 2019 04:37
Show Gist options
  • Select an option

  • Save goofmint/1fe2dbe523f107e8d6232a30991c486e to your computer and use it in GitHub Desktop.

Select an option

Save goofmint/1fe2dbe523f107e8d6232a30991c486e to your computer and use it in GitHub Desktop.
extern "C" {
fn name() -> String;
type MyClass;
#[wasm_bindgen(constructor)]
fn new() -> MyClass;
#[wasm_bindgen(method, getter)]
fn number(this: &MyClass) -> u32;
#[wasm_bindgen(method, setter)]
fn set_number(this: &MyClass, number: u32) -> MyClass;
#[wasm_bindgen(method)]
fn render(this: &MyClass) -> String;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment