Skip to content

Commit 589cff6

Browse files
committedMar 6, 2021
Update wasm apps
1 parent 30729a8 commit 589cff6

File tree

22 files changed

+738
-664
lines changed

22 files changed

+738
-664
lines changed
 
Binary file not shown.

‎examples_pio/Wasm_Advanced/wasm_apps/assemblyscript/app.wasm.h

+182-304
Large diffs are not rendered by default.

‎examples_pio/Wasm_Advanced/wasm_apps/assemblyscript/package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎examples_pio/Wasm_Advanced/wasm_apps/assemblyscript/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"license": "MIT",
33
"scripts": {
44
"build": "npm run asbuild:optimized && xxd -i app.wasm > app.wasm.h",
5-
"asbuild:optimized": "npx asc app.ts -b app.wasm -t app.wat -O3z --runtime half --noAssert --use abort="
5+
"asbuild:optimized": "npx asc app.ts -b app.wasm -t app.wat -O3z --runtime stub --noAssert --use abort="
66
},
77
"devDependencies": {
8-
"assemblyscript": "^0.9.0"
8+
"assemblyscript": "^0.18.0"
99
}
1010
}
Binary file not shown.

‎examples_pio/Wasm_Advanced/wasm_apps/rust/app.wasm.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ unsigned char app_wasm[] = {
1010
0x69, 0x74, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x00, 0x00, 0x07,
1111
0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x05, 0x64, 0x65, 0x6c, 0x61,
1212
0x79, 0x00, 0x02, 0x03, 0x02, 0x01, 0x01, 0x05, 0x03, 0x01, 0x00, 0x01,
13-
0x06, 0x0d, 0x02, 0x7f, 0x00, 0x41, 0x90, 0x10, 0x0b, 0x7f, 0x00, 0x41,
14-
0x90, 0x10, 0x0b, 0x07, 0x2e, 0x04, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72,
15-
0x79, 0x02, 0x00, 0x0a, 0x5f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65,
16-
0x6e, 0x64, 0x03, 0x00, 0x0b, 0x5f, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x5f,
17-
0x62, 0x61, 0x73, 0x65, 0x03, 0x01, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72,
18-
0x74, 0x00, 0x05, 0x0a, 0x38, 0x01, 0x36, 0x01, 0x01, 0x7f, 0x41, 0x81,
19-
0x10, 0x41, 0x0f, 0x10, 0x00, 0x41, 0x80, 0x10, 0x41, 0x01, 0x10, 0x00,
13+
0x06, 0x0d, 0x02, 0x7f, 0x00, 0x41, 0x95, 0x10, 0x0b, 0x7f, 0x00, 0x41,
14+
0x95, 0x10, 0x0b, 0x07, 0x2e, 0x04, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72,
15+
0x79, 0x02, 0x00, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x00, 0x05,
16+
0x0a, 0x5f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x64, 0x03,
17+
0x00, 0x0b, 0x5f, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x73,
18+
0x65, 0x03, 0x01, 0x0a, 0x38, 0x01, 0x36, 0x01, 0x01, 0x7f, 0x41, 0x81,
19+
0x10, 0x41, 0x14, 0x10, 0x00, 0x41, 0x80, 0x10, 0x41, 0x01, 0x10, 0x00,
2020
0x10, 0x01, 0x22, 0x00, 0x41, 0x01, 0x10, 0x02, 0x03, 0x40, 0x20, 0x00,
2121
0x41, 0x01, 0x10, 0x03, 0x41, 0xe4, 0x00, 0x10, 0x04, 0x20, 0x00, 0x41,
2222
0x00, 0x10, 0x03, 0x41, 0x84, 0x07, 0x10, 0x04, 0x0c, 0x00, 0x0b, 0x00,
23-
0x0b, 0x0b, 0x17, 0x01, 0x00, 0x41, 0x80, 0x10, 0x0b, 0x10, 0x0a, 0x52,
23+
0x0b, 0x0b, 0x1c, 0x01, 0x00, 0x41, 0x80, 0x10, 0x0b, 0x15, 0x0a, 0x52,
2424
0x75, 0x73, 0x74, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69,
25-
0x6e, 0x67
25+
0x6e, 0x67, 0x20, 0xf0, 0x9f, 0x98, 0x8e
2626
};
27-
unsigned int app_wasm_len = 278;
27+
unsigned int app_wasm_len = 283;

