Skip to content

Commit b9604bc

Browse files
committed
Bump Wasmer & Wasmtime versions
Closes #73
1 parent 47b8ca9 commit b9604bc

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/defs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,5 @@ Useful for minimizing changes to implementation files between targets e.g. GDExt
5353
#define TIME_MONOTONIC OS::get_singleton()->get_ticks_usec() * 1000
5454
#define NULL_VARIANT Variant()
5555
#define PAGE_SIZE 65536
56-
#define GODOT_WASM_EXTERNREF 128 // Different enums in Wasmer & Wasmtime (see https://github.com/wasmerio/wasmer/issues/5082)
5756

5857
#endif

src/wasm.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ namespace godot {
5555
inline wasm_val_t error_value(const char* message) {
5656
PRINT_ERROR(message);
5757
wasm_val_t value;
58-
value.kind = GODOT_WASM_EXTERNREF;
58+
value.kind = WASM_EXTERNREF;
5959
value.of.ref = NULL;
6060
return value;
6161
}
@@ -121,12 +121,12 @@ namespace godot {
121121
if ((size_t)array.size() != results->size) return ERR_PARAMETER_RANGE_ERROR;
122122
for (uint16_t i = 0; i < results->size; i++) {
123123
results->data[i] = encode_variant(array[i], context->results[i]);
124-
if (results->data[i].kind == GODOT_WASM_EXTERNREF) return ERR_INVALID_DATA;
124+
if (results->data[i].kind == WASM_EXTERNREF) return ERR_INVALID_DATA;
125125
}
126126
return OK;
127127
} else if (results->size == 1) {
128128
results->data[0] = encode_variant(variant, context->results[0]);
129-
return results->data[0].kind == GODOT_WASM_EXTERNREF ? ERR_INVALID_DATA : OK;
129+
return results->data[0].kind == WASM_EXTERNREF ? ERR_INVALID_DATA : OK;
130130
} else return ERR_INVALID_DATA;
131131
}
132132

@@ -449,7 +449,7 @@ namespace godot {
449449
for (uint16_t i = 0; i < args.size(); i++) {
450450
Variant variant = args[i];
451451
wasm_val_t value = encode_variant(variant, context.params[i]);
452-
FAIL_IF(value.kind == GODOT_WASM_EXTERNREF, "Invalid argument type", NULL_VARIANT);
452+
FAIL_IF(value.kind == WASM_EXTERNREF, "Invalid argument type", NULL_VARIANT);
453453
args_vec.push_back(value);
454454
}
455455
wasm_val_vec_t f_args = { args_vec.size(), args_vec.data() };

utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from zipfile import ZipFile
77

88
WASMER_BASE_URL = "https://github.com/wasmerio/wasmer/releases/download/{0}/wasmer-{1}.tar.gz"
9-
WASMER_VER_DEFAULT = "v4.3.7"
9+
WASMER_VER_DEFAULT = "v4.4.0"
1010
WASMTIME_BASE_URL = "https://github.com/bytecodealliance/wasmtime/releases/download/{0}/wasmtime-{0}-{1}-c-api.{2}"
11-
WASMTIME_VER_DEFAULT = "v24.0.0"
11+
WASMTIME_VER_DEFAULT = "v25.0.2"
1212

1313

1414
def _validate_version(v):

0 commit comments

Comments
 (0)