Skip to content

Commit 85c0bc2

Browse files
authored
Merge branch 'bytecodealliance:main' into master
2 parents ed3d02e + e92fa87 commit 85c0bc2

File tree

453 files changed

+72672
-11173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

453 files changed

+72672
-11173
lines changed

_clang-format renamed to .clang-format

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,67 @@
1-
---
2-
BasedOnStyle: Mozilla
3-
IndentWidth: 4
1+
RawStringFormats:
2+
- Language: Cpp
3+
Delimiters:
4+
- c
5+
- C
6+
- cc
7+
- CC
8+
- cpp
9+
- Cpp
10+
- CPP
11+
- 'c++'
12+
- 'C++'
13+
- h
14+
- hpp
15+
CanonicalDelimiter: ''
16+
BasedOnStyle: google
17+
- Language: TextProto
18+
Delimiters:
19+
- pb
20+
- PB
21+
- proto
22+
- PROTO
23+
EnclosingFunctions:
24+
- EqualsProto
25+
- EquivToProto
26+
- PARSE_PARTIAL_TEXT_PROTO
27+
- PARSE_TEST_PROTO
28+
- PARSE_TEXT_PROTO
29+
- ParseTextOrDie
30+
- ParseTextProtoOrDie
31+
CanonicalDelimiter: ''
32+
BasedOnStyle: google
433

5-
---
634
Language: Cpp
35+
BasedOnStyle: Mozilla
36+
IndentWidth: 4
37+
AlignAfterOpenBracket: Align
38+
AllowAllArgumentsOnNextLine: false
739
AlignConsecutiveMacros: true
840
AllowShortBlocksOnASingleLine: true
41+
AlwaysBreakAfterReturnType: All
942
BinPackArguments: true
10-
BinPackParameters: true
43+
BinPackParameters: false
44+
BreakBeforeBinaryOperators: NonAssignment
1145
BreakBeforeBraces: Custom
1246
BraceWrapping:
13-
AfterCaseLabel: false
47+
AfterCaseLabel: true
1448
AfterClass: true
1549
AfterControlStatement: false
16-
AfterEnum: true
50+
AfterEnum: false
1751
AfterFunction: true
1852
AfterNamespace: false
1953
AfterObjCDeclaration: false
20-
AfterStruct: true
54+
AfterStruct: false
2155
AfterUnion: false
22-
AfterExternBlock: true
56+
AfterExternBlock: false
2357
BeforeCatch: false
24-
BeforeElse: false
58+
BeforeElse: true
2559
IndentBraces: false
2660
SplitEmptyFunction: true
2761
SplitEmptyRecord: false
2862
SplitEmptyNamespace: true
2963
ColumnLimit: 79
64+
ContinuationIndentWidth: 2
3065
DerivePointerAlignment: false
3166
IncludeBlocks: Regroup
3267
IncludeCategories:
@@ -36,20 +71,23 @@ IncludeCategories:
3671
Priority: 1
3772
- Regex: ".*"
3873
Priority: 3
74+
IndentPPDirectives: None
75+
KeepEmptyLinesAtTheStartOfBlocks: false
76+
NamespaceIndentation: None
3977
PointerAlignment: Right
4078
ReflowComments: false
41-
Standard: Cpp03
79+
SortIncludes: false
80+
Standard: Auto
4281
StatementMacros:
4382
- Q_UNUSED
4483
- QT_REQUIRE_VERSION
84+
4585
# AccessModifierOffset: -2
46-
# AlignAfterOpenBracket: Align
4786
# AlignConsecutiveAssignments: false
4887
# AlignConsecutiveDeclarations: false
4988
# AlignEscapedNewlines: Right
5089
# AlignOperands: true
5190
# AlignTrailingComments: true
52-
# AllowAllArgumentsOnNextLine: true
5391
# AllowAllConstructorInitializersOnNextLine: true
5492
# AllowAllParametersOfDeclarationOnNextLine: false
5593
# AllowShortCaseLabelsOnASingleLine: false
@@ -61,7 +99,6 @@ StatementMacros:
6199
# AlwaysBreakAfterReturnType: TopLevel
62100
# AlwaysBreakBeforeMultilineStrings: false
63101
# AlwaysBreakTemplateDeclarations: Yes
64-
# BreakBeforeBinaryOperators: None
65102
# BreakBeforeInheritanceComma: false
66103
# BreakInheritanceList: BeforeComma
67104
# BreakBeforeTernaryOperators: true
@@ -73,7 +110,6 @@ StatementMacros:
73110
# CompactNamespaces: false
74111
# ConstructorInitializerAllOnOneLineOrOnePerLine: false
75112
# ConstructorInitializerIndentWidth: 2
76-
# ContinuationIndentWidth: 2
77113
# Cpp11BracedListStyle: false
78114
# DisableFormat: false
79115
# ExperimentalAutoDetectBinPacking: false
@@ -84,15 +120,13 @@ StatementMacros:
84120
# - BOOST_FOREACH
85121
# IncludeIsMainRegex: '(Test)?$'
86122
# IndentCaseLabels: true
87-
# IndentPPDirectives: None
88123
# IndentWrappedFunctionNames: false
89124
# JavaScriptQuotes: Leave
90125
# JavaScriptWrapImports: true
91126
# KeepEmptyLinesAtTheStartOfBlocks: true
92127
# MacroBlockBegin: ''
93128
# MacroBlockEnd: ''
94129
# MaxEmptyLinesToKeep: 1
95-
# NamespaceIndentation: None
96130
# ObjCBinPackProtocolList: Auto
97131
# ObjCBlockIndentWidth: 2
98132
# ObjCSpaceAfterProperty: true

