Skip to main content

yog_runtime/
lib.rs

1//! Yog runtime — the native library the Java hosts load.
2//!
3//! Exposes JNI entry points (`Java_dev_yog_*`) that the hosts call, and the
4//! C ABI (`YogApi`, with the bus `YogBus`) that mods program against.
5//!
6//! Architecture:
7//!   - the bus (`bus`) — the router of calls, events and services between
8//!     mods, the runtime and the Java host; the world's actions are services
9//!     the host provides (`docs/design/bus.md`).
10//!   - `YogApi` — a `#[repr(C)]` table of what isn't a message: content
11//!     registration, the bus, the frame's graphics, the client's own calls.
12//!   - `RuntimeHandlers` — the content mods registered, read by the hosts.
13
14#[macro_use]
15mod macros;
16mod api_fns;
17mod gfx_frame;
18mod gfx_table;
19mod gl_context;
20mod globals;
21mod gpu;
22mod handlers;
23mod intermod;
24mod jni_client;
25mod jni_init;
26mod jni_server;
27mod jni_util;
28mod logging;
29mod machine_api;
30mod mod_loading;
31mod ticks;
32
33mod bus;
34mod client_api;
35mod content_blob;
36// Hot reload: dev builds only (release ones are optimised past it).
37#[cfg(feature = "dev")]
38mod control_socket;
39mod entity_data;
40mod fonts;
41#[cfg(feature = "dev")]
42mod hot_reload;
43mod images;
44mod jcall;
45mod machine;
46#[cfg(feature = "dev")]
47mod registrations;
48mod svg;
49mod textures;
50mod ui_jni;
51// Entry points for the benchmarks only: never in a build of the loader.
52#[cfg(feature = "bench")]
53#[doc(hidden)]
54pub mod bench_support;
55#[cfg(any(test, feature = "bench"))]
56#[doc(hidden)]
57pub mod test_jvm;
58#[cfg(test)]
59mod tests;