From a06d30e11876474f0c3db516b392d0d98dfd2bc9 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 11 Apr 2024 13:43:15 +0200 Subject: [PATCH] Fix example in README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c0a501c..75f2581 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,10 @@ let fds = [ new OpenFile(new File([])), // stdin ConsoleStdout.lineBuffered(msg => console.log(`[WASI stdout] ${msg}`)), ConsoleStdout.lineBuffered(msg => console.warn(`[WASI stderr] ${msg}`)), - new PreopenDirectory(".", { - "example.c": new File(new TextEncoder("utf-8").encode(`#include "a"`)), - "hello.rs": new File(new TextEncoder("utf-8").encode(`fn main() { println!("Hello World!"); }`)), - }), + new PreopenDirectory(".", [ + ["example.c", new File(new TextEncoder("utf-8").encode(`#include "a"`))], + ["hello.rs", new File(new TextEncoder("utf-8").encode(`fn main() { println!("Hello World!"); }`))], + ]), ]; let wasi = new WASI(args, env, fds);