kopia lustrzana https://github.com/micropython/micropython
webassembly/variants/pyscript: Add pyscript variant.
This commit adds a pyscript variant for use in https://pyscript.net/. The configuration is: - No ASYNCIFY, in order to keep the WASM size down and have good performance. - MICROPY_CONFIG_ROM_LEVEL_FULL_FEATURES to enable most features. - Custom manifest that includes many of the python-stdlib libraries. - MICROPY_GC_SPLIT_HEAP_AUTO to increase GC heap size instead of doing a collection when memory is exhausted. This is needed because ASYNCIFY is disabled. Instead the GC collection is run at the top-level before executing any Python code. - No MICROPY_VARIANT_ENABLE_JS_HOOK because there is no asynchronous keyboard input to interrupt a running script. Signed-off-by: Damien George <damien@micropython.org>pull/13583/head
rodzic
6ff3e356e2
commit
b9eb74e73b
|
@ -0,0 +1,27 @@
|
|||
require("abc")
|
||||
require("base64")
|
||||
require("collections")
|
||||
require("collections-defaultdict")
|
||||
require("copy")
|
||||
require("datetime")
|
||||
require("fnmatch")
|
||||
require("functools")
|
||||
require("gzip")
|
||||
require("hmac")
|
||||
require("html")
|
||||
require("inspect")
|
||||
require("io")
|
||||
require("itertools")
|
||||
require("locale")
|
||||
require("logging")
|
||||
require("operator")
|
||||
require("os")
|
||||
require("os-path")
|
||||
require("pathlib")
|
||||
require("stat")
|
||||
require("tarfile")
|
||||
require("tarfile-write")
|
||||
require("time")
|
||||
require("unittest")
|
||||
require("uu")
|
||||
require("zlib")
|
|
@ -0,0 +1,3 @@
|
|||
#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_FULL_FEATURES)
|
||||
#define MICROPY_GC_SPLIT_HEAP (1)
|
||||
#define MICROPY_GC_SPLIT_HEAP_AUTO (1)
|
|
@ -0,0 +1,3 @@
|
|||
JSFLAGS += -s ALLOW_MEMORY_GROWTH
|
||||
|
||||
FROZEN_MANIFEST ?= variants/pyscript/manifest.py
|
Ładowanie…
Reference in New Issue