Opt-in support for sign-extend (#339)

Allows users to do the following to enable sign-extension-ops:

```
r := wazero.NewRuntimeWithConfig(wazero.NewRuntimeConfig().WithFeatureSignExtensionOps(true))
```

Resolves #66

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Co-authored-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2022-03-07 15:08:57 +09:00
committed by GitHub
parent cd52f18323
commit c6426160c2
23 changed files with 907 additions and 34 deletions

View File

@@ -23,6 +23,14 @@ func TestRuntimeConfig_Features(t *testing.T) {
return c.WithFeatureMutableGlobal(v)
},
},
{
name: "sign-extension-ops",
feature: internalwasm.FeatureSignExtensionOps,
expectDefault: false,
setFeature: func(c *RuntimeConfig, v bool) *RuntimeConfig {
return c.WithFeatureSignExtensionOps(v)
},
},
}
for _, tt := range tests {