Skip to content

Commit 9f59f22

Browse files
committed
Cleanup
1 parent c303a94 commit 9f59f22

File tree

11 files changed

+279
-302
lines changed

11 files changed

+279
-302
lines changed

examples_pio/Wasm_Advanced/wasm_apps/cpp/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ wasm-opt -O3 app.wasm -o app.wasm
1010
wasm-strip app.wasm
1111

1212
# Convert to WAT
13-
#wasm2wat app.wasm -o app.wat
13+
#wasm2wat --generate-names app.wasm -o app.wat
1414

1515
# Convert to C header
1616
xxd -i app.wasm > app.wasm.h

examples_pio/Wasm_Advanced/wasm_apps/rust/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ wasm-opt -O3 app.wasm -o app.wasm
1010
wasm-strip app.wasm
1111

1212
# Convert to WAT
13-
#wasm2wat app.wasm -o app.wat
13+
#wasm2wat --generate-names app.wasm -o app.wat
1414

1515
# Convert to C header
1616
xxd -i app.wasm > app.wasm.h

examples_pio/Wasm_Advanced/wasm_apps/tinygo/app.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ func print(s string)
4646
func _getGreeting(buf *byte, maxlen uint)
4747

4848
func println(s string) {
49-
print(s + "\n")
49+
print(s)
50+
print("\n")
5051
}
5152

5253
func getGreeting() string {
@@ -77,8 +78,8 @@ func setup() {
7778
}
7879

7980
func loop() {
80-
t := millis()
81-
println(strconv.FormatUint(uint64(t), 10))
81+
time := millis()
82+
println(strconv.FormatUint(uint64(time), 10))
8283

8384
digitalWrite(LED, HIGH)
8485
delay(100)
-138 Bytes
Binary file not shown.

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

Lines changed: 268 additions & 280 deletions
Large diffs are not rendered by default.

wasm_apps/assemblyscript/app.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@ export function _start(): void {
2222
run();
2323
}
2424
}
25-

wasm_apps/assemblyscript/arduino.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,3 @@ export declare function pinMode(pin: u32, mode: u32): void;
1111
export declare function digitalWrite(pin: u32, value: u32): void;
1212
export declare function getPinLED(): u32;
1313

14-
@external("print")
15-
declare function _print(ptr: usize): void;
16-
17-
export function print(str: string): void {
18-
_print(changetype<usize>(String.UTF8.encode(str, true)));
19-
}
20-
21-
export function println(str: string): void {
22-
print(str + '\n');
23-
}
24-

wasm_apps/cpp/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ wasm-opt -O3 app.wasm -o app.wasm
1010
wasm-strip app.wasm
1111

1212
# Convert to WAT
13-
#wasm2wat app.wasm -o app.wat
13+
#wasm2wat --generate-names app.wasm -o app.wat
1414

1515
# Convert to C header
1616
xxd -i app.wasm > app.wasm.h

wasm_apps/rust/app.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mod arduino;
55
use arduino::*;
66

77
struct App {
8-
led: u32,
8+
led: u32,
99
}
1010

1111
impl App {

wasm_apps/rust/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Compile
22
rustc -O --crate-type=cdylib \
33
--target=wasm32-unknown-unknown \
4-
-C link-arg=-zstack-size=4096 \
4+
-C link-arg=-zstack-size=2048 \
55
-C link-arg=-s \
66
-o app.wasm app.rs
77

@@ -10,7 +10,7 @@ wasm-opt -O3 app.wasm -o app.wasm
1010
wasm-strip app.wasm
1111

1212
# Convert to WAT
13-
#wasm2wat app.wasm -o app.wat
13+
#wasm2wat --generate-names app.wasm -o app.wat
1414

1515
# Convert to C header
1616
xxd -i app.wasm > app.wasm.h

0 commit comments

Comments
 (0)