Upgrade WAMR-IDE (#1313)
Upgrade WAMR-IDE: test-tools/wamr-ide folder - add `wamr-sdk` to include libc-builtin-sysroot header files - add `prettier` check and apply script in `package.json` - update `wasm-toolchain` dockerfile and resource - enhance `build | run | debug` process to clean up the container - enhance the change workspace - enhance `wasm` type project check before building, running and debugging - format the project_compilation.json - update documents
This commit is contained in:
32
test-tools/wamr-ide/WASM-Debug-Server/Docker/Dockerfile
Normal file
32
test-tools/wamr-ide/WASM-Debug-Server/Docker/Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
FROM gcc:9.3.0 AS BASE
|
||||
|
||||
## set work directory
|
||||
WORKDIR /root/
|
||||
COPY resource /root/
|
||||
|
||||
## - download cmake with wget and set up
|
||||
RUN wget https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-linux-x86_64.tar.gz \
|
||||
&& tar -zxvf cmake-3.21.1-linux-x86_64.tar.gz \
|
||||
&& rm -f cmake-3.21.1-linux-x86_64.tar.gz \
|
||||
&& mv cmake-3.21.1-linux-x86_64 /opt/cmake \
|
||||
&& ln -s /opt/cmake/bin/cmake /bin/cmake \
|
||||
&& apt-get install make
|
||||
|
||||
## -clone wamr-repo and build iwasm
|
||||
RUN git clone -b main --depth=1 https://github.com/bytecodealliance/wasm-micro-runtime.git \
|
||||
&& cd /root/wasm-micro-runtime/product-mini/platforms/linux \
|
||||
&& mkdir build && cd build \
|
||||
&& cmake .. -DWAMR_BUILD_DEBUG_INTERP=1 && make \
|
||||
&& cp /root/wasm-micro-runtime/product-mini/platforms/linux/build/iwasm /root/iwasm \
|
||||
&& rm -fr /root/wasm-micro-runtime
|
||||
|
||||
FROM ubuntu:20.04
|
||||
# COPY files from BASE image
|
||||
COPY --from=BASE /root/iwasm /root
|
||||
COPY --from=BASE /root/debug.sh /root
|
||||
COPY --from=BASE /root/run.sh /root
|
||||
|
||||
WORKDIR /root/
|
||||
21
test-tools/wamr-ide/WASM-Debug-Server/Docker/README.md
Normal file
21
test-tools/wamr-ide/WASM-Debug-Server/Docker/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
### Build Docker Image
|
||||
|
||||
- Linux
|
||||
|
||||
```shell
|
||||
chmod +x resource/*
|
||||
./build_docker_image.sh
|
||||
```
|
||||
|
||||
- Windows
|
||||
|
||||
```shell
|
||||
./build_docker_image.bat
|
||||
```
|
||||
|
||||
|
||||
### Resource Details
|
||||
|
||||
- `Dockerflie` is the source file to build `wasm-debug-server` docker image
|
||||
- `resource/debug.sh` is the script to execute the wasm app in debug mod, will start up the debugger server inside of the `iwasm` and hold to wait for connecting.
|
||||
- `resource/run.sh` is the script to execute the wasm app directly.
|
||||
@ -0,0 +1,8 @@
|
||||
@REM Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
@REM SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
@echo off
|
||||
docker build -t wasm-debug-server:1.0 .
|
||||
|
||||
@REM delete intermediate docker image
|
||||
docker image prune -f
|
||||
8
test-tools/wamr-ide/WASM-Debug-Server/Docker/build_docker_image.sh
Executable file
8
test-tools/wamr-ide/WASM-Debug-Server/Docker/build_docker_image.sh
Executable file
@ -0,0 +1,8 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
#!/bin/bash
|
||||
docker build -t wasm-debug-server:1.0 .
|
||||
|
||||
# delete intermediate docker image
|
||||
docker image prune -f
|
||||
6
test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/debug.sh
Executable file
6
test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/debug.sh
Executable file
@ -0,0 +1,6 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
#!/bin/bash
|
||||
TARGET=$1
|
||||
./iwasm -g=0.0.0.0:1234 /mnt/build/${TARGET}.wasm
|
||||
6
test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/run.sh
Executable file
6
test-tools/wamr-ide/WASM-Debug-Server/Docker/resource/run.sh
Executable file
@ -0,0 +1,6 @@
|
||||
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
#!/bin/bash
|
||||
TARGET=$1
|
||||
./iwasm /mnt/build/${TARGET}.wasm
|
||||
Reference in New Issue
Block a user