Tweaks doc for NewRuntimeConfig to describe API behavior (#603)

Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
This commit is contained in:
Anuraag Agrawal
2022-05-30 11:07:03 +09:00
committed by GitHub
parent 029a79476b
commit 062bee4845
3 changed files with 8 additions and 4 deletions

View File

@@ -137,6 +137,12 @@ type RuntimeConfig interface {
WithWasmCore2() RuntimeConfig
}
// NewRuntimeConfig returns a RuntimeConfig using the compiler if it is supported in this environment,
// or the interpreter otherwise.
func NewRuntimeConfig() RuntimeConfig {
return newRuntimeConfig()
}
type runtimeConfig struct {
enabledFeatures wasm.Features
newEngine func(wasm.Features) wasm.Engine