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 gpu_record;
23mod handlers;
24mod intermod;
25mod jni_client;
26mod jni_init;
27mod jni_server;
28mod jni_util;
29mod logging;
30mod machine_api;
31mod mod_loading;
32mod ticks;
33
34mod bus;
35mod client_api;
36mod content_blob;
37// Hot reload: dev builds only (release ones are optimised past it).
38#[cfg(test)]
39mod api_jvm;
40#[cfg(feature = "dev")]
41mod control_socket;
42mod entity_data;
43mod fonts;
44#[cfg(feature = "dev")]
45mod hot_reload;
46mod images;
47mod jcall;
48mod machine;
49mod mirrors;
50#[cfg(test)]
51mod nanite_jvm;
52mod nanites;
53#[cfg(feature = "dev")]
54mod registrations;
55mod svg;
56mod textures;
57mod ui_jni;
58mod video;
59// Entry points for the benchmarks only: never in a build of the loader.
60#[cfg(feature = "bench")]
61#[doc(hidden)]
62pub mod bench_support;
63#[cfg(any(test, feature = "bench"))]
64#[doc(hidden)]
65pub mod test_jvm;
66#[cfg(test)]
67mod test_jvm_shared;
68#[cfg(test)]
69mod tests;