Exports wasm.ValueType and makes Functions interfaces for signature verification (#284)
This moves code for `ValueType` constants public, so that we can centralize discussion on how values are encoded. We'll need this when re-introducing a Globals API. To keep complexity down in consideration that there are only 4 types, I copied the constants into the internalwasm package. This reduces the import complexity otherwise would have caused. Signed-off-by: Adrian Cole <adrian@tetrate.io> Co-authored-by: Takaya Saeki <takaya@tetrate.io>
This commit is contained in:
@@ -43,7 +43,7 @@ func Test_WASI(t *testing.T) {
|
||||
|
||||
// Implement the function pointer. This mainly shows how you can decouple a host function dependency.
|
||||
randomGet = func(ctx wasm.ModuleContext, buf, bufLen uint32) wasi.Errno {
|
||||
res, err := randomGetFn(ctx, uint64(buf), uint64(bufLen))
|
||||
res, err := randomGetFn.Call(ctx, uint64(buf), uint64(bufLen))
|
||||
require.NoError(t, err)
|
||||
return wasi.Errno(res[0])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user