From c5611636fb03ce71f50a9bca958c79d23b55be00 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Tue, 3 Nov 2020 01:50:45 +0800 Subject: feat(std/wasi): add start method to Context (#8141) This adds a start method to the Context to make starting a command less tedious and yield consistent errors. Manually setting the memory is still valid for more complex scenarios, just undocumented for the time being. --- std/wasi/snapshot_preview1_test_runner.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'std/wasi/snapshot_preview1_test_runner.ts') diff --git a/std/wasi/snapshot_preview1_test_runner.ts b/std/wasi/snapshot_preview1_test_runner.ts index 39f32db57..65cb7bd3b 100644 --- a/std/wasi/snapshot_preview1_test_runner.ts +++ b/std/wasi/snapshot_preview1_test_runner.ts @@ -16,8 +16,4 @@ const instance = new WebAssembly.Instance(module, { "wasi_snapshot_preview1": context.exports, }); -const memory = instance.exports.memory as WebAssembly.Memory; -context.memory = memory; - -const start = instance.exports._start as CallableFunction; -start(); +context.start(instance); -- cgit v1.2.3