SDK for writing Myrmic cells (WASM modules deployed and managed by the sorg infrastructure): host function bindings for db, tap, outlet, gpio, ble, gateway, cell messaging, logging and time, plus the #[cmd]/#[monitor] export macros.
usemyrmic_common::cells::EventPublishRequest;usecrate::ApiResult;modc_functions{usecore::ffi::c_int;#[link(wasm_import_module ="cell")]unsafeextern"C"{/// Publishes an event. The function is used to publish an event to all cells which subscribed, specified by a payload
/// which can be deserialized into a `EventPublishRequest`.
////// # Arguments:
/// - buffer: pointer to the memory where the module has the event pub request
/// - length: length of the serialized event pub request
////// # Returns:
/// - [`crate::SUCCESS`] on success
/// - [`crate::GENERIC_ERROR`] on failure
pub(super)fnpublish_event(buffer:*constu8, length: c_int)-> c_int;}}/// Hands a pre-built [`EventPublishRequest`] to the host for delivery to every
/// subscribed cell. Prefer [`publish`](crate::publish), which builds the
/// request and encodes the payload for you.
pubfnpublish_event(event:&EventPublishRequest)-> ApiResult{crate::host_functions::call(event,c_functions::publish_event).map_err(Into::into)}