summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-04-15 09:27:43 +1000
committerDamien George <damien@micropython.org>2024-03-22 13:05:54 +1100
commitff15dfcaa84dc7d29b9e791f01eaba21dbc2fd72 (patch)
treebd738d3e1699aa014647fe3cc7ff1544dd8738b9
parent2b8e88c563e4bab53e3183d15f04795d645eea28 (diff)
webassembly: Include lib in sys.path.
Following other ports. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/webassembly/main.c1
-rw-r--r--ports/webassembly/qstrdefsport.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/ports/webassembly/main.c b/ports/webassembly/main.c
index 0aacf1ee0..1b053046b 100644
--- a/ports/webassembly/main.c
+++ b/ports/webassembly/main.c
@@ -105,6 +105,7 @@ void mp_js_init(int heap_size) {
mp_vfs_mount(2, args, (mp_map_t *)&mp_const_empty_map);
MP_STATE_VM(vfs_cur) = MP_STATE_VM(vfs_mount_table);
}
+ mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
#endif
}
diff --git a/ports/webassembly/qstrdefsport.h b/ports/webassembly/qstrdefsport.h
index 00d3e2ae3..472d05f43 100644
--- a/ports/webassembly/qstrdefsport.h
+++ b/ports/webassembly/qstrdefsport.h
@@ -1,2 +1,3 @@
// qstrs specific to this port
// *FORMAT-OFF*
+Q(/lib)