From 24be9a012ff6d6ee42712308ff17b065a8c519df Mon Sep 17 00:00:00 2001 From: yomaytk Date: Tue, 22 Oct 2024 08:54:44 +0000 Subject: [PATCH] Add xterm-pty to examples. --- .devcontainer.json | 4 ++-- .gitmodules | 3 +++ scripts/dev.sh | 5 ++++- xterm-pty | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) create mode 160000 xterm-pty diff --git a/.devcontainer.json b/.devcontainer.json index 7a00aa2..7eddbf3 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -8,8 +8,8 @@ "settings": { "terminal.integrated.shell.linux": "/bin/bash", }, - + "appPort": ["8080:8080"], "workspaceMount": "source=${localWorkspaceFolder},target=/root/elfconv,type=bind,consistency=cached", "workspaceFolder": "/root/elfconv" -} \ No newline at end of file +} diff --git a/.gitmodules b/.gitmodules index a91c699..ecfcf18 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "examples/mnist-neural-network-plain-c"] path = examples/mnist-neural-network-plain-c url = https://github.com/AndrewCarterUK/mnist-neural-network-plain-c +[submodule "xterm-pty"] + path = xterm-pty + url = https://github.com/mame/xterm-pty diff --git a/scripts/dev.sh b/scripts/dev.sh index aab596f..77e2dd2 100755 --- a/scripts/dev.sh +++ b/scripts/dev.sh @@ -112,9 +112,12 @@ main() { $WASMCC $WASMCCFLAGS $ELFCONV_MACROS $ELFCONV_DEBUG_MACROS -o Util.wasm.o -c ${UTILS_DIR}/Util.cpp && \ $WASMCC $WASMCCFLAGS $ELFCONV_MACROS $ELFCONV_DEBUG_MACROS -o elfconv.wasm.o -c ${UTILS_DIR}/elfconv.cpp && \ $WASMCC $WASMCCFLAGS -c lift.ll -o lift.wasm.o - $WASMCC $WASMCCFLAGS -o exe.wasm.html -sALLOW_MEMORY_GROWTH lift.wasm.o Entry.wasm.o Runtime.wasm.o Memory.wasm.o Syscall.wasm.o \ + $WASMCC $WASMCCFLAGS -o exe.js -sALLOW_MEMORY_GROWTH -sASYNCIFY -sEXPORT_ES6 -sENVIRONMENT=web --js-library ${ROOT_DIR}/xterm-pty/emscripten-pty.js \ + lift.wasm.o Entry.wasm.o Runtime.wasm.o Memory.wasm.o Syscall.wasm.o \ VmIntrinsics.wasm.o Util.wasm.o elfconv.wasm.o echo -e "[\033[32mINFO\033[0m] Generate WASM binary." + cp exe.js ${ROOT_DIR}/examples/browser + cp exe.wasm ${ROOT_DIR}/examples/browser # delete obj cd "${BUILD_LIFTER_DIR}" && rm *.o return 0 diff --git a/xterm-pty b/xterm-pty new file mode 160000 index 0000000..64f491a --- /dev/null +++ b/xterm-pty @@ -0,0 +1 @@ +Subproject commit 64f491a5c1fa4e69a8b9c52d35e5f256a6866830