add WAMR to build
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
// Cross-platform DLL export/import visibility macros
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef NOVA64_INTERNAL_H
|
||||
#define NOVA64_INTERNAL_H
|
||||
|
||||
void nova64_log(const char *format, ...);
|
||||
|
||||
#endif // NOVA64_INTERNAL_H
|
||||
@@ -0,0 +1,40 @@
|
||||
#ifndef WASM_RUNNER_H
|
||||
#define WASM_RUNNER_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum {
|
||||
wasm_runner_role_main = 0,
|
||||
wasm_runner_role_status,
|
||||
wasm_runner_role_background,
|
||||
} wasm_runner_role_t;
|
||||
|
||||
typedef struct wasm_runner_instance wasm_runner_instance_t;
|
||||
|
||||
typedef struct {
|
||||
bool enabled;
|
||||
uint16_t x;
|
||||
uint16_t y;
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
} wasm_runner_framebuffer_config_t;
|
||||
|
||||
bool wasm_runner_initialize(void);
|
||||
|
||||
/**
|
||||
* @brief Starts a WASM program with optional framebuffer access.
|
||||
*
|
||||
* @param module_path Path to the WASM module to start.
|
||||
* @param framebuffer_config Optional framebuffer configuration. If NULL,
|
||||
* framebuffer access is disabled.
|
||||
* @param out_instance Optional output pointer that receives a handle to the
|
||||
* running WAMR instance.
|
||||
* @return True on success, false on failure.
|
||||
*/
|
||||
bool wasm_runner_start_program(
|
||||
const char *module_path,
|
||||
const wasm_runner_framebuffer_config_t *framebuffer_config,
|
||||
wasm_runner_instance_t **out_instance);
|
||||
|
||||
#endif // WASM_RUNNER_H
|
||||
Reference in New Issue
Block a user