1pub mod api;
2pub mod component;
3pub mod components;
4pub mod entity;
5pub mod graph_interpreter;
6mod hash;
7pub mod log;
8pub mod registry;
9pub mod the_truth;
10
11pub use hash::hash;
12pub use tm_sys::ffi;
13
14pub use tm_sys::ffi::tm_vec2_t as Vec2;
15pub use tm_sys::ffi::tm_vec3_t as Vec3;
16pub use tm_sys::ffi::tm_vec4_t as Vec4;
17
18#[doc(hidden)]
19pub use paste;
20
21#[macro_export]
22macro_rules! tm_plugin {
23 (|$reg:ident: &mut RegistryApi| $body:block) => {
24 #[no_mangle]
25 #[allow(clippy::missing_safety_doc)]
26 pub unsafe extern "C" fn tm_load_plugin(
27 reg: *mut $crate::ffi::tm_api_registry_api,
28 load: bool,
29 ) {
30 let $reg = &mut $crate::registry::RegistryApi::new(reg, load);
31
32 api::register::<EntityApi>($reg);
33 api::register::<TheTruthApi>($reg);
34
35 $body
36 }
37 };
38}