‎examples_pio/Wasm_Advanced/wasm_apps/rust/src/app.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![no_std]
2-
#![feature(core_intrinsics)]
32

43
mod arduino;
54
use arduino::*;

‎examples_pio/Wasm_Advanced/wasm_apps/rust/src/arduino.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ pub fn println(string: &str) {
3838

3939
#[panic_handler]
4040
fn handle_panic(_: &core::panic::PanicInfo) -> ! {
41-
unsafe { core::intrinsics::unreachable() }
41+
unsafe { core::arch::wasm32::unreachable() }
4242
}
Binary file not shown.

‎examples_pio/Wasm_Advanced/wasm_apps/tinygo/app.wasm.h

+433-268
Large diffs are not rendered by default.

‎examples_pio/Wasm_Advanced/wasm_apps/tinygo/build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Prepare
2-
export PATH=/usr/local/tinygo/bin:$PATH
3-
export GOROOT=/opt/go
2+
export PATH=/opt/tinygo0.17.0/bin:$PATH
3+
export PATH=/opt/go1.15.2/bin:$PATH
4+
export GOROOT=/opt/go1.15.2
45

56
# Compile
67
tinygo build -target wasm \
78
-panic trap -wasm-abi generic \
89
-ldflags="-z stack-size=2048 --max-memory=65536" \
9-
-heap-size 4096 \
1010
-o app.wasm app.go
1111

1212
# Optimize (optional)

‎wasm_apps/assemblyscript/app.wasm

-1 Bytes
Binary file not shown.

‎wasm_apps/assemblyscript/app.wasm.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ unsigned char app_wasm[] = {
99
0x57, 0x72, 0x69, 0x74, 0x65, 0x00, 0x01, 0x07, 0x61, 0x72, 0x64, 0x75,
1010
0x69, 0x6e, 0x6f, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x00, 0x02, 0x03,
1111
0x03, 0x02, 0x00, 0x00, 0x05, 0x03, 0x01, 0x00, 0x00, 0x06, 0x06, 0x01,
12-
0x7f, 0x01, 0x41, 0x00, 0x0b, 0x07, 0x13, 0x02, 0x06, 0x6d, 0x65, 0x6d,
13-
0x6f, 0x72, 0x79, 0x02, 0x00, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74,
14-
0x00, 0x04, 0x08, 0x01, 0x05, 0x0a, 0x2e, 0x02, 0x25, 0x00, 0x23, 0x00,
12+
0x7f, 0x01, 0x41, 0x00, 0x0b, 0x07, 0x13, 0x02, 0x06, 0x5f, 0x73, 0x74,
13+
0x61, 0x72, 0x74, 0x00, 0x04, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79,
14+
0x02, 0x00, 0x08, 0x01, 0x05, 0x0a, 0x2d, 0x02, 0x24, 0x00, 0x23, 0x00,
1515
0x41, 0x01, 0x10, 0x01, 0x03, 0x40, 0x23, 0x00, 0x41, 0x01, 0x10, 0x02,
1616
0x41, 0xe4, 0x00, 0x10, 0x03, 0x23, 0x00, 0x41, 0x00, 0x10, 0x02, 0x41,
17-
0x84, 0x07, 0x10, 0x03, 0x0c, 0x00, 0x00, 0x0b, 0x00, 0x0b, 0x06, 0x00,
18-
0x10, 0x00, 0x24, 0x00, 0x0b
17+
0x84, 0x07, 0x10, 0x03, 0x0c, 0x00, 0x0b, 0x00, 0x0b, 0x06, 0x00, 0x10,
18+
0x00, 0x24, 0x00, 0x0b
1919
};
20-
unsigned int app_wasm_len = 197;
20+
unsigned int app_wasm_len = 196;

‎wasm_apps/assemblyscript/package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎wasm_apps/assemblyscript/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"license": "MIT",
33
"scripts": {
44
"build": "npm run asbuild:optimized && xxd -i app.wasm > app.wasm.h",
5-
"asbuild:optimized": "npx asc app.ts -b app.wasm -t app.wat -O3z --runtime half --noAssert --use abort="
5+
"asbuild:optimized": "npx asc app.ts -b app.wasm -t app.wat -O3z --runtime stub --noAssert --use abort="
66
},
77
"devDependencies": {
8-
"assemblyscript": "^0.9.0"
8+
"assemblyscript": "^0.18.0"
99
}
1010
}

