2018-08-06 11:08:35 -07:00
|
|
|
//! This is a test that we compile `wasm-bindgen` itself in `no_std` mode and we
|
|
|
|
//! can export/import various items.
|
|
|
|
//!
|
|
|
|
//! This doesn't actually run any tests, it's mostly a compile-time verification
|
|
|
|
//! that things work.
|
|
|
|
|
|
|
|
#![no_std]
|
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
extern crate std as _some_other_name;
|
2018-09-26 08:26:00 -07:00
|
|
|
extern crate wasm_bindgen;
|
2018-08-06 11:08:35 -07:00
|
|
|
|
|
|
|
use wasm_bindgen::prelude::*;
|
|
|
|
|
|
|
|
#[wasm_bindgen]
|
|
|
|
pub fn foo(_a: u32) {}
|
|
|
|
|
|
|
|
#[wasm_bindgen]
|
2018-09-26 08:26:00 -07:00
|
|
|
extern "C" {
|
2018-08-06 11:08:35 -07:00
|
|
|
fn test(a: &str);
|
|
|
|
|
|
|
|
type Js;
|
|
|
|
#[wasm_bindgen(constructor)]
|
|
|
|
fn new() -> Js;
|
|
|
|
#[wasm_bindgen(method, structural)]
|
|
|
|
fn init(this: &Js);
|
|
|
|
}
|