wip: begin dynamic library loading dev

This commit is contained in:
samsonium
2026-10-28 15:20:58 +03:00
parent 70bf63e2ea
commit ea28c470d2
7 changed files with 45 additions and 9 deletions
+4
View File
@@ -6,6 +6,7 @@
#include <stddef.h>
#include <stdint.h>
#include <vm/fzl_vm_env.h>
#include <vm/fzl_vm_extern.h>
#include <vm/fzl_vm_object.h>
// VM descriptor
@@ -14,6 +15,9 @@ typedef struct
fzl_const_t *consts;
size_t consts_count;
fzl_vm_extern_t *externs;
size_t externs_count;
uint64_t *ops;
size_t ops_count;
+14
View File
@@ -0,0 +1,14 @@
#ifndef FZL_VM_EXTERN_H
#define FZL_VM_EXTERN_H
#include <ffi.h>
// Loaded extern function definition
typedef struct
{
void *func_ptr;
ffi_cif cif;
ffi_type **arg_types;
} fzl_vm_extern_t;
#endif // FZL_VM_EXTERN_H