The job queue in Microvium is used just for executing async continuations. It uses only 2 bytes of idle memory and doesn't require allocating any threads or special support from the host of any kind.| Coder Mike
Microvium's async/await uses continuation-passing style (CPS) at its core for efficiency, but automatically creates promises as well when required. It does so by defining a handshake protocol between the caller and callee to establish when promises are required. Promises in Microvium also pretty compact, but not as compact as raw CPS.| Coder Mike
A suspended async function in Microvium can take as little as 6 bytes of RAM by using continuation-passing style (CPS) instead of promises, using dramatically less memory than other engines.| Coder Mike
The async/await feature of JavaScript is an alternative to multithreading, state machines, or callback-based code for managing long-running operations. Microvium's design of async-await makes it one of the most memory-efficient and ergonomic ways of writing such code for small devices.| Coder Mike
TL;DR: The Microvium runtime, @microvium/runtime on npm, allows you to restore and run Microvium snapshots in a JavaScript host environment such as node.js or the browser, using a WASM build of the Microvium native engine.| Coder Mike
Microvium closures are now as small as 6 bytes on the heap, down from 12 bytes previously and compared to over 100 B in some other engines.| Coder Mike
Closures are a good way to represent callbacks for non-blocking code. Although C doesn't support closures, you can achieve something similar using structs on the heap, but you can get even better memory efficiency by using JavaScript running on Microvium.| Coder Mike
Microvium's snapshotting paradigm allows a library to generate the FFI glue code, so you don't have to.| Coder Mike
Microvium now has support for classes. Here are some details for the curious.| Coder Mike
Support for closures in Microvium sets it apart from other JS engines of a similar size. Closures simplify state machines and enable functional-style code. Closures in snapshots are a new way of sharing compile-time state with the runtime program. This post goes through some examples and design details.| Coder Mike