app_main.h(3)Bark

NAME

app_main.h - Single-header isomorphic native + WebAssembly application harness.

SYNOPSIS

Classes

struct bark_app_ctx

Runtime context passed to all Bark application callbacks.

struct bark_app_hooks

Application lifecycle hooks supplied to BARK_APP_DEFINE().

Macros

#define BARK_APP_DEFINE(HOOKS_SYM)

Generate isomorphic native and WebAssembly entrypoints for a Bark app.

Typedefs

typedef struct bark_app_ctx bark_app_ctx_t

Runtime context passed to all Bark application callbacks.

typedef struct bark_app_hooks bark_app_hooks_t

Application lifecycle hooks supplied to BARK_APP_DEFINE().

Functions

bark_app_ctx_t * bark_app_current (void)

Return the active Bark application context (or NULL before init).

int bark_app_upgrade (bark_app_ctx_t *ctx, const char *bearer_token)

Request a live session upgrade using an authenticated user token.

void bark_app_logout (bark_app_ctx_t *ctx)

Clear active user credentials and revert to guest/logged-out state.

const void * bark_app_get_slice (uint32_t iface_id, uint32_t abi_ver)

Resolve an entitled runtime library slice interface (native only; NULL on web).

Detailed Description

Single-header isomorphic native + WebAssembly application harness.

Define your application lifecycle callbacks in a bark_app_hooks_t struct and invoke BARK_APP_DEFINE(my_hooks) once in your entry translation unit. The same C code compiles untouched into both a protected native desktop package and a protected browser WebAssembly package.

Macro Definition Documentation

#define BARK_APP_DEFINE( HOOKS_SYM)

Generate isomorphic native and WebAssembly entrypoints for a Bark app.

Parameters

HOOKS_SYM Static bark_app_hooks_t instance defining application callbacks.

Author

Generated automatically by Doxygen for Bark from the source code.