[ ] Canvases (renderable surfaces)
[ ] Meshes
[ ] Shaders
+
+
+
+Threading:
+The default Wasmer engine supports multi-threading, however, the abi for threading needs to be
+defined. To steal from the Onyx ABI, heartbreak needs to detect if the module wants to import
+or export a memory. then a "spawn thread" and "kill thread" interface needs to be defined.
\ No newline at end of file
#include "wasm.h"
#include "wasmer.h"
+#define HEARTBREAK_WASM_MEMORY_NAME "memory"
+#define HEARTBREAK_WASM_FUNCTION_TABLE_NAME "func_table"
+#define HEARTBREAK_WASM_START_FUNCTION_NAME "_start"
+
GLFWwindow* glfw_window = NULL;
ImmediateRenderer renderer;
wasm_module_t* wasm_module;
*out_count = count;
}
-#define HEARTBREAK_WASM_MEMORY_NAME "memory"
-#define HEARTBREAK_WASM_FUNCTION_TABLE_NAME "func_table"
-#define HEARTBREAK_WASM_START_FUNCTION_NAME "_start"
-
void run_wasm_file(bh_buffer wasm_bytes) {
+ wasmer_features_t* features = NULL;
wasm_config_t* config = NULL;
wasi_config_t* wasi_config = NULL;
wasi_env_t* wasi_env = NULL;
wasm_config_set_compiler(config, LLVM);
}
+ features = wasmer_features_new();
+ wasmer_features_threads(features, 1);
+ wasm_config_set_features(config, features);
+
wasi_config = wasi_config_new("onyx");
wasi_config_preopen_dir(wasi_config, "./");