VLiva Documentation
Lifecycle and Call Order
Expected execution order from library load to frame updates and plugin unload.
Direct URL: https://vliva.tamkungz.me/documentation/lifecycle
-
include/vliva/plugins/plugin_api.h -
plugins/example_plugin.cpp
In this page
Section 1
Lifecycle Flow
Host drives plugin lifecycle in a strict order. Each callback has a clear responsibility.
- Load plugin and resolve create_plugin symbol.
- Read returned API table and verify api_version.
- Call on_load(host) once for initialization.
- Call on_frame(time_seconds, delta_seconds) each frame.
- Call on_unload() once before unloading shared library.
text
Host start
-> load shared library (.so)
-> lookup create_plugin symbol
-> read VlivaPluginApi table
-> call on_load(host)
-> call on_frame(time, delta) each frame
-> call on_unload() before unload
Section 2
Implementation Guidelines
Keep plugin runtime stable and fail-safe across all callbacks.
- Never assume host callback pointers are always available.
- Avoid heavy work inside on_frame without throttling.
- Keep initialization and shutdown idempotent where possible.
- Preserve ABI safety: no exceptions across C ABI boundary.