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
#[cfg(feature = "server")]
pub mod server {
    pub use cfx_server::natives::*;
    pub use cfx_server::{emit_net, events};
}

#[cfg(feature = "client")]
pub mod client {
    pub use cfx_client::natives::*;
    pub use cfx_client::{emit_net, events, TaskSequenceBuilder};
}

pub mod events {
    pub use cfx_core::events::{
        emit, handler_fn, set_event_handler, set_event_handler_closure, subscribe, subscribe_raw,
        Event, EventScope, Handler, HandlerFn, RawEvent,
    };

    #[cfg(feature = "server")]
    pub use cfx_server::emit_net as emit_to_client;

    #[cfg(feature = "client")]
    pub use cfx_client::emit_net as emit_to_server;
}

pub mod runtime {
    pub use cfx_core::runtime::{sleep_for, spawn};
}

pub mod invoker {
    pub use cfx_core::invoker::{invoke, InvokeError, Val};
}

pub mod types {
    pub use cfx_core::types::{Packed, Vector3};
}

pub mod ref_funcs {
    pub use cfx_core::ref_funcs::{ExternRefFunction, RefFunction};
}

pub mod exports {
    pub use cfx_core::exports::{import_function, make_export};
}

pub use cfx_core::log;