-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
Hello, I’ve built a wasm-powered replacement for the exec() function here and wasmtime has been invaluable!
That being said, I had a quick question - once I set a global value, how do I access the globals that I have set? Is it only through function execution?
Sample code:
# Check if the value is of a supported type
if isinstance(value, (int, float)):
# Determine the Wasmtime type based on the Python type
if isinstance(value, int):
value_type = ValType.i32()
elif isinstance(value, float):
value_type = ValType.f64()
# Create a mutable global instance with the Python value
global_type = GlobalType(value_type, mutable=True)
global_var = Global(store, global_type, value)
The data function of the Store class returns None for me. Would appreciate some guidance, thanks!
Metadata
Metadata
Assignees
Labels
No labels