mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
webassembly: Use POSIX write for output and add stderr.
All output is now handled by Emscripten's stdio facility. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -25,16 +25,6 @@
|
||||
*/
|
||||
|
||||
mergeInto(LibraryManager.library, {
|
||||
mp_js_write: function(ptr, len) {
|
||||
const buffer = HEAPU8.subarray(ptr, ptr + len)
|
||||
if (ENVIRONMENT_IS_NODE) {
|
||||
process.stdout.write(buffer);
|
||||
} else {
|
||||
const printEvent = new CustomEvent('micropython-print', { detail: buffer });
|
||||
document.dispatchEvent(printEvent);
|
||||
}
|
||||
},
|
||||
|
||||
// This string will be emitted directly into the output file by Emscripten.
|
||||
mp_js_ticks_ms__postset: "var MP_JS_EPOCH = Date.now()",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user