Closed cristian-5 closed 1 month ago
I'm working on API overhaul towards the next release. I think https://github.com/swiftwasm/WasmKit/pull/132 addressed this issue. Could you try with the latest main?
It works perfectly now, you should probably make a tag 😄
Version 0.0.8
I tried to make a global so I can access it from the module but it appears the initializer of
GlobalInstance
is inaccessible. It might be because it's not marked as public and since it has ainternal(set)
member it's deduced to be internal. On a side-note, for this I needed to import bothWasmParser
andWasmTypes
which I think it's a bit excessive.EDIT 1 - Circular Logic - version based on: 4aff9cc5d12649da1b92c72f125233509fd1feff
Everything is completely different in the actual code, in fact, it's still impossible to make a global because circular logic:
Global
needs to be initialized withStore
which you can only get by first making aRuntime
which asks for yourHostModule
s in which you need to put yourGlobal
s. In other words, it's an infinite loop of dependecies.