From 1948909ec0b1b9aab95b31ac52d3469a4b9eeddf Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Thu, 18 Aug 2022 21:31:13 +0900 Subject: [PATCH] Fixes doc drifts on NewRuntimeConfig (#750) Signed-off-by: Takeshi Yoneda --- README.md | 6 +++--- site/content/_index.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cde09bcc..cfababfa 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ func main() { } // Create a new WebAssembly Runtime. - r := wazero.NewRuntime() + r := wazero.NewRuntime(ctx) defer r.Close(ctx) // This closes everything this Runtime created. // Instantiate the module and return its exported functions @@ -108,9 +108,9 @@ they may answer them for you! There are two runtime configurations supported in wazero: _Compiler_ is default: -If you don't choose, ex `wazero.NewRuntime()`, Compiler is used if supported. You can also force the interpreter like so: +If you don't choose, ex `wazero.NewRuntime(ctx)`, Compiler is used if supported. You can also force the interpreter like so: ```go -r := wazero.NewRuntimeWithConfig(wazero.NewRuntimeConfigInterpreter()) +r := wazero.NewRuntimeWithConfig(ctx, wazero.NewRuntimeConfigInterpreter()) ``` ### Interpreter diff --git a/site/content/_index.md b/site/content/_index.md index fb2bf264..50428d2c 100644 --- a/site/content/_index.md +++ b/site/content/_index.md @@ -28,7 +28,7 @@ func main() { } // Create a new WebAssembly Runtime. - r := wazero.NewRuntime() + r := wazero.NewRuntime(ctx) defer r.Close(ctx) // This closes everything this Runtime created. // Instantiate the module and return its exported functions