Skip to content

Commit af54d2c

Browse files
committed
javascript: Rename this port to 'webassembly'.
1 parent c616721 commit af54d2c

14 files changed

+23
-18
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: javascript port
1+
name: webassembly port
22

33
on:
44
push:
@@ -9,16 +9,16 @@ on:
99
- 'py/**'
1010
- 'extmod/**'
1111
- 'lib/**'
12-
- 'ports/javascript/**'
12+
- 'ports/webassembly/**'
1313

1414
jobs:
1515
build:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v2
1919
- name: Install packages
20-
run: source tools/ci.sh && ci_javascript_setup
20+
run: source tools/ci.sh && ci_webassembly_setup
2121
- name: Build
22-
run: source tools/ci.sh && ci_javascript_build
22+
run: source tools/ci.sh && ci_webassembly_build
2323
- name: Run tests
24-
run: source tools/ci.sh && ci_javascript_run_tests
24+
run: source tools/ci.sh && ci_webassembly_run_tests

ports/javascript/Makefile ports/webassembly/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ min: $(BUILD)/micropython.js
5151

5252
test: $(BUILD)/micropython.js $(TOP)/tests/run-tests.py
5353
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
54-
cd $(TOP)/tests && MICROPY_MICROPYTHON=../ports/javascript/node_run.sh ./run-tests.py -j1
54+
cd $(TOP)/tests && MICROPY_MICROPYTHON=../ports/webassembly/node_run.sh ./run-tests.py -j1
5555

5656
include $(TOP)/py/mkrules.mk

ports/javascript/README.md ports/webassembly/README.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
MicroPython.js
2-
==============
1+
MicroPython WebAssembly
2+
=======================
33

4-
MicroPython transmuted into Javascript by Emscripten.
4+
MicroPython for [WebAssembly](https://webassembly.org/).
55

66
Dependencies
77
------------
88

9-
Building micropython.js bears the same requirements as the standard MicroPython
10-
ports with the addition of Emscripten (and uglify-js for the minified file).
9+
Building webassembly port bears the same requirements as the standard
10+
MicroPython ports with the addition of Emscripten (and uglify-js for the
11+
minified file).
12+
13+
The output includes `micropython.js` (a JavaScript wrapper for the
14+
MicroPython runtime) and `firmware.wasm` (actual MicroPython compiled to
15+
WASM).
1116

1217
Build instructions
1318
------------------
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

ports/javascript/mpconfigport.h ports/webassembly/mpconfigport.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
106106
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
107107
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
108-
#define MICROPY_PY_SYS_PLATFORM "javascript"
108+
#define MICROPY_PY_SYS_PLATFORM "webassembly"
109109
#define MICROPY_PY_UERRNO (1)
110110
#define MICROPY_PY_UCTYPES (1)
111111
#define MICROPY_PY_UZLIB (1)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tools/ci.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -172,21 +172,21 @@ function ci_esp8266_build {
172172
}
173173

174174
########################################################################################
175-
# ports/javascript
175+
# ports/webassembly
176176

177-
function ci_javascript_setup {
177+
function ci_webassembly_setup {
178178
git clone https://github.com/emscripten-core/emsdk.git
179179
(cd emsdk && ./emsdk install latest && ./emsdk activate latest)
180180
}
181181

182-
function ci_javascript_build {
182+
function ci_webassembly_build {
183183
source emsdk/emsdk_env.sh
184-
make ${MAKEOPTS} -C ports/javascript
184+
make ${MAKEOPTS} -C ports/webassembly
185185
}
186186

187-
function ci_javascript_run_tests {
187+
function ci_webassembly_run_tests {
188188
# This port is very slow at running, so only run a few of the tests.
189-
(cd tests && MICROPY_MICROPYTHON=../ports/javascript/node_run.sh ./run-tests.py -j1 basics/builtin_*.py)
189+
(cd tests && MICROPY_MICROPYTHON=../ports/webassembly/node_run.sh ./run-tests.py -j1 basics/builtin_*.py)
190190
}
191191

192192
########################################################################################

0 commit comments

Comments
 (0)