Skip to content

MicroPythonNexus/micropython-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MicroPython.js

MicroPython transmuted into Javascript (WASM) by Emscripten.

Official Repo https://github.com/micropython/micropython/tree/master/ports/javascript

Running with Node.js

var mp_js = require('micropython');

mp_js.init(64 * 1024);
mp_js.do_str("print('hello world')\n");

Running with Webpack

TODO

API

The following functions have been exposed to javascript.

init(stack_size)

Initialize MicroPython with the given stack size in bytes. This must be called before attempting to interact with MicroPython.

do_str(code)

Execute the input code. code must be a string.

init_repl()

Initialize MicroPython repl. Must be called before entering characters into the repl.

process_char(char)

Input character into MicroPython repl. char must be of type number. This will execute MicroPython code when necessary.

About

A WebAssembly module built from the official MicroPython port

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.3%
  • Python 2.7%