/* Bio-Digital v1 public C ABI. Pure native runtime; no Python dependency. */
#ifndef BIO_V1_H_
#define BIO_V1_H_

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

#if defined(_WIN32)
#define BIO_API __declspec(dllexport)
#else
#define BIO_API __attribute__((visibility("default")))
#endif

typedef enum bio_v1_status {
    BIO_OK = 0,
    BIO_ERR_ARGS = 1,
    BIO_ERR_IO = 2,
    BIO_ERR_PARSE = 3,
    BIO_ERR_OPCODE = 4,
    BIO_ERR_OPERAND = 5,
    BIO_ERR_UNSUPPORTED = 6,
    BIO_ERR_INTERNAL = 99
} bio_v1_status;

#define BIO_VERSION_MAJOR 0
#define BIO_VERSION_MINOR 3
#define BIO_VERSION_PATCH 0
#define BIO_VERSION_STRING "0.4.0-phase4"

#define BIO_CPU_SSE2    (1u << 0)
#define BIO_CPU_SSE42   (1u << 1)
#define BIO_CPU_AVX     (1u << 2)
#define BIO_CPU_AVX2    (1u << 3)
#define BIO_CPU_AVX512F (1u << 4)
#define BIO_CPU_NEON    (1u << 5)

BIO_API bio_v1_status bio_v1_init(void);
BIO_API const char *bio_v1_version(void);
BIO_API uint32_t bio_v1_cpu_features(void);
BIO_API const char *bio_v1_active_variant(const char *kernel_name);
BIO_API bio_v1_status bio_v1_run_file(const char *path);
BIO_API bio_v1_status bio_v1_absorb_gguf(const char *path);

#ifdef __cplusplus
}
#endif

#endif /* BIO_V1_H_ */