.github/workflows/android.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: android
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branches: [ main ]
10+
pull_request:
11+
branches: [ main ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
build:
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
26+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27+
- uses: actions/checkout@v2
28+
29+
- name: Build iwasm [default]
30+
run: |
31+
cd product-mini/platforms/android
32+
mkdir build && cd build
33+
cmake ..
34+
make
35+
cd .. && rm -rf build
36+
- name: Build iwasm [Classic interp]
37+
run: |
38+
cd product-mini/platforms/android
39+
mkdir build && cd build
40+
cmake .. -DWAMR_BUILD_FAST_INTERP=0
41+
make
42+
cd .. && rm -rf build
43+
- name: Build iwasm [Multi module]
44+
run: |
45+
cd product-mini/platforms/android
46+
mkdir build && cd build
47+
cmake .. -DWAMR_BUILD_MULTI_MODULE=1
48+
make
49+
cd .. && rm -rf build
50+
- name: Build iwasm [lib-pthread]
51+
run: |
52+
cd product-mini/platforms/android
53+
mkdir build && cd build
54+
cmake .. -DWAMR_BUILD_LIB_PTHREAD=1
55+
make
56+
cd .. && rm -rf build
57+
- name: Build iwasm [aot only]
58+
run: |
59+
cd product-mini/platforms/android
60+
mkdir build && cd build
61+
cmake .. -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0
62+
make
63+
cd .. && rm -rf build
64+
- name: Build iwasm [interp only]
65+
run: |
66+
cd product-mini/platforms/android
67+
mkdir build && cd build
68+
cmake .. -DWAMR_BUILD_AOT=0
69+
make
70+
cd .. && rm -rf build
71+
- name: Build iwasm [memory profiling]
72+
run: |
73+
cd product-mini/platforms/android
74+
mkdir build && cd build
75+
cmake .. -DWAMR_BUILD_MEMORY_PROFILING=1
76+
make
77+
cd .. && rm -rf build
78+
- name: Build iwasm [tail call]
79+
run: |
80+
cd product-mini/platforms/android
81+
mkdir build && cd build
82+
cmake .. -DWAMR_BUILD_TAIL_CALL=1
83+
make
84+
cd .. && rm -rf build
85+
- name: Build iwasm [custom name section]
86+
run: |
87+
cd product-mini/platforms/android
88+
mkdir build && cd build
89+
cmake .. -DWAMR_BUILD_CUSTOM_NAME_SECTION=1
90+
make
91+
cd .. && rm -rf build

.github/workflows/linux.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Copyright (C) 2019 Intel Corporation. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3+
4+
name: Linux
5+
6+
# Controls when the action will run. Triggers the workflow on push or pull request
7+
# events but only for the main branch
8+
on:
9+
push:
10+
branches: [ main ]
11+
pull_request:
12+
branches: [ main ]
13+
14+
jobs:
15+
16+
build:
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
os: [ubuntu-18.04, ubuntu-20.04]
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Build iwasm [default]
25+
run: |
26+
cd product-mini/platforms/linux
27+
mkdir build && cd build
28+
cmake ..
29+
make
30+
cd .. && rm -rf build
31+
- name: Build iwasm [Classic interp]
32+
run: |
33+
cd product-mini/platforms/linux
34+
mkdir build && cd build
35+
cmake .. -DWAMR_BUILD_FAST_INTERP=0
36+
make
37+
cd .. && rm -rf build
38+
- name: Build iwasm [Multi module]
39+
run: |
40+
cd product-mini/platforms/linux
41+
mkdir build && cd build
42+
cmake .. -DWAMR_BUILD_MULTI_MODULE=1
43+
make
44+
cd .. && rm -rf build
45+
- name: Build iwasm [lib-pthread]
46+
run: |
47+
cd product-mini/platforms/linux
48+
mkdir build && cd build
49+
cmake .. -DWAMR_BUILD_LIB_PTHREAD=1
50+
make
51+
cd .. && rm -rf build
52+
- name: Build iwasm [aot only]
53+
run: |
54+
cd product-mini/platforms/linux
55+
mkdir build && cd build
56+
cmake .. -DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=0
57+
make
58+
cd .. && rm -rf build
59+
- name: Build iwasm [interp only]
60+
run: |
61+
cd product-mini/platforms/linux
62+
mkdir build && cd build
63+
cmake .. -DWAMR_BUILD_AOT=0
64+
make
65+
cd .. && rm -rf build
66+
- name: Build iwasm [memory profiling]
67+
run: |
68+
cd product-mini/platforms/linux
69+
mkdir build && cd build
70+
cmake .. -DWAMR_BUILD_MEMORY_PROFILING=1
71+
make
72+
cd .. && rm -rf build
73+
- name: Build iwasm [tail call]
74+
run: |
75+
cd product-mini/platforms/linux
76+
mkdir build && cd build
77+
cmake .. -DWAMR_BUILD_TAIL_CALL=1
78+
make
79+
cd .. && rm -rf build
80+
- name: Build iwasm [custom name section]
81+
run: |
82+
cd product-mini/platforms/linux
83+
mkdir build && cd build
84+
cmake .. -DWAMR_BUILD_CUSTOM_NAME_SECTION=1
85+
make
86+
cd .. && rm -rf build
87+
- name: download and install wasi-sdk
88+
run: |
89+
cd /opt
90+
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-8/wasi-sdk-8.0-linux.tar.gz
91+
tar -xzf wasi-sdk-8.0-linux.tar.gz
92+
mv wasi-sdk-8.0 wasi-sdk
93+
- name: download and install wabt
94+
run: |
95+
cd /opt
96+
wget https://github.com/WebAssembly/wabt/releases/download/1.0.19/wabt-1.0.19-ubuntu.tar.gz
97+
tar -xzf wabt-1.0.19-ubuntu.tar.gz
98+
mv wabt-1.0.19 wabt
99+
- name: Build Sample [wasm-c-api]
100+
run: |
101+
cd samples/wasm-c-api
102+
mkdir build && cd build
103+
cmake ..
104+
make
105+
./hello
106+
./global
107+
./callback
108+
- name: Build Sample [basic]
109+
run: |
110+
cd samples/basic
111+
./build.sh
112+
./run.sh
113+
- name: Build Sample [multi-thread]
114+
run: |
115+
cd samples/multi-thread
116+
mkdir build && cd build
117+
cmake ..
118+
make
119+
./iwasm wasm-apps/test.wasm
120+
- name: Build Sample [multi-module]
121+
run: |
122+
cd samples/multi-module
123+
mkdir build && cd build
124+
cmake ..
125+
make
126+
./multi_module
127+
- name: Build Sample [spawn-thread]
128+
run: |
129+
cd samples/spawn-thread
130+
mkdir build && cd build
131+
cmake ..
132+
make
133+
./spawn_thread

0 commit comments

Comments
 (0)