In the examples document, there is a case for cyclic imports between Wasm and JS where the Wasm module is higher in the graph.
The value import case is shown as an error in the table below:
JS exports
export type
value (not a WebAssembly.Global)*
global
memory
table
function
Error
snapshot
snapshot
snapshot
snapshot
Does this case really need to be an error? Since the JS module is evaluated first, it seems like the value should be available at Wasm import time, and it can call ToWasmValue on this normally to allocate a suitable global.
In the examples document, there is a case for cyclic imports between Wasm and JS where the Wasm module is higher in the graph.
The value import case is shown as an error in the table below:
JS exports
Error
Does this case really need to be an error? Since the JS module is evaluated first, it seems like the value should be available at Wasm import time, and it can call
ToWasmValue
on this normally to allocate a suitable global.