Skip to main content

Module app

Module app 

Source
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 the cdylib C ABI. write_capture_requests is the export_nv_app! side, drain_capture_requests the loader / runtime side; both bounded by MAX_ACTIVE_POINTERS with no allocation.

Traits§

NvApp

Functions§

clear_last_ffi_panic
Clears any recorded FFI panic on the current thread.
default_measure_constraints
Default intrinsic size calculation shared by NvApp::measure and 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.