Expand description
Safe, DRY Rust application trait (NvApp) and export_nv_app! macro.
Apps implement NvApp once with zero unsafe. Rust-native hosts (Web WASM, Headless tests,
static release builds) invoke NvApp directly with zero FFI overhead (monomorphized/inlined),
while export_nv_app!(MyApp) generates the modular nv_get_interface(uint32_t) C ABI for
C++ Fabric, iOS/macOS, Android/JNI, Flutter dart:ffi, SwiftUI, and Tier-2 cdylib hot-swap.
Modules§
- module
- Shared, ref-counted app module handle (
NvAppModule) for multi-surface execution. - pointer
NvPointerApi(NV_IFACE_POINTER): app pointer-capture requests across thecdylibC ABI.write_capture_requestsis theexport_nv_app!side,drain_capture_requeststhe loader / runtime side; both bounded byMAX_ACTIVE_POINTERSwith no allocation.
Traits§
Functions§
- clear_
last_ ffi_ panic - Clears any recorded FFI panic on the current thread.
- default_
measure_ constraints - Default intrinsic size calculation shared by
NvApp::measureand framework adapters. - format_
panic_ payload - Formats a caught panic payload into a human-readable message.
- last_
ffi_ panic - Returns a copy of the last panic message captured at an
extern "C"FFI boundary on the current thread, if any, without clearing it. - take_
last_ ffi_ panic - Takes and clears the last panic message captured at an
extern "C"FFI boundary on the current thread, if any.