Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
attente committed Jan 17, 2019
1 parent c23a2dc commit 8ee7065
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
#[cfg(feature = "bindings")]
extern crate wasm_bindgen;
#[cfg(feature = "bindings")]
use wasm_bindgen::prelude::*;

#[cfg_attr(feature = "bindings", wasm_bindgen)]
pub struct Foo {
}

#[cfg_attr(feature = "bindings", wasm_bindgen)]
impl Foo {
#[cfg_attr(feature = "bindings", wasm_bindgen(constructor))]
pub fn new() -> Foo {
Foo {}
}
}

0 comments on commit 8ee7065

Please sign in to comment.