1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! A simple framework for building front-end apps in Rust. Inspires by [Yew](https://github.com/DenisKolodin/yew).
//!
//! ## Important:
//! `simi` only works with a set of supported html tags. If `simi` found out that
//! an identifier is not a supported html tag, (and if its name is not in CamelCase)
//! it will automatically be treated it as an expression and render as it as a text node.
//! If you believe there are valid html tags that must be supported by `simi` please
//! open an issue (or better: open a pull/merge request).
#![deny(missing_docs)]
#![cfg(target_arch = "wasm32")]
extern crate fnv;
#[macro_use]
extern crate log;
extern crate js_sys;
extern crate wasm_bindgen;
extern crate web_sys;

#[cfg(feature = "fetch")]
extern crate futures;
#[cfg(feature = "fetch_json")]
extern crate serde;
#[cfg(feature = "fetch_json")]
extern crate serde_json;
#[cfg(feature = "fetch")]
extern crate wasm_bindgen_futures;

pub extern crate simi_html_tags as html_tags;
extern crate simi_macros;

#[cfg(test)]
extern crate wasm_bindgen_test;
#[cfg(test)]
use wasm_bindgen_test::wasm_bindgen_test_configure;
#[cfg(test)]
wasm_bindgen_test_configure!(run_in_browser);

type HashMap<K, V> = fnv::FnvHashMap<K, V>;

pub mod app;
pub mod callback;
pub mod element_events;
pub mod error;
#[cfg(feature = "fetch")]
pub mod fetch;
pub mod interop;
pub mod simi_dom;
pub mod test_helper;

pub mod prelude {
    //! Common use items for a simi app
    pub use app::*;
    pub use element_events::ElementEvent;
    pub use error::ErrorString as SimiError;
    pub use simi_dom::NodeList;
    pub use simi_macros::*;
}