Commit Graph

67 Commits

Author SHA1 Message Date
liang.he
40b430fd24
Add a script to translate jitted function names in flamegraph (#2906) 2023-12-21 10:57:58 +08:00
Cengizhan Pasaoglu
45a4e774de
Upgrade cJSON version to v1.7.16 (#2404) 2023-07-31 18:14:50 +08:00
Ben Riegel
72fc872afe
wamr-ide: Add vscode extension tests (#2292)
This PR adds tests for #2219 by changing the `compilation_on_android_ubuntu.yml` workflow.
The first run will take about two hours, since LLDB is built from scratch. Later, the build is
cached and the whole job should not take more than three minutes.

Core of the PR is an integration test that boots up vscode and lets it debug a test WASM file.
2023-06-20 15:33:01 +08:00
Ben Riegel
fca81fcd98
Add Rust Formatters to Debugger (Vector, Map etc.) (#2219)
This PR adds LLDB formatters so that variables are human-readable when debugging
Rust code in VS Code. This includes Tuple, Slice, String, Vector, Map, Enum etc.

It also distributes a standalone Python version with LLDB. This solution enables high
portability, so Ubuntu 20.04 and 22.04 can for example still be supported with the
same build since glibc is statically linked in the Python build, also making it easier to
support more operating systems in the future.

Known Issues: Enum types are not displayed correctly. 

For more details, refer to:
https://github.com/bytecodealliance/wasm-micro-runtime/pull/2219
2023-06-14 19:53:51 +08:00
Ben
ff0752b4ff
Fix wamr-ide debugger ignoring launch config (#2155)
The `DebugConfigurationProvider` was overwriting configurations provided
in `launch.json`. In particular, this for example prevented from specifying a
custom port for the debugger.

Example `launch.json`
```
{
    "configurations": [
        {
            "type": "wamr-debug",
            "request": "attach",
            "name": "Attach Debugger",
            "stopOnEntry": true,
            "attachCommands": [
                "process connect -p wasm connect://127.0.0.1:1237"
            ]
        }
    ]
}
```

Co-authored-by: Ben Riegel <benjuri@amazon.com>
2023-05-10 12:47:43 +08:00
YAMAMOTO Takashi
8abb153546
VSCode-Extension: Download lldb built for ubuntu 20.04 (#2139)
This should allow users to use the vscode extension on ubuntu 20.04.

After https://github.com/bytecodealliance/wasm-micro-runtime/pull/2132 ,
our lldb binary for 20.04 works on ubuntu 22.04 as well.

On the other hand, lldb for 22.04 has no chance to work on ubuntu 20.04.
(because of glibc version requirement.)
2023-04-23 14:33:52 +08:00
Wenyong Huang
6af87855b4
Update version number and release notes (#2103)
And restore the CI vsce publish and change the wamride publisher name.
2023-04-04 12:13:40 +08:00
Wang Ning
0a7994ac0a
wamr-ide: Modify Dockerfile to update base image version and fix build bug (#2068) 2023-03-28 14:21:32 +08:00
liang.he
d0fb2716b6
Fix several issues in CI binary releasing (#2064) 2023-03-26 12:19:45 +08:00
Wenyong Huang
27e7e160af
Upgrade toolkits (#1878)
Upgrade the version of related toolkits:
- upgrade llvm to 15.0
- upgrade wasi-sdk to 19.0
- upgrade emsdk to 3.1.28
- upgrade wabt to 1.0.31
- upgrade binaryen to 111

And upgrade the CI scripts, sample workload build scripts, Dockerfiles, and documents.
2023-02-02 09:42:25 +08:00
Wang Ning
45c003e6e4
Add docker images auto check and setup support for WAMR-IDE (#1882)
1. Add docker images auto check and setup support for WAMR-IDE
2. Fix bug that the code goes on when user skips install
2023-01-29 09:41:03 +08:00
Qiang
4cd88a96d5
Add more types and APIs for attr_container (#1841)
Add more types for attr_container, e.g. uint8, uint32, uint64
Add more APIs for attr_container for int8, int16 and int32 types
Rename fields of the union 'jvalue' and refactor some files that use attr_container
2023-01-09 21:05:30 +08:00
Fadumina
df4b135086
Add WAMR-IDE vscode extension to the Visual Studio Marketplace (#1868)
Publish an extension to the visual studio marketplace using a secret token.
This allows for automation to take place because downloading and installing
the extension is a manual process so it'd be simpler if the extension was
published automatically through the visual studio marketplace.
2023-01-09 18:23:37 +08:00
Wang Ning
679a8ab3cb
Perfect the codebase for wamr-ide (#1817)
Fix errors and warnings reported by eslint
Add CONTRIBUTING document for vscode-extension
2022-12-27 15:04:36 +08:00
TianlongLiang
6fd8001eb6
Update CIs and documents to make naming of generated binaries consistent (#1823) 2022-12-24 09:17:39 +08:00
Wenyong Huang
fb8727ba68
Update release notes and fix issues reported by Coverity (#1813) 2022-12-16 14:16:58 +08:00
TianlongLiang
d0c4c7036b
vscode-extension: Run docker image with the same version as WAMR (#1815) 2022-12-16 14:15:32 +08:00
Wenyong Huang
97d2b5a060
Publish the docker image with tar/zip files (#1808)
And fix issue found in fast jit call indirect.
2022-12-14 09:42:03 +08:00
Callum Macmillan
6eaf779a2d
Install patched LLDB on vscode extension activation (#1637)
Download and install the WAMR patched LLDB binary on vscode extension activation.

This allows the user to download the packaged .vsix file, where the activation script
should handle determining what LLDB binary they should use, and install it in the
correct location.
2022-12-01 10:39:14 +08:00
TrellixVulnTeam
7ad3412591
Adding tarfile member sanitization to extractall() (#1709)
Fix a widespread bug named CVE-2007-4559, which is a 15 year old bug
in the Python tarfile package. By using extract() or extractall() on a tarfile
object without sanitizing input, a maliciously crafted .tar file could
perform a directory path traversal attack. This patch essentially checks to
see if all tarfile members will be extracted safely and throws an exception
otherwise.
2022-11-17 11:52:30 +08:00
Wenyong Huang
84161fe084
Add CIs to release new version and publish binary files (#1648)
Add CIs to enable the release process of a new version of WAMR,
and build and publish the binary files when a version is released,
including iwasm, wamrc, lldb, vscode-extension and wamr-ide for
Ubuntu-20.04, Ubuntu-22.04 and MacOS.

And refine the CIs to test spec cases.
2022-10-28 13:55:41 +08:00
Christian Clauss
fa736d1ee9
Fix syntax errors and undefined names in Python code (#1515) 2022-09-27 15:57:08 +08:00
Hiroshi Hatake
3693cbe54d
Suppress hadolint warnings for pinning versions part (#1511)
Related to https://github.com/bytecodealliance/wasm-micro-runtime/issues/1418.

Suppress hadolint warnings for pinning version.
This is because these warnings are for reproducible builds.
But for development and CIs, ordinary case developers have to use the latest packages.
2022-09-23 10:34:47 +08:00
TianlongLiang
ee210d019f
Dockerfile lint errors fix (#1493)
Fix the Dockerfile linter errors and most warnings
2022-09-22 13:06:11 +08:00
Wang Ning
7593668066
WARM-IDE: Add check for invalid project name when creating new project (#1461) 2022-09-08 17:34:24 +08:00
YAMAMOTO Takashi
0a08b92662
VSCode-Extension: Add empty platform directories (#1460) 2022-09-07 14:30:39 +08:00
YAMAMOTO Takashi
9f09e2661f
wamr-ide/VSCode-Extension: Make lldb binary path per platform (#1437)
hopefully this allows an extension package to run on multiple platforms.

cf. https://code.visualstudio.com/api/extension-guides/debugger-extension#anatomy-of-the-package.json-of-a-debugger-extension
2022-09-01 12:33:59 +08:00
YAMAMOTO Takashi
47f17ef8f5
wamr-ide/VSCode-Extension: "set -e" in shell scripts (#1436)
To avoid mysterious behaviors caused by ignored errors.
2022-08-31 17:27:24 +08:00
Wenyong Huang
9cf7b88bad
Enhance cmake makefiles (#1390)
Upgrade `cmake_minimum_required` from `(VERSION 2.8)` to `(VERSION 2.9)` to
yield the warning:
"Compatibility with CMake < 2.8.12 will be removed from a future version of CMake"

Add "-Wno-unused" for CMAKE_CXX_FLAGS to yield the compilation warnings
when build LLVM JIT.

Fix the link error when code coverage is enabled.
2022-08-18 16:27:01 +08:00
YAMAMOTO Takashi
e8f0c9580b
Some wamr-ide improvements (#1354)
including:
- enable macOS support
- documentation improvements
- fix some warnings
2022-08-08 17:52:47 +08:00
Wang Ning
653b926d53
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
2022-07-29 08:12:36 +08:00
liang.he
ed512c6867
Fix issues detected by Coverity (#1154)
wasm_c_api.c: add more checks, fix LOG_WARNING invalid specifier
aot_emit_aot_file: fix strncpy max size length to copy
posix.c: fix potential socket not close issue
wasm-c-api samples: add return value checks for fseek/ftell
cJSON.c: remove dead code
2022-05-07 18:53:02 +08:00
Wenyong Huang
21e59d883f
Add return value checks for cJSON library (#1153) 2022-05-07 17:31:54 +08:00
Wenyong Huang
2bac6a42a7
Fix some issues reported by Coverity (#1150)
module_wasm_app.c: add return value check for wasm_runtime_call_wasm
aot_runtime.c: add return value check for aot_get_default_memory
aot_runtime.c: add return value check before calling wasm app malloc/free func
wasm_runtime_common.c: fix dead code warning in wasm_runtime_load_from_sections
aot_emit_memory.c: fix potential integer overflow issue
wasm_runtime.c: remove dead code in memory_instantiate, add assertion for globals
samples simple/gui/littlevgl: fix fields of struct sigaction initialization issue
host-tool: add return value check for sendto
2022-05-07 16:51:43 +08:00
Xu Jun
a7f4c3c15c
Fix app manager/framework issues reported by Coverity (#1155)
runtime_sensor.c: add return value check for os_mutex_init
                             fix find_sensor_client
sensor_mgr_ref.c: add return value check for init_sensor_framework
app_manager_host.c: add return value check for app_manager_host_init
module_wasm_app.c: add bh_assert for m_data
                                   fix mkdir potential issue
sample littlevgl/gui/simple: add return value check for init_sensor_framework
host_tool: add more check for g_conn_fd
2022-05-07 15:43:34 +08:00
Wenyong Huang
9c87a1ee17
Implement part of Berkeley Socket API for libc-wasi (#1036)
Refer to [Networking API design](https://github.com/WebAssembly/WASI/issues/370)
and [feat(socket): berkeley socket API v2](https://github.com/WebAssembly/WASI/pull/459):

- Support the socket API of synchronous mode, including `socket/bind/listen/accept/send/recv/close/shutdown`,
    the asynchronous mode isn't supported yet.
- Support adding `--addr-pool=<pool1,pool2,..>` argument for command line to identify the valid ip address range
- Add socket-api sample and update the document
2022-03-10 15:13:38 +08:00
Wenyong Huang
e2403c3ee9
Update documents (#984)
Fix wamr-ide link error, set wamr-ide to experimental and fix README issues
2022-01-25 20:24:33 +08:00
Wenyong Huang
d925369a1f
Implement WAMR-IDE with vscode extension (#943)
Implement WAMR-IDE with vscode extension to enable developing
WebAssembly applications with coding, building, running and
debugging support. Support both Linux and Windows, and only
support putting all the tools in a docker image, e.g. wasi-sdk, wamrc,
iwasm and so on.

Co-authored-by: Wang Ning <justdoitwn@163.com>
2022-01-25 10:10:12 +08:00
Xu Jun
b9fd8f916b
update IoT cloud demo (#876)
* update IoT APP store demo

* update IoT app store apps

* update IoT cloud demo document

* [Cloud demo] mount app store between two dockers

* [Cloud demo] update restart policy

* [Cloud demo] update help page

* [Cloud demo] update online demo address
2021-12-07 20:19:23 +08:00
Wenyong Huang
6b3a939370
Enable auto install wasi-sdk when build wamr-sdk (#796)
And fix -q[<App Name>] show error in host_tool help.
2021-10-22 16:53:25 +08:00
Wenyong Huang
32242988ed
Apply clang-format for more source files (#795)
Apply clang-format for C source files in folder core/app-mgr,
core/app-framework, and test-tools.
And rename folder component_test to component-test, update
zephyr build document.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-10-21 13:58:34 +08:00
Wenyong Huang
7be0d385a6
Implement SIMD latest opcodes and update LLVM to 13.0 (#758)
Implement the latest SIMD opcodes and update LLVM 13.0,
update the llvm build scripts, update the sample workloads‘ build scripts,
and build customized wasi-sdk to build some workloads.
Also refine the CI rules.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-09-17 19:12:57 +08:00
Wenyong Huang
d11743b8e2
Enable mpu stack for latest zephyr to enable app manager (#673)
And output detail info when install wasm app failed, update document and fix some compile warnings and errors.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-07-27 12:22:22 +08:00
Bao Haojun
a332a49a0d
Enable sample/simple for aarch64 (#616)
Fixed a typo in aot_reloc_aarch64.c.
Remove -m32 option in host tool CMakeLists.txt and change data type of structure fields to make host tool work in 64-bit.

Signed-off-by: Bao Haojun <baohaojun@lixiang.com>
2021-04-25 19:12:49 +08:00
Wenyong Huang
be54b4c7cc
Fix sample littlevgl/gui build issues on zephyr platform (#588)
Fix sample littlevgl/guil build issues on zephyr platform, modify code of zephyr platform by adding some macros to control some apis to fit different zephyr version, and align to zephyr-v2.3.0 for sample littlevgl/gui as the latest zephyr version (>=v2.4.0) requires that the thread stack for the thread to create must be defined by macro but not allocating stack memory dynamically.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-03-23 14:20:50 +08:00
Wenyong Huang
54e82ec439
Fix app manager fail to install large app file issue (#555)
Remove the limit of app file size no larger than 1 MB, fix possible memory leak issues when fail to install app file, change message size of aee_host_msg_callback() from uint16 type to uint32 type to fix possible integer overflow issue, and fix some coding style issues of app manager.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-03-03 20:19:24 +08:00
Wenyong Huang
724858c731
Update wasm app build scripts for wasi-sdk-12 and refine interpreter (#481)
Update wasm app build scripts for wasi-sdk-12.0: add --export=__main_argc_argv, remove --no-threads
Lookup function with name "__main_argc_argv" as main function besides "main"
Change module_malloc to runtime_malloc in wasi native lib
Refine classic interpreter op_block and op_br_table
Refine faster interpreter op_br_table

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2020-12-28 10:46:31 +08:00
Xu Jun
0226dbbb3d
introduce WAMR memory profiling tool (experimental) (#390) 2020-09-18 18:04:56 +08:00
Weining
1a85051415
Implement multi-value feature and import binarydump tool (#308) 2020-07-10 16:29:15 +08:00
Josh Triplett
548926ab1a Rename "master" branch to "main"
Update all links accordingly. Also update links to other repositories
whose branches have renamed.

The references to repositories whose branches have not renamed should be
referencing specific commits anyway, so reference those specific commits
by hash.
2020-06-27 02:39:47 -07:00