‎wasm_apps/rust/app.wasm

0 Bytes
Binary file not shown.

‎wasm_apps/rust/app.wasm.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ unsigned char app_wasm[] = {
1010
0x69, 0x6e, 0x6f, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x00, 0x02, 0x03,
1111
0x02, 0x01, 0x01, 0x05, 0x03, 0x01, 0x00, 0x01, 0x06, 0x0d, 0x02, 0x7f,
1212
0x00, 0x41, 0x80, 0x10, 0x0b, 0x7f, 0x00, 0x41, 0x80, 0x10, 0x0b, 0x07,
13-
0x2e, 0x04, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00, 0x0a,
14-
0x5f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x64, 0x03, 0x00,
15-
0x0b, 0x5f, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x73, 0x65,
16-
0x03, 0x01, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x00, 0x04, 0x0a,
13+
0x2e, 0x04, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00, 0x06,
14+
0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x00, 0x04, 0x0a, 0x5f, 0x5f, 0x64,
15+
0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x64, 0x03, 0x00, 0x0b, 0x5f, 0x5f,
16+
0x68, 0x65, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x03, 0x01, 0x0a,
1717
0x2a, 0x01, 0x28, 0x01, 0x01, 0x7f, 0x10, 0x00, 0x22, 0x00, 0x41, 0x01,
1818
0x10, 0x01, 0x03, 0x40, 0x20, 0x00, 0x41, 0x01, 0x10, 0x02, 0x41, 0xe4,
1919
0x00, 0x10, 0x03, 0x20, 0x00, 0x41, 0x00, 0x10, 0x02, 0x41, 0x84, 0x07,

‎wasm_apps/rust/src/app.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![no_std]
2-
#![feature(core_intrinsics)]
32

43
mod arduino;
54
use arduino::*;

‎wasm_apps/rust/src/arduino.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ pub fn getPinLED () -> u32 { unsafe { _getPinLED() } }
2525

2626
#[panic_handler]
2727
fn handle_panic(_: &core::panic::PanicInfo) -> ! {
28-
unsafe { core::intrinsics::unreachable() }
28+
unsafe { core::arch::wasm32::unreachable() }
2929
}

‎wasm_apps/tinygo/app.wasm

404 Bytes
Binary file not shown.

‎wasm_apps/tinygo/app.wasm.h

+77-44
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,80 @@
11
unsigned char app_wasm[] = {
22
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x18, 0x05, 0x60,
3-
0x00, 0x00, 0x60, 0x02, 0x7f, 0x7f, 0x00, 0x60, 0x00, 0x01, 0x7f, 0x60,
4-
0x01, 0x7f, 0x00, 0x60, 0x03, 0x7f, 0x7f, 0x7f, 0x01, 0x7f, 0x02, 0x62,
5-
0x05, 0x03, 0x65, 0x6e, 0x76, 0x0d, 0x69, 0x6f, 0x5f, 0x67, 0x65, 0x74,
6-
0x5f, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x00, 0x02, 0x07, 0x61, 0x72,
7-
0x64, 0x75, 0x69, 0x6e, 0x6f, 0x09, 0x67, 0x65, 0x74, 0x50, 0x69, 0x6e,
8-
0x4c, 0x45, 0x44, 0x00, 0x02, 0x07, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e,
9-
0x6f, 0x07, 0x70, 0x69, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x00, 0x01, 0x07,
10-
0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x0c, 0x64, 0x69, 0x67, 0x69,
11-
0x74, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x00, 0x01, 0x07, 0x61,
12-
0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x05, 0x64, 0x65, 0x6c, 0x61, 0x79,
13-
0x00, 0x03, 0x03, 0x08, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
14-
0x05, 0x04, 0x01, 0x01, 0x01, 0x01, 0x06, 0x19, 0x04, 0x7f, 0x00, 0x41,
15-
0x84, 0x10, 0x0b, 0x7f, 0x00, 0x41, 0x80, 0x10, 0x0b, 0x7f, 0x00, 0x41,
16-
0x84, 0x10, 0x0b, 0x7f, 0x00, 0x41, 0x80, 0x08, 0x0b, 0x07, 0x7e, 0x0a,
17-
0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00, 0x11, 0x5f, 0x5f,
18-
0x77, 0x61, 0x73, 0x6d, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x74,
19-
0x6f, 0x72, 0x73, 0x00, 0x05, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74,
20-
0x00, 0x06, 0x08, 0x63, 0x77, 0x61, 0x5f, 0x6d, 0x61, 0x69, 0x6e, 0x00,
21-
0x08, 0x0b, 0x5f, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x73,
22-
0x65, 0x03, 0x00, 0x06, 0x6d, 0x65, 0x6d, 0x73, 0x65, 0x74, 0x00, 0x0a,
23-
0x06, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x00, 0x0b, 0x0c, 0x5f, 0x5f,
24-
0x64, 0x73, 0x6f, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x03, 0x01,
25-
0x0a, 0x5f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x64, 0x03,
26-
0x02, 0x0d, 0x5f, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x62,
27-
0x61, 0x73, 0x65, 0x03, 0x03, 0x0a, 0xd1, 0x01, 0x07, 0x03, 0x00, 0x01,
28-
0x0b, 0x04, 0x00, 0x10, 0x07, 0x0b, 0x49, 0x01, 0x02, 0x7f, 0x3f, 0x00,
29-
0x41, 0x10, 0x74, 0x41, 0x84, 0x10, 0x6b, 0x41, 0x06, 0x76, 0x21, 0x01,
30-
0x02, 0x40, 0x03, 0x40, 0x20, 0x00, 0x20, 0x01, 0x47, 0x04, 0x40, 0x20,
31-
0x00, 0x41, 0xfc, 0x6f, 0x46, 0x0d, 0x02, 0x20, 0x00, 0x41, 0x84, 0x10,
32-
0x6a, 0x41, 0x00, 0x3a, 0x00, 0x00, 0x20, 0x00, 0x41, 0x01, 0x6a, 0x21,
33-
0x00, 0x0c, 0x01, 0x0b, 0x0b, 0x10, 0x00, 0x1a, 0x41, 0x80, 0x10, 0x10,
34-
0x01, 0x36, 0x02, 0x00, 0x0f, 0x0b, 0x00, 0x0b, 0x07, 0x00, 0x10, 0x07,
35-
0x10, 0x09, 0x00, 0x0b, 0x30, 0x00, 0x41, 0x80, 0x10, 0x28, 0x02, 0x00,
36-
0x41, 0x01, 0x10, 0x02, 0x03, 0x40, 0x41, 0x80, 0x10, 0x28, 0x02, 0x00,
37-
0x41, 0x01, 0x10, 0x03, 0x41, 0xe4, 0x00, 0x10, 0x04, 0x41, 0x80, 0x10,
38-
0x28, 0x02, 0x00, 0x41, 0x00, 0x10, 0x03, 0x41, 0x84, 0x07, 0x10, 0x04,
39-
0x0c, 0x00, 0x0b, 0x00, 0x0b, 0x37, 0x01, 0x02, 0x7f, 0x41, 0x00, 0x20,
40-
0x00, 0x6b, 0x21, 0x04, 0x02, 0x40, 0x03, 0x40, 0x20, 0x02, 0x20, 0x03,
41-
0x47, 0x04, 0x40, 0x20, 0x03, 0x20, 0x04, 0x46, 0x0d, 0x02, 0x20, 0x00,
42-
0x20, 0x03, 0x6a, 0x20, 0x01, 0x3a, 0x00, 0x00, 0x20, 0x03, 0x41, 0x01,
43-
0x6a, 0x21, 0x03, 0x0c, 0x01, 0x0b, 0x0b, 0x20, 0x00, 0x0f, 0x0b, 0x00,
44-
0x0b, 0x0b, 0x00, 0x41, 0xf8, 0x0f, 0x42, 0x00, 0x37, 0x03, 0x00, 0x00,
45-
0x0b
3+
0x00, 0x00, 0x60, 0x01, 0x7f, 0x00, 0x60, 0x02, 0x7f, 0x7f, 0x00, 0x60,
4+
0x00, 0x01, 0x7f, 0x60, 0x03, 0x7f, 0x7f, 0x7f, 0x01, 0x7f, 0x02, 0x4e,
5+
0x04, 0x07, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x09, 0x67, 0x65,
6+
0x74, 0x50, 0x69, 0x6e, 0x4c, 0x45, 0x44, 0x00, 0x03, 0x07, 0x61, 0x72,
7+
0x64, 0x75, 0x69, 0x6e, 0x6f, 0x07, 0x70, 0x69, 0x6e, 0x4d, 0x6f, 0x64,
8+
0x65, 0x00, 0x02, 0x07, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x0c,
9+
0x64, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65,
10+
0x00, 0x02, 0x07, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x05, 0x64,
11+
0x65, 0x6c, 0x61, 0x79, 0x00, 0x01, 0x03, 0x09, 0x08, 0x00, 0x00, 0x00,
12+
0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x05, 0x01, 0x70, 0x01, 0x01, 0x01,
13+
0x05, 0x04, 0x01, 0x01, 0x01, 0x01, 0x06, 0x23, 0x06, 0x7f, 0x00, 0x41,
14+
0x90, 0x10, 0x0b, 0x7f, 0x00, 0x41, 0x80, 0x10, 0x0b, 0x7f, 0x00, 0x41,
15+
0x90, 0x10, 0x0b, 0x7f, 0x00, 0x41, 0x80, 0x10, 0x0b, 0x7f, 0x00, 0x41,
16+
0x00, 0x0b, 0x7f, 0x00, 0x41, 0x01, 0x0b, 0x07, 0xa1, 0x01, 0x0c, 0x06,
17+
0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00, 0x11, 0x5f, 0x5f, 0x77,
18+
0x61, 0x73, 0x6d, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x74, 0x6f,
19+
0x72, 0x73, 0x00, 0x04, 0x06, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x00,
20+
0x05, 0x0c, 0x67, 0x6f, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
21+
0x65, 0x72, 0x00, 0x07, 0x0b, 0x5f, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x5f,
22+
0x62, 0x61, 0x73, 0x65, 0x03, 0x00, 0x06, 0x6d, 0x65, 0x6d, 0x73, 0x65,
23+
0x74, 0x00, 0x0b, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x00, 0x09,
24+
0x0c, 0x5f, 0x5f, 0x64, 0x73, 0x6f, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c,
25+
0x65, 0x03, 0x01, 0x0a, 0x5f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x65,
26+
0x6e, 0x64, 0x03, 0x02, 0x0d, 0x5f, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x61,
27+
0x6c, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x03, 0x03, 0x0d, 0x5f, 0x5f, 0x6d,
28+
0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x03, 0x04,
29+
0x0c, 0x5f, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x73,
30+
0x65, 0x03, 0x05, 0x0a, 0xc3, 0x04, 0x08, 0x03, 0x00, 0x01, 0x0b, 0x25,
31+
0x00, 0x41, 0x80, 0x10, 0x3f, 0x00, 0x41, 0x10, 0x74, 0x36, 0x02, 0x00,
32+
0x10, 0x06, 0x41, 0x80, 0x10, 0x3f, 0x00, 0x41, 0x10, 0x74, 0x36, 0x02,
33+
0x00, 0x41, 0x88, 0x10, 0x10, 0x00, 0x36, 0x02, 0x00, 0x10, 0x0a, 0x00,
34+
0x0b, 0x29, 0x01, 0x02, 0x7f, 0x41, 0x84, 0x10, 0x41, 0x80, 0x10, 0x28,
35+
0x02, 0x00, 0x22, 0x00, 0x20, 0x00, 0x41, 0x90, 0x10, 0x6b, 0x41, 0x06,
36+
0x76, 0x22, 0x00, 0x6b, 0x22, 0x01, 0x36, 0x02, 0x00, 0x20, 0x01, 0x41,
37+
0x00, 0x20, 0x00, 0x10, 0x0b, 0x1a, 0x0b, 0x04, 0x00, 0x10, 0x08, 0x0b,
38+
0x35, 0x01, 0x01, 0x7f, 0x03, 0x40, 0x41, 0x8c, 0x10, 0x28, 0x02, 0x00,
39+
0x22, 0x00, 0x04, 0x40, 0x41, 0x8c, 0x10, 0x20, 0x00, 0x28, 0x02, 0x00,
40+
0x36, 0x02, 0x00, 0x20, 0x00, 0x41, 0x00, 0x36, 0x02, 0x00, 0x20, 0x00,
41+
0x28, 0x02, 0x0c, 0x22, 0x00, 0x20, 0x00, 0x28, 0x02, 0x00, 0x11, 0x01,
42+
0x00, 0x0c, 0x01, 0x0b, 0x0b, 0x0b, 0x03, 0x00, 0x00, 0x0b, 0x30, 0x00,
43+
0x41, 0x88, 0x10, 0x28, 0x02, 0x00, 0x41, 0x01, 0x10, 0x01, 0x03, 0x40,
44+
0x41, 0x88, 0x10, 0x28, 0x02, 0x00, 0x41, 0x01, 0x10, 0x02, 0x41, 0xe4,
45+
0x00, 0x10, 0x03, 0x41, 0x88, 0x10, 0x28, 0x02, 0x00, 0x41, 0x00, 0x10,
46+
0x02, 0x41, 0x84, 0x07, 0x10, 0x03, 0x0c, 0x00, 0x0b, 0x00, 0x0b, 0xfc,
47+
0x02, 0x02, 0x02, 0x7f, 0x01, 0x7e, 0x02, 0x40, 0x20, 0x02, 0x45, 0x0d,
48+
0x00, 0x20, 0x00, 0x20, 0x01, 0x3a, 0x00, 0x00, 0x20, 0x00, 0x20, 0x02,
49+
0x6a, 0x22, 0x03, 0x41, 0x7f, 0x6a, 0x20, 0x01, 0x3a, 0x00, 0x00, 0x20,
50+
0x02, 0x41, 0x03, 0x49, 0x0d, 0x00, 0x20, 0x00, 0x20, 0x01, 0x3a, 0x00,
51+
0x02, 0x20, 0x00, 0x20, 0x01, 0x3a, 0x00, 0x01, 0x20, 0x03, 0x41, 0x7d,
52+
0x6a, 0x20, 0x01, 0x3a, 0x00, 0x00, 0x20, 0x03, 0x41, 0x7e, 0x6a, 0x20,
53+
0x01, 0x3a, 0x00, 0x00, 0x20, 0x02, 0x41, 0x07, 0x49, 0x0d, 0x00, 0x20,
54+
0x00, 0x20, 0x01, 0x3a, 0x00, 0x03, 0x20, 0x03, 0x41, 0x7c, 0x6a, 0x20,
55+
0x01, 0x3a, 0x00, 0x00, 0x20, 0x02, 0x41, 0x09, 0x49, 0x0d, 0x00, 0x20,
56+
0x00, 0x41, 0x00, 0x20, 0x00, 0x6b, 0x41, 0x03, 0x71, 0x22, 0x04, 0x6a,
57+
0x22, 0x03, 0x20, 0x01, 0x41, 0xff, 0x01, 0x71, 0x41, 0x81, 0x82, 0x84,
58+
0x08, 0x6c, 0x22, 0x01, 0x36, 0x02, 0x00, 0x20, 0x03, 0x20, 0x02, 0x20,
59+
0x04, 0x6b, 0x41, 0x7c, 0x71, 0x22, 0x04, 0x6a, 0x22, 0x02, 0x41, 0x7c,
60+
0x6a, 0x20, 0x01, 0x36, 0x02, 0x00, 0x20, 0x04, 0x41, 0x09, 0x49, 0x0d,
61+
0x00, 0x20, 0x03, 0x20, 0x01, 0x36, 0x02, 0x08, 0x20, 0x03, 0x20, 0x01,
62+
0x36, 0x02, 0x04, 0x20, 0x02, 0x41, 0x78, 0x6a, 0x20, 0x01, 0x36, 0x02,
63+
0x00, 0x20, 0x02, 0x41, 0x74, 0x6a, 0x20, 0x01, 0x36, 0x02, 0x00, 0x20,
64+
0x04, 0x41, 0x19, 0x49, 0x0d, 0x00, 0x20, 0x03, 0x20, 0x01, 0x36, 0x02,
65+
0x18, 0x20, 0x03, 0x20, 0x01, 0x36, 0x02, 0x14, 0x20, 0x03, 0x20, 0x01,
66+
0x36, 0x02, 0x10, 0x20, 0x03, 0x20, 0x01, 0x36, 0x02, 0x0c, 0x20, 0x02,
67+
0x41, 0x70, 0x6a, 0x20, 0x01, 0x36, 0x02, 0x00, 0x20, 0x02, 0x41, 0x6c,
68+
0x6a, 0x20, 0x01, 0x36, 0x02, 0x00, 0x20, 0x02, 0x41, 0x68, 0x6a, 0x20,
69+
0x01, 0x36, 0x02, 0x00, 0x20, 0x02, 0x41, 0x64, 0x6a, 0x20, 0x01, 0x36,
70+
0x02, 0x00, 0x20, 0x04, 0x20, 0x03, 0x41, 0x04, 0x71, 0x41, 0x18, 0x72,
71+
0x22, 0x04, 0x6b, 0x22, 0x02, 0x41, 0x20, 0x49, 0x0d, 0x00, 0x20, 0x01,
72+
0xad, 0x22, 0x05, 0x42, 0x20, 0x86, 0x20, 0x05, 0x84, 0x21, 0x05, 0x20,
73+
0x03, 0x20, 0x04, 0x6a, 0x21, 0x01, 0x03, 0x40, 0x20, 0x01, 0x20, 0x05,
74+
0x37, 0x03, 0x00, 0x20, 0x01, 0x41, 0x18, 0x6a, 0x20, 0x05, 0x37, 0x03,
75+
0x00, 0x20, 0x01, 0x41, 0x10, 0x6a, 0x20, 0x05, 0x37, 0x03, 0x00, 0x20,
76+
0x01, 0x41, 0x08, 0x6a, 0x20, 0x05, 0x37, 0x03, 0x00, 0x20, 0x01, 0x41,
77+
0x20, 0x6a, 0x21, 0x01, 0x20, 0x02, 0x41, 0x60, 0x6a, 0x22, 0x02, 0x41,
78+
0x1f, 0x4b, 0x0d, 0x00, 0x0b, 0x0b, 0x20, 0x00, 0x0b
4679
};
47-
unsigned int app_wasm_len = 517;
80+
unsigned int app_wasm_len = 921;

‎wasm_apps/tinygo/build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Prepare
2-
export PATH=/usr/local/tinygo/bin:$PATH
3-
export GOROOT=/opt/go
2+
export PATH=/opt/tinygo0.17.0/bin:$PATH
3+
export PATH=/opt/go1.15.2/bin:$PATH
4+
export GOROOT=/opt/go1.15.2
45

56
# Compile
67
tinygo build -target wasm \
78
-panic trap -wasm-abi generic \
89
-ldflags="-z stack-size=2048 --max-memory=65536" \
9-
-heap-size 4096 \
1010
-o app.wasm app.go
1111

1212
# Optimize (optional)

0 commit comments

Comments
 (0)
Please sign in to comment.