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(test)]
38mod api_jvm;
39#[cfg(feature = "dev")]
40mod control_socket;
41mod entity_data;
42mod fonts;
43#[cfg(feature = "dev")]
44mod hot_reload;
45mod images;
46mod jcall;
47mod machine;
48mod mirrors;
49#[cfg(test)]
50mod nanite_jvm;
51mod nanites;
52#[cfg(feature = "dev")]
53mod registrations;
54mod svg;
55mod textures;
56mod ui_jni;
57// Entry points for the benchmarks only: never in a build of the loader.
58#[cfg(feature = "bench")]
59#[doc(hidden)]
60pub mod bench_support;
61#[cfg(any(test, feature = "bench"))]
62#[doc(hidden)]
63pub mod test_jvm;
64#[cfg(test)]
65mod test_jvm_shared;
66#[cfg(test)]
67mod tests;