basalt

src/basalt_module.h

#ifndef BASALT_MODULE_H
#define BASALT_MODULE_H
#include <stddef.h>
#include <stdint.h>
/* ABI v1. view() borrows bytes; copy() creates a buffer owned by the caller. */
typedef struct {
    unsigned version;
    const unsigned char *(*view)(uint64_t handle, size_t *size);
    uint64_t (*copy)(const void *data, size_t size);
} BasaltAPI;
typedef uint64_t (*BasaltFunction)(const BasaltAPI *, const uint64_t *, size_t);
#endif