mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-18 07:11:56 +03:00
41 lines
591 B
Rust
41 lines
591 B
Rust
#![crate_type = "rlib"]
|
|
|
|
extern crate wasm_bindgen;
|
|
|
|
use wasm_bindgen::prelude::*;
|
|
|
|
#[wasm_bindgen]
|
|
fn foo() {}
|
|
|
|
#[wasm_bindgen]
|
|
pub unsafe fn foo1() {}
|
|
|
|
#[wasm_bindgen]
|
|
pub const fn foo2() {}
|
|
|
|
#[wasm_bindgen]
|
|
struct Foo<T>(T);
|
|
|
|
#[wasm_bindgen]
|
|
extern "C" {
|
|
static mut FOO: u32;
|
|
|
|
// FIXME(rust-lang/rust#58853) recent regression needs fixing before
|
|
// re-enabling.
|
|
// pub fn foo3(x: i32, ...);
|
|
}
|
|
|
|
#[wasm_bindgen]
|
|
extern "system" {
|
|
}
|
|
|
|
#[wasm_bindgen]
|
|
pub fn foo4<T>() {}
|
|
#[wasm_bindgen]
|
|
pub fn foo5<'a>() {}
|
|
#[wasm_bindgen]
|
|
pub fn foo6<'a, T>() {}
|
|
|
|
#[wasm_bindgen]
|
|
trait X {}
|