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;
16
17mod api;
18mod bus;
19mod game;
20mod gfx;
21mod globals;
22mod jni;
23// `jcall!` reaches its types as `$crate::jcall`: here, and in the JNI
24// benchmark that includes the file as its own `jcall` module.
25use jni::call as jcall;
26mod logging;
27mod mods;
28mod nanites;
29// Benchmarks' and tests' entry points: never in a build of the loader.
30#[cfg(any(test, feature = "bench"))]
31#[doc(hidden)]
32pub mod testing;
33mod video;