javascript: Rename this port to 'webassembly'.

pull/9073/head
Nicholas H.Tollervey 2022-08-19 14:58:58 +01:00
rodzic c616721b1a
commit af54d2ce9f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: FD2A04F69841B6FA
14 zmienionych plików z 23 dodań i 18 usunięć

Wyświetl plik

@ -1,4 +1,4 @@
name: javascript port name: webassembly port
on: on:
push: push:
@ -9,7 +9,7 @@ on:
- 'py/**' - 'py/**'
- 'extmod/**' - 'extmod/**'
- 'lib/**' - 'lib/**'
- 'ports/javascript/**' - 'ports/webassembly/**'
jobs: jobs:
build: build:
@ -17,8 +17,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install packages - name: Install packages
run: source tools/ci.sh && ci_javascript_setup run: source tools/ci.sh && ci_webassembly_setup
- name: Build - name: Build
run: source tools/ci.sh && ci_javascript_build run: source tools/ci.sh && ci_webassembly_build
- name: Run tests - name: Run tests
run: source tools/ci.sh && ci_javascript_run_tests run: source tools/ci.sh && ci_webassembly_run_tests

Wyświetl plik

@ -51,6 +51,6 @@ min: $(BUILD)/micropython.js
test: $(BUILD)/micropython.js $(TOP)/tests/run-tests.py test: $(BUILD)/micropython.js $(TOP)/tests/run-tests.py
$(eval DIRNAME=ports/$(notdir $(CURDIR))) $(eval DIRNAME=ports/$(notdir $(CURDIR)))
cd $(TOP)/tests && MICROPY_MICROPYTHON=../ports/javascript/node_run.sh ./run-tests.py -j1 cd $(TOP)/tests && MICROPY_MICROPYTHON=../ports/webassembly/node_run.sh ./run-tests.py -j1
include $(TOP)/py/mkrules.mk include $(TOP)/py/mkrules.mk

Wyświetl plik

@ -1,13 +1,18 @@
MicroPython.js MicroPython WebAssembly
============== =======================
MicroPython transmuted into Javascript by Emscripten. MicroPython for [WebAssembly](https://webassembly.org/).
Dependencies Dependencies
------------ ------------
Building micropython.js bears the same requirements as the standard MicroPython Building webassembly port bears the same requirements as the standard
ports with the addition of Emscripten (and uglify-js for the minified file). MicroPython ports with the addition of Emscripten (and uglify-js for the
minified file).
The output includes `micropython.js` (a JavaScript wrapper for the
MicroPython runtime) and `firmware.wasm` (actual MicroPython compiled to
WASM).
Build instructions Build instructions
------------------ ------------------

Wyświetl plik

@ -105,7 +105,7 @@
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1) #define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1) #define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1) #define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
#define MICROPY_PY_SYS_PLATFORM "javascript" #define MICROPY_PY_SYS_PLATFORM "webassembly"
#define MICROPY_PY_UERRNO (1) #define MICROPY_PY_UERRNO (1)
#define MICROPY_PY_UCTYPES (1) #define MICROPY_PY_UCTYPES (1)
#define MICROPY_PY_UZLIB (1) #define MICROPY_PY_UZLIB (1)

Wyświetl plik

@ -172,21 +172,21 @@ function ci_esp8266_build {
} }
######################################################################################## ########################################################################################
# ports/javascript # ports/webassembly
function ci_javascript_setup { function ci_webassembly_setup {
git clone https://github.com/emscripten-core/emsdk.git git clone https://github.com/emscripten-core/emsdk.git
(cd emsdk && ./emsdk install latest && ./emsdk activate latest) (cd emsdk && ./emsdk install latest && ./emsdk activate latest)
} }
function ci_javascript_build { function ci_webassembly_build {
source emsdk/emsdk_env.sh source emsdk/emsdk_env.sh
make ${MAKEOPTS} -C ports/javascript make ${MAKEOPTS} -C ports/webassembly
} }
function ci_javascript_run_tests { function ci_webassembly_run_tests {
# This port is very slow at running, so only run a few of the tests. # This port is very slow at running, so only run a few of the tests.
(cd tests && MICROPY_MICROPYTHON=../ports/javascript/node_run.sh ./run-tests.py -j1 basics/builtin_*.py) (cd tests && MICROPY_MICROPYTHON=../ports/webassembly/node_run.sh ./run-tests.py -j1 basics/builtin_*.py)
} }
######################################################################################## ########################################################################################