wasi: fast calls · nodejs/node@7bd6a2c · GitHub
Skip to content

Commit 7bd6a2c

Browse files
devsnektargos
authored andcommitted
wasi: fast calls
PR-URL: #43697 Backport-PR-URL: #45908 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent e294410 commit 7bd6a2c

28 files changed

Lines changed: 850 additions & 1184 deletions

src/node_wasi.cc

Lines changed: 705 additions & 1121 deletions
Large diffs are not rendered by default.

src/node_wasi.h

Lines changed: 135 additions & 60 deletions

test/wasi/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
CC = /opt/wasi-sdk/bin/clang
2-
TARGET = wasm32-unknown-wasi
2+
TARGET = wasm32-wasi
33
SYSROOT =
4+
CFLAGS = -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks
45

56
OBJ = $(patsubst c/%.c, wasm/%.wasm, $(wildcard c/*.c))
67
all: $(OBJ)
78

89
wasm/%.wasm : c/%.c
9-
$(CC) $< --target=$(TARGET) --sysroot=$(SYSROOT) -s -o $@
10+
$(CC) $< $(CFLAGS) --target=$(TARGET) --sysroot=$(SYSROOT) -s -o $@
1011

1112
.PHONY clean:
1213
rm -f $(OBJ)

test/wasi/test-wasi.js

Lines changed: 7 additions & 1 deletion

test/wasi/wasm/cant_dotdot.wasm

-1.83 KB
Binary file not shown.

test/wasi/wasm/clock_getres.wasm

-11.5 KB
Binary file not shown.

test/wasi/wasm/create_symlink.wasm

-2.72 KB
Binary file not shown.

test/wasi/wasm/exitcode.wasm

-11.6 KB
Binary file not shown.
-11.5 KB
Binary file not shown.

test/wasi/wasm/follow_symlink.wasm

-2.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)