wip: begin dynamic library loading dev
